(
availableNodesForVariable,
availableState,
acceptNodeOutputAsVariable,
nodes,
nodeData,
isNodeInsideInteration,
useMarkdown
)
| 19 | |
| 20 | // define your extension array |
| 21 | const 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 |
| 64 | const StyledEditorContent = styled(EditorContent)(({ theme, rows, disabled, isDarkMode }) => ({ |
no test coverage detected