MCPcopy Create free account
hub / github.com/FlowiseAI/Flowise / extensions

Function extensions

packages/ui/src/ui-component/input/RichInput.jsx:21–61  ·  view source on GitHub ↗
(
    availableNodesForVariable,
    availableState,
    acceptNodeOutputAsVariable,
    nodes,
    nodeData,
    isNodeInsideInteration,
    useMarkdown
)

Source from the content-addressed store, hash-verified

19
20// define your extension array
21const extensions = (
22 availableNodesForVariable,
23 availableState,
24 acceptNodeOutputAsVariable,
25 nodes,
26 nodeData,
27 isNodeInsideInteration,
28 useMarkdown
29) => [
30 Markdown,
31 StarterKit.configure({
32 codeBlock: false,
33 ...(!useMarkdown && { link: false })
34 }),
35 CustomMention.configure({
36 HTMLAttributes: {
37 class: 'variable'
38 },
39 renderHTML({ options, node }) {
40 return [
41 'span',
42 mergeAttributes(this.HTMLAttributes, options.HTMLAttributes),
43 `${options.suggestion.char} ${node.attrs.label ?? node.attrs.id} }}`
44 ]
45 },
46 suggestion: suggestionOptions(
47 availableNodesForVariable,
48 availableState,
49 acceptNodeOutputAsVariable,
50 nodes,
51 nodeData,
52 isNodeInsideInteration
53 ),
54 deleteTriggerWithBackspace: true
55 }),
56 CodeBlockLowlight.configure({
57 lowlight,
58 enableTabIndentation: true,
59 tabSize: 2
60 })
61]
62
63// Add styled component for editor wrapper
64const StyledEditorContent = styled(EditorContent)(({ theme, rows, disabled, isDarkMode }) => ({

Callers 1

RichInputFunction · 0.70

Calls 1

suggestionOptionsFunction · 0.90

Tested by

no test coverage detected