()
| 23 | }); |
| 24 | |
| 25 | export default function Editor() { |
| 26 | const editor = useCreateBlockNote({ schema }); |
| 27 | |
| 28 | // Give tests a way to get prosemirror instance |
| 29 | (window as WindowWithProseMirror).ProseMirror = editor?._tiptapEditor; |
| 30 | // editor.insertBlocks([{ |
| 31 | // type:"" |
| 32 | // }]) |
| 33 | // TODO: how to customize slashmenu |
| 34 | return ( |
| 35 | <BlockNoteView editor={editor}> |
| 36 | <BlockNoteDefaultUI slashMenu={false} /> |
| 37 | <SuggestionMenuController |
| 38 | getItems={async (query) => |
| 39 | filterSuggestionItems( |
| 40 | [...getDefaultReactSlashMenuItems(editor), insertAlert(editor)], |
| 41 | query, |
| 42 | ) |
| 43 | } |
| 44 | // suggestionMenuComponent={MantineSuggestionMenu} |
| 45 | triggerCharacter="/" |
| 46 | /> |
| 47 | </BlockNoteView> |
| 48 | ); |
| 49 | } |
nothing calls this directly
no test coverage detected