@blocknote/core 0.39.0 → 0.40.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/blocknote.cjs +4 -4
- package/dist/blocknote.cjs.map +1 -1
- package/dist/blocknote.js +1173 -1185
- package/dist/blocknote.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/webpack-stats.json +1 -1
- package/package.json +1 -1
- package/src/api/clipboard/fromClipboard/handleFileInsertion.ts +2 -2
- package/src/api/clipboard/fromClipboard/pasteExtension.ts +1 -1
- package/src/editor/BlockNoteEditor.ts +32 -19
- package/src/extensions/Placeholder/PlaceholderPlugin.ts +6 -6
- package/src/extensions/SideMenu/SideMenuPlugin.ts +1 -3
- package/src/extensions/SideMenu/dragging.ts +2 -2
- package/src/extensions/SuggestionMenu/SuggestionPlugin.ts +4 -2
- package/src/extensions/TableHandles/TableHandlesPlugin.ts +6 -6
- package/types/src/editor/BlockNoteEditor.d.ts +10 -2
package/dist/webpack-stats.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"builtAt":1758181015789,"assets":[{"name":"blocks.cjs","size":3743},{"name":"comments.cjs","size":11826},{"name":"locales.cjs","size":158539},{"name":"blocknote.cjs","size":132008},{"name":"en-D3B48eJ7.cjs","size":6630},{"name":"BlockNoteSchema-DmZ6UQfY.cjs","size":83376},{"name":"en-D3B48eJ7.cjs.map","size":14973},{"name":"BlockNoteSchema-DmZ6UQfY.cjs.map","size":409974},{"name":"blocks.cjs.map","size":91},{"name":"comments.cjs.map","size":47628},{"name":"locales.cjs.map","size":326303},{"name":"blocknote.cjs.map","size":581476}],"chunks":[{"id":"c90dbef","entry":true,"initial":true,"files":["blocks.cjs"],"names":["blocks"]},{"id":"1627b02","entry":true,"initial":true,"files":["comments.cjs"],"names":["comments"]},{"id":"9eaffe2","entry":true,"initial":true,"files":["locales.cjs"],"names":["locales"]},{"id":"a1ee98a","entry":true,"initial":true,"files":["blocknote.cjs"],"names":["blocknote"]},{"id":"a1e239a","entry":false,"initial":true,"files":["en-D3B48eJ7.cjs"],"names":["en"]},{"id":"7515671","entry":false,"initial":true,"files":["BlockNoteSchema-DmZ6UQfY.cjs"],"names":["BlockNoteSchema"]}],"modules":[{"name":"./src/blocks/index.ts","size":0,"chunks":["c90dbef"]},{"name":"./src/comments/threadstore/ThreadStoreAuth.ts","size":25,"chunks":["1627b02"]},{"name":"./src/comments/threadstore/DefaultThreadStoreAuth.ts","size":2014,"chunks":["1627b02"]},{"name":"./src/comments/threadstore/ThreadStore.ts","size":77,"chunks":["1627b02"]},{"name":"./src/comments/threadstore/TipTapThreadStore.ts","size":5321,"chunks":["1627b02"]},{"name":"./src/comments/threadstore/yjs/yjsHelpers.ts","size":3002,"chunks":["1627b02"]},{"name":"./src/comments/threadstore/yjs/YjsThreadStoreBase.ts","size":790,"chunks":["1627b02"]},{"name":"./src/comments/threadstore/yjs/RESTYjsThreadStore.ts","size":2069,"chunks":["1627b02"]},{"name":"./src/comments/threadstore/yjs/YjsThreadStore.ts","size":7267,"chunks":["1627b02"]},{"name":"./src/comments/index.ts","size":0,"chunks":["1627b02"]},{"name":"./src/i18n/locales/ar.ts","size":9373,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/de.ts","size":10556,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/es.ts","size":10094,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/fr.ts","size":11042,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/he.ts","size":9106,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/hr.ts","size":9915,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/is.ts","size":10096,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/it.ts","size":10520,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/ja.ts","size":8949,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/ko.ts","size":8445,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/nl.ts","size":10026,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/no.ts","size":10202,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/pl.ts","size":9741,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/pt.ts","size":9895,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/ru.ts","size":11067,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/sk.ts","size":9783,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/uk.ts","size":10730,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/vi.ts","size":9771,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/zh.ts","size":8423,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/zh-tw.ts","size":8463,"chunks":["9eaffe2"]},{"name":"./src/i18n/index.ts","size":0,"chunks":["9eaffe2"]},{"name":"./src/schema/inlineContent/createSpec.ts","size":3784,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/insertBlocks/insertBlocks.ts","size":849,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/replaceBlocks/replaceBlocks.ts","size":1940,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/html/util/serializeBlocksExternalHTML.ts","size":7444,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/html/externalHTMLExporter.ts","size":886,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/html/util/serializeBlocksInternalHTML.ts","size":4914,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/html/internalHTMLSerializer.ts","size":288,"chunks":["a1ee98a"]},{"name":"./src/api/getBlocksChangedByTransaction.ts","size":6577,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/moveBlocks/moveBlocks.ts","size":5706,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/nestBlock/nestBlock.ts","size":2067,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/getBlock/getBlock.ts","size":2087,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/insertContentAt.ts","size":1049,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/selections/selection.ts","size":5301,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/selections/textCursorPosition.ts","size":2606,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/markdown/removeUnderlinesRehypePlugin.ts","size":752,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/markdown/util/addSpacesToCheckboxesRehypePlugin.ts","size":775,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/markdown/markdownExporter.ts","size":646,"chunks":["a1ee98a"]},{"name":"./src/api/parsers/html/util/nestedLists.ts","size":2174,"chunks":["a1ee98a"]},{"name":"./src/api/parsers/html/parseHTML.ts","size":439,"chunks":["a1ee98a"]},{"name":"./src/api/parsers/markdown/parseMarkdown.ts","size":1067,"chunks":["a1ee98a"]},{"name":"./src/style.css","size":0,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/acceptedMIMETypes.ts","size":134,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/handleFileInsertion.ts","size":4178,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/fileDropExtension.ts","size":884,"chunks":["a1ee98a"]},{"name":"./src/api/parsers/markdown/detectMarkdown.ts","size":1140,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/handleVSCodePaste.ts","size":661,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/pasteExtension.ts","size":2412,"chunks":["a1ee98a"]},{"name":"./src/api/nodeConversions/fragmentToBlocks.ts","size":677,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/toClipboard/copyExtension.ts","size":5191,"chunks":["a1ee98a"]},{"name":"./src/extensions/BackgroundColor/BackgroundColorExtension.ts","size":308,"chunks":["a1ee98a"]},{"name":"./src/extensions/BlockChange/BlockChangePlugin.ts","size":1064,"chunks":["a1ee98a"]},{"name":"./src/extensions/Collaboration/CursorPlugin.ts","size":4715,"chunks":["a1ee98a"]},{"name":"./src/extensions/Collaboration/SyncPlugin.ts","size":260,"chunks":["a1ee98a"]},{"name":"./src/extensions/Collaboration/UndoPlugin.ts","size":281,"chunks":["a1ee98a"]},{"name":"./src/extensions/Collaboration/ForkYDocPlugin.ts","size":4323,"chunks":["a1ee98a"]},{"name":"./src/extensions/Collaboration/schemaMigration/migrationRules/moveColorAttributes.ts","size":1403,"chunks":["a1ee98a"]},{"name":"./src/extensions/Collaboration/schemaMigration/migrationRules/index.ts","size":45,"chunks":["a1ee98a"]},{"name":"./src/extensions/Collaboration/schemaMigration/SchemaMigrationPlugin.ts","size":882,"chunks":["a1ee98a"]},{"name":"./src/extensions/Comments/CommentMark.ts","size":1428,"chunks":["a1ee98a"]},{"name":"./src/extensions/Comments/userstore/UserStore.ts","size":1370,"chunks":["a1ee98a"]},{"name":"./src/extensions/Comments/CommentsPlugin.ts","size":7904,"chunks":["a1ee98a"]},{"name":"./src/extensions/FilePanel/FilePanelPlugin.ts","size":4151,"chunks":["a1ee98a"]},{"name":"./src/extensions/FormattingToolbar/FormattingToolbarPlugin.ts","size":7068,"chunks":["a1ee98a"]},{"name":"./src/extensions/HardBreak/HardBreak.ts","size":376,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/mergeBlocks/mergeBlocks.ts","size":3292,"chunks":["a1ee98a"]},{"name":"./src/extensions/KeyboardShortcuts/KeyboardShortcutsExtension.ts","size":18593,"chunks":["a1ee98a"]},{"name":"./src/extensions/LinkToolbar/LinkToolbarPlugin.ts","size":7731,"chunks":["a1ee98a"]},{"name":"./src/extensions/LinkToolbar/protocols.ts","size":172,"chunks":["a1ee98a"]},{"name":"./src/extensions/NodeSelectionKeyboard/NodeSelectionKeyboardPlugin.ts","size":1383,"chunks":["a1ee98a"]},{"name":"./src/extensions/Placeholder/PlaceholderPlugin.ts","size":3925,"chunks":["a1ee98a"]},{"name":"./src/extensions/PreviousBlockType/PreviousBlockTypePlugin.ts","size":4843,"chunks":["a1ee98a"]},{"name":"./src/extensions/ShowSelection/ShowSelectionPlugin.ts","size":1059,"chunks":["a1ee98a"]},{"name":"./src/extensions/getDraggableBlockFromElement.ts","size":404,"chunks":["a1ee98a"]},{"name":"./src/extensions/SideMenu/MultipleNodeSelection.ts","size":1700,"chunks":["a1ee98a"]},{"name":"./src/extensions/SideMenu/dragging.ts","size":4734,"chunks":["a1ee98a"]},{"name":"./src/extensions/SideMenu/SideMenuPlugin.ts","size":16706,"chunks":["a1ee98a"]},{"name":"./src/api/positionMapping.ts","size":1639,"chunks":["a1ee98a"]},{"name":"./src/extensions/SuggestionMenu/SuggestionPlugin.ts","size":9262,"chunks":["a1ee98a"]},{"name":"./src/extensions/Suggestions/SuggestionMarks.ts","size":4452,"chunks":["a1ee98a"]},{"name":"./src/extensions/TableHandles/TableHandlesPlugin.ts","size":27647,"chunks":["a1ee98a"]},{"name":"./src/extensions/TextAlignment/TextAlignmentExtension.ts","size":936,"chunks":["a1ee98a"]},{"name":"./src/extensions/TextColor/TextColorExtension.ts","size":293,"chunks":["a1ee98a"]},{"name":"./src/extensions/TrailingNode/TrailingNodeExtension.ts","size":1563,"chunks":["a1ee98a"]},{"name":"./src/pm-nodes/BlockContainer.ts","size":2186,"chunks":["a1ee98a"]},{"name":"./src/pm-nodes/BlockGroup.ts","size":1162,"chunks":["a1ee98a"]},{"name":"./src/pm-nodes/Doc.ts","size":134,"chunks":["a1ee98a"]},{"name":"./src/editor/BlockNoteExtensions.ts","size":5410,"chunks":["a1ee98a"]},{"name":"./src/editor/transformPasted.ts","size":2620,"chunks":["a1ee98a"]},{"name":"./src/editor/BlockNoteEditor.ts","size":39461,"chunks":["a1ee98a"]},{"name":"./src/exporter/Exporter.ts","size":1101,"chunks":["a1ee98a"]},{"name":"./src/exporter/mapping.ts","size":197,"chunks":["a1ee98a"]},{"name":"./src/extensions/SuggestionMenu/getDefaultEmojiPickerItems.ts","size":1296,"chunks":["a1ee98a"]},{"name":"./src/util/combineByGroup.ts","size":550,"chunks":["a1ee98a"]},{"name":"./src/index.ts","size":0,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/en.ts","size":9415,"chunks":["a1e239a"]},{"name":"./src/extensions/UniqueID/UniqueID.ts","size":8905,"chunks":["7515671"]},{"name":"./src/schema/inlineContent/types.ts","size":302,"chunks":["7515671"]},{"name":"./src/util/table.ts","size":1212,"chunks":["7515671"]},{"name":"./src/util/typescript.ts","size":331,"chunks":["7515671"]},{"name":"./src/util/browser.ts","size":643,"chunks":["7515671"]},{"name":"./src/blocks/defaultBlockHelpers.ts","size":2103,"chunks":["7515671"]},{"name":"./src/util/string.ts","size":299,"chunks":["7515671"]},{"name":"./src/schema/blocks/internal.ts","size":3387,"chunks":["7515671"]},{"name":"./src/schema/blocks/createSpec.ts","size":6635,"chunks":["7515671"]},{"name":"./src/api/getBlockInfoFromPos.ts","size":3797,"chunks":["7515671"]},{"name":"./src/api/pmUtil.ts","size":651,"chunks":["7515671"]},{"name":"./src/api/nodeConversions/nodeToBlock.ts","size":13005,"chunks":["7515671"]},{"name":"./src/schema/inlineContent/internal.ts","size":1428,"chunks":["7515671"]},{"name":"./src/schema/styles/internal.ts","size":2909,"chunks":["7515671"]},{"name":"./src/schema/styles/createSpec.ts","size":2276,"chunks":["7515671"]},{"name":"./src/util/topo-sort.ts","size":2271,"chunks":["7515671"]},{"name":"./src/schema/schema.ts","size":3360,"chunks":["7515671"]},{"name":"./src/api/blockManipulation/tables/tables.ts","size":10346,"chunks":["7515671"]},{"name":"./src/api/nodeConversions/blockToNode.ts","size":7193,"chunks":["7515671"]},{"name":"./src/api/nodeUtil.ts","size":549,"chunks":["7515671"]},{"name":"./src/api/blockManipulation/commands/updateBlock/updateBlock.ts","size":8371,"chunks":["7515671"]},{"name":"./src/editor/defaultColors.ts","size":1193,"chunks":["7515671"]},{"name":"./src/blocks/defaultProps.ts","size":3350,"chunks":["7515671"]},{"name":"./src/blocks/File/helpers/parse/parseFigureElement.ts","size":342,"chunks":["7515671"]},{"name":"./src/blocks/File/helpers/render/createAddFileButton.ts","size":1809,"chunks":["7515671"]},{"name":"./src/blocks/File/helpers/render/createFileNameWithIcon.ts","size":753,"chunks":["7515671"]},{"name":"./src/blocks/File/helpers/render/createFileBlockWrapper.ts","size":1374,"chunks":["7515671"]},{"name":"./src/blocks/File/helpers/toExternalHTML/createFigureWithCaption.ts","size":307,"chunks":["7515671"]},{"name":"./src/blocks/File/helpers/toExternalHTML/createLinkWithCaption.ts","size":294,"chunks":["7515671"]},{"name":"./src/blocks/Audio/parseAudioElement.ts","size":108,"chunks":["7515671"]},{"name":"./src/blocks/Audio/block.ts","size":3593,"chunks":["7515671"]},{"name":"./src/util/EventEmitter.ts","size":744,"chunks":["7515671"]},{"name":"./src/editor/BlockNoteExtension.ts","size":1873,"chunks":["7515671"]},{"name":"./src/blocks/Code/shiki.ts","size":1699,"chunks":["7515671"]},{"name":"./src/blocks/Code/block.ts","size":6492,"chunks":["7515671"]},{"name":"./src/blocks/File/helpers/parse/parseEmbedElement.ts","size":108,"chunks":["7515671"]},{"name":"./src/blocks/File/block.ts","size":1766,"chunks":["7515671"]},{"name":"./src/blocks/ToggleWrapper/createToggleWrapper.ts","size":5207,"chunks":["7515671"]},{"name":"./src/blocks/Heading/block.ts","size":2639,"chunks":["7515671"]},{"name":"./src/blocks/File/helpers/render/createResizableFileBlockWrapper.ts","size":6266,"chunks":["7515671"]},{"name":"./src/blocks/Image/parseImageElement.ts","size":224,"chunks":["7515671"]},{"name":"./src/blocks/Image/block.ts","size":3777,"chunks":["7515671"]},{"name":"./src/api/blockManipulation/commands/splitBlock/splitBlock.ts","size":909,"chunks":["7515671"]},{"name":"./src/blocks/utils/listItemEnterHandler.ts","size":880,"chunks":["7515671"]},{"name":"./src/blocks/ListItem/getListItemContent.ts","size":1425,"chunks":["7515671"]},{"name":"./src/blocks/ListItem/BulletListItem/block.ts","size":2186,"chunks":["7515671"]},{"name":"./src/blocks/ListItem/CheckListItem/block.ts","size":3824,"chunks":["7515671"]},{"name":"./src/blocks/ListItem/NumberedListItem/IndexingPlugin.ts","size":3124,"chunks":["7515671"]},{"name":"./src/blocks/ListItem/NumberedListItem/block.ts","size":2718,"chunks":["7515671"]},{"name":"./src/blocks/ListItem/ToggleListItem/block.ts","size":1458,"chunks":["7515671"]},{"name":"./src/blocks/PageBreak/block.ts","size":883,"chunks":["7515671"]},{"name":"./src/blocks/Paragraph/block.ts","size":1337,"chunks":["7515671"]},{"name":"./src/blocks/Quote/block.ts","size":1654,"chunks":["7515671"]},{"name":"./src/blocks/Table/TableExtension.ts","size":2297,"chunks":["7515671"]},{"name":"./src/blocks/Table/block.ts","size":8298,"chunks":["7515671"]},{"name":"./src/blocks/Video/parseVideoElement.ts","size":175,"chunks":["7515671"]},{"name":"./src/blocks/Video/block.ts","size":3577,"chunks":["7515671"]},{"name":"./src/blocks/File/helpers/uploadToTmpFilesDotOrg_DEV_ONLY.ts","size":316,"chunks":["7515671"]},{"name":"./src/blocks/defaultBlockTypeGuards.ts","size":2213,"chunks":["7515671"]},{"name":"./src/extensions/SuggestionMenu/getDefaultSlashMenuItems.ts","size":8782,"chunks":["7515671"]},{"name":"./src/blocks/PageBreak/getPageBreakSlashMenuItems.ts","size":447,"chunks":["7515671"]},{"name":"./src/blocks/defaultBlocks.ts","size":2814,"chunks":["7515671"]},{"name":"./src/blocks/BlockNoteSchema.ts","size":330,"chunks":["7515671"]}]}
|
|
1
|
+
{"builtAt":1759218461976,"assets":[{"name":"blocks.cjs","size":3743},{"name":"comments.cjs","size":11826},{"name":"locales.cjs","size":158539},{"name":"blocknote.cjs","size":131574},{"name":"en-D3B48eJ7.cjs","size":6630},{"name":"BlockNoteSchema-DmZ6UQfY.cjs","size":83376},{"name":"en-D3B48eJ7.cjs.map","size":14973},{"name":"BlockNoteSchema-DmZ6UQfY.cjs.map","size":409974},{"name":"blocks.cjs.map","size":91},{"name":"comments.cjs.map","size":47628},{"name":"locales.cjs.map","size":326303},{"name":"blocknote.cjs.map","size":581176}],"chunks":[{"id":"c90dbef","entry":true,"initial":true,"files":["blocks.cjs"],"names":["blocks"]},{"id":"1627b02","entry":true,"initial":true,"files":["comments.cjs"],"names":["comments"]},{"id":"9eaffe2","entry":true,"initial":true,"files":["locales.cjs"],"names":["locales"]},{"id":"a1ee98a","entry":true,"initial":true,"files":["blocknote.cjs"],"names":["blocknote"]},{"id":"a1e239a","entry":false,"initial":true,"files":["en-D3B48eJ7.cjs"],"names":["en"]},{"id":"7515671","entry":false,"initial":true,"files":["BlockNoteSchema-DmZ6UQfY.cjs"],"names":["BlockNoteSchema"]}],"modules":[{"name":"./src/blocks/index.ts","size":0,"chunks":["c90dbef"]},{"name":"./src/comments/threadstore/ThreadStoreAuth.ts","size":25,"chunks":["1627b02"]},{"name":"./src/comments/threadstore/DefaultThreadStoreAuth.ts","size":2014,"chunks":["1627b02"]},{"name":"./src/comments/threadstore/ThreadStore.ts","size":77,"chunks":["1627b02"]},{"name":"./src/comments/threadstore/TipTapThreadStore.ts","size":5321,"chunks":["1627b02"]},{"name":"./src/comments/threadstore/yjs/yjsHelpers.ts","size":3002,"chunks":["1627b02"]},{"name":"./src/comments/threadstore/yjs/YjsThreadStoreBase.ts","size":790,"chunks":["1627b02"]},{"name":"./src/comments/threadstore/yjs/RESTYjsThreadStore.ts","size":2069,"chunks":["1627b02"]},{"name":"./src/comments/threadstore/yjs/YjsThreadStore.ts","size":7267,"chunks":["1627b02"]},{"name":"./src/comments/index.ts","size":0,"chunks":["1627b02"]},{"name":"./src/i18n/locales/ar.ts","size":9373,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/de.ts","size":10556,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/es.ts","size":10094,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/fr.ts","size":11042,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/he.ts","size":9106,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/hr.ts","size":9915,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/is.ts","size":10096,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/it.ts","size":10520,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/ja.ts","size":8949,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/ko.ts","size":8445,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/nl.ts","size":10026,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/no.ts","size":10202,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/pl.ts","size":9741,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/pt.ts","size":9895,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/ru.ts","size":11067,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/sk.ts","size":9783,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/uk.ts","size":10730,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/vi.ts","size":9771,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/zh.ts","size":8423,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/zh-tw.ts","size":8463,"chunks":["9eaffe2"]},{"name":"./src/i18n/index.ts","size":0,"chunks":["9eaffe2"]},{"name":"./src/schema/inlineContent/createSpec.ts","size":3784,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/insertBlocks/insertBlocks.ts","size":849,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/replaceBlocks/replaceBlocks.ts","size":1940,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/html/util/serializeBlocksExternalHTML.ts","size":7444,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/html/externalHTMLExporter.ts","size":886,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/html/util/serializeBlocksInternalHTML.ts","size":4914,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/html/internalHTMLSerializer.ts","size":288,"chunks":["a1ee98a"]},{"name":"./src/api/getBlocksChangedByTransaction.ts","size":6577,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/moveBlocks/moveBlocks.ts","size":5706,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/nestBlock/nestBlock.ts","size":2067,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/getBlock/getBlock.ts","size":2087,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/insertContentAt.ts","size":1049,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/selections/selection.ts","size":5301,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/selections/textCursorPosition.ts","size":2606,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/markdown/removeUnderlinesRehypePlugin.ts","size":752,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/markdown/util/addSpacesToCheckboxesRehypePlugin.ts","size":775,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/markdown/markdownExporter.ts","size":646,"chunks":["a1ee98a"]},{"name":"./src/api/parsers/html/util/nestedLists.ts","size":2174,"chunks":["a1ee98a"]},{"name":"./src/api/parsers/html/parseHTML.ts","size":439,"chunks":["a1ee98a"]},{"name":"./src/api/parsers/markdown/parseMarkdown.ts","size":1067,"chunks":["a1ee98a"]},{"name":"./src/style.css","size":0,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/acceptedMIMETypes.ts","size":134,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/handleFileInsertion.ts","size":4176,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/fileDropExtension.ts","size":884,"chunks":["a1ee98a"]},{"name":"./src/api/parsers/markdown/detectMarkdown.ts","size":1140,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/handleVSCodePaste.ts","size":661,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/pasteExtension.ts","size":2412,"chunks":["a1ee98a"]},{"name":"./src/api/nodeConversions/fragmentToBlocks.ts","size":677,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/toClipboard/copyExtension.ts","size":5191,"chunks":["a1ee98a"]},{"name":"./src/extensions/BackgroundColor/BackgroundColorExtension.ts","size":308,"chunks":["a1ee98a"]},{"name":"./src/extensions/BlockChange/BlockChangePlugin.ts","size":1064,"chunks":["a1ee98a"]},{"name":"./src/extensions/Collaboration/CursorPlugin.ts","size":4715,"chunks":["a1ee98a"]},{"name":"./src/extensions/Collaboration/SyncPlugin.ts","size":260,"chunks":["a1ee98a"]},{"name":"./src/extensions/Collaboration/UndoPlugin.ts","size":281,"chunks":["a1ee98a"]},{"name":"./src/extensions/Collaboration/ForkYDocPlugin.ts","size":4323,"chunks":["a1ee98a"]},{"name":"./src/extensions/Collaboration/schemaMigration/migrationRules/moveColorAttributes.ts","size":1403,"chunks":["a1ee98a"]},{"name":"./src/extensions/Collaboration/schemaMigration/migrationRules/index.ts","size":45,"chunks":["a1ee98a"]},{"name":"./src/extensions/Collaboration/schemaMigration/SchemaMigrationPlugin.ts","size":882,"chunks":["a1ee98a"]},{"name":"./src/extensions/Comments/CommentMark.ts","size":1428,"chunks":["a1ee98a"]},{"name":"./src/extensions/Comments/userstore/UserStore.ts","size":1370,"chunks":["a1ee98a"]},{"name":"./src/extensions/Comments/CommentsPlugin.ts","size":7904,"chunks":["a1ee98a"]},{"name":"./src/extensions/FilePanel/FilePanelPlugin.ts","size":4151,"chunks":["a1ee98a"]},{"name":"./src/extensions/FormattingToolbar/FormattingToolbarPlugin.ts","size":7068,"chunks":["a1ee98a"]},{"name":"./src/extensions/HardBreak/HardBreak.ts","size":376,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/mergeBlocks/mergeBlocks.ts","size":3292,"chunks":["a1ee98a"]},{"name":"./src/extensions/KeyboardShortcuts/KeyboardShortcutsExtension.ts","size":18593,"chunks":["a1ee98a"]},{"name":"./src/extensions/LinkToolbar/LinkToolbarPlugin.ts","size":7731,"chunks":["a1ee98a"]},{"name":"./src/extensions/LinkToolbar/protocols.ts","size":172,"chunks":["a1ee98a"]},{"name":"./src/extensions/NodeSelectionKeyboard/NodeSelectionKeyboardPlugin.ts","size":1383,"chunks":["a1ee98a"]},{"name":"./src/extensions/Placeholder/PlaceholderPlugin.ts","size":3813,"chunks":["a1ee98a"]},{"name":"./src/extensions/PreviousBlockType/PreviousBlockTypePlugin.ts","size":4843,"chunks":["a1ee98a"]},{"name":"./src/extensions/ShowSelection/ShowSelectionPlugin.ts","size":1059,"chunks":["a1ee98a"]},{"name":"./src/extensions/getDraggableBlockFromElement.ts","size":404,"chunks":["a1ee98a"]},{"name":"./src/extensions/SideMenu/MultipleNodeSelection.ts","size":1700,"chunks":["a1ee98a"]},{"name":"./src/extensions/SideMenu/dragging.ts","size":4744,"chunks":["a1ee98a"]},{"name":"./src/extensions/SideMenu/SideMenuPlugin.ts","size":16659,"chunks":["a1ee98a"]},{"name":"./src/api/positionMapping.ts","size":1639,"chunks":["a1ee98a"]},{"name":"./src/extensions/SuggestionMenu/SuggestionPlugin.ts","size":9266,"chunks":["a1ee98a"]},{"name":"./src/extensions/Suggestions/SuggestionMarks.ts","size":4452,"chunks":["a1ee98a"]},{"name":"./src/extensions/TableHandles/TableHandlesPlugin.ts","size":27500,"chunks":["a1ee98a"]},{"name":"./src/extensions/TextAlignment/TextAlignmentExtension.ts","size":936,"chunks":["a1ee98a"]},{"name":"./src/extensions/TextColor/TextColorExtension.ts","size":293,"chunks":["a1ee98a"]},{"name":"./src/extensions/TrailingNode/TrailingNodeExtension.ts","size":1563,"chunks":["a1ee98a"]},{"name":"./src/pm-nodes/BlockContainer.ts","size":2186,"chunks":["a1ee98a"]},{"name":"./src/pm-nodes/BlockGroup.ts","size":1162,"chunks":["a1ee98a"]},{"name":"./src/pm-nodes/Doc.ts","size":134,"chunks":["a1ee98a"]},{"name":"./src/editor/BlockNoteExtensions.ts","size":5410,"chunks":["a1ee98a"]},{"name":"./src/editor/transformPasted.ts","size":2620,"chunks":["a1ee98a"]},{"name":"./src/editor/BlockNoteEditor.ts","size":39511,"chunks":["a1ee98a"]},{"name":"./src/exporter/Exporter.ts","size":1101,"chunks":["a1ee98a"]},{"name":"./src/exporter/mapping.ts","size":197,"chunks":["a1ee98a"]},{"name":"./src/extensions/SuggestionMenu/getDefaultEmojiPickerItems.ts","size":1296,"chunks":["a1ee98a"]},{"name":"./src/util/combineByGroup.ts","size":550,"chunks":["a1ee98a"]},{"name":"./src/index.ts","size":0,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/en.ts","size":9415,"chunks":["a1e239a"]},{"name":"./src/extensions/UniqueID/UniqueID.ts","size":8905,"chunks":["7515671"]},{"name":"./src/schema/inlineContent/types.ts","size":302,"chunks":["7515671"]},{"name":"./src/util/table.ts","size":1212,"chunks":["7515671"]},{"name":"./src/util/typescript.ts","size":331,"chunks":["7515671"]},{"name":"./src/util/browser.ts","size":643,"chunks":["7515671"]},{"name":"./src/blocks/defaultBlockHelpers.ts","size":2103,"chunks":["7515671"]},{"name":"./src/util/string.ts","size":299,"chunks":["7515671"]},{"name":"./src/schema/blocks/internal.ts","size":3387,"chunks":["7515671"]},{"name":"./src/schema/blocks/createSpec.ts","size":6635,"chunks":["7515671"]},{"name":"./src/api/getBlockInfoFromPos.ts","size":3797,"chunks":["7515671"]},{"name":"./src/api/pmUtil.ts","size":651,"chunks":["7515671"]},{"name":"./src/api/nodeConversions/nodeToBlock.ts","size":13005,"chunks":["7515671"]},{"name":"./src/schema/inlineContent/internal.ts","size":1428,"chunks":["7515671"]},{"name":"./src/schema/styles/internal.ts","size":2909,"chunks":["7515671"]},{"name":"./src/schema/styles/createSpec.ts","size":2276,"chunks":["7515671"]},{"name":"./src/util/topo-sort.ts","size":2271,"chunks":["7515671"]},{"name":"./src/schema/schema.ts","size":3360,"chunks":["7515671"]},{"name":"./src/api/blockManipulation/tables/tables.ts","size":10346,"chunks":["7515671"]},{"name":"./src/api/nodeConversions/blockToNode.ts","size":7193,"chunks":["7515671"]},{"name":"./src/api/nodeUtil.ts","size":549,"chunks":["7515671"]},{"name":"./src/api/blockManipulation/commands/updateBlock/updateBlock.ts","size":8371,"chunks":["7515671"]},{"name":"./src/editor/defaultColors.ts","size":1193,"chunks":["7515671"]},{"name":"./src/blocks/defaultProps.ts","size":3350,"chunks":["7515671"]},{"name":"./src/blocks/File/helpers/parse/parseFigureElement.ts","size":342,"chunks":["7515671"]},{"name":"./src/blocks/File/helpers/render/createAddFileButton.ts","size":1809,"chunks":["7515671"]},{"name":"./src/blocks/File/helpers/render/createFileNameWithIcon.ts","size":753,"chunks":["7515671"]},{"name":"./src/blocks/File/helpers/render/createFileBlockWrapper.ts","size":1374,"chunks":["7515671"]},{"name":"./src/blocks/File/helpers/toExternalHTML/createFigureWithCaption.ts","size":307,"chunks":["7515671"]},{"name":"./src/blocks/File/helpers/toExternalHTML/createLinkWithCaption.ts","size":294,"chunks":["7515671"]},{"name":"./src/blocks/Audio/parseAudioElement.ts","size":108,"chunks":["7515671"]},{"name":"./src/blocks/Audio/block.ts","size":3593,"chunks":["7515671"]},{"name":"./src/util/EventEmitter.ts","size":744,"chunks":["7515671"]},{"name":"./src/editor/BlockNoteExtension.ts","size":1873,"chunks":["7515671"]},{"name":"./src/blocks/Code/shiki.ts","size":1699,"chunks":["7515671"]},{"name":"./src/blocks/Code/block.ts","size":6492,"chunks":["7515671"]},{"name":"./src/blocks/File/helpers/parse/parseEmbedElement.ts","size":108,"chunks":["7515671"]},{"name":"./src/blocks/File/block.ts","size":1766,"chunks":["7515671"]},{"name":"./src/blocks/ToggleWrapper/createToggleWrapper.ts","size":5207,"chunks":["7515671"]},{"name":"./src/blocks/Heading/block.ts","size":2639,"chunks":["7515671"]},{"name":"./src/blocks/File/helpers/render/createResizableFileBlockWrapper.ts","size":6266,"chunks":["7515671"]},{"name":"./src/blocks/Image/parseImageElement.ts","size":224,"chunks":["7515671"]},{"name":"./src/blocks/Image/block.ts","size":3777,"chunks":["7515671"]},{"name":"./src/api/blockManipulation/commands/splitBlock/splitBlock.ts","size":909,"chunks":["7515671"]},{"name":"./src/blocks/utils/listItemEnterHandler.ts","size":880,"chunks":["7515671"]},{"name":"./src/blocks/ListItem/getListItemContent.ts","size":1425,"chunks":["7515671"]},{"name":"./src/blocks/ListItem/BulletListItem/block.ts","size":2186,"chunks":["7515671"]},{"name":"./src/blocks/ListItem/CheckListItem/block.ts","size":3824,"chunks":["7515671"]},{"name":"./src/blocks/ListItem/NumberedListItem/IndexingPlugin.ts","size":3124,"chunks":["7515671"]},{"name":"./src/blocks/ListItem/NumberedListItem/block.ts","size":2718,"chunks":["7515671"]},{"name":"./src/blocks/ListItem/ToggleListItem/block.ts","size":1458,"chunks":["7515671"]},{"name":"./src/blocks/PageBreak/block.ts","size":883,"chunks":["7515671"]},{"name":"./src/blocks/Paragraph/block.ts","size":1337,"chunks":["7515671"]},{"name":"./src/blocks/Quote/block.ts","size":1654,"chunks":["7515671"]},{"name":"./src/blocks/Table/TableExtension.ts","size":2297,"chunks":["7515671"]},{"name":"./src/blocks/Table/block.ts","size":8298,"chunks":["7515671"]},{"name":"./src/blocks/Video/parseVideoElement.ts","size":175,"chunks":["7515671"]},{"name":"./src/blocks/Video/block.ts","size":3577,"chunks":["7515671"]},{"name":"./src/blocks/File/helpers/uploadToTmpFilesDotOrg_DEV_ONLY.ts","size":316,"chunks":["7515671"]},{"name":"./src/blocks/defaultBlockTypeGuards.ts","size":2213,"chunks":["7515671"]},{"name":"./src/extensions/SuggestionMenu/getDefaultSlashMenuItems.ts","size":8782,"chunks":["7515671"]},{"name":"./src/blocks/PageBreak/getPageBreakSlashMenuItems.ts","size":447,"chunks":["7515671"]},{"name":"./src/blocks/defaultBlocks.ts","size":2814,"chunks":["7515671"]},{"name":"./src/blocks/BlockNoteSchema.ts","size":330,"chunks":["7515671"]}]}
|
package/package.json
CHANGED
|
@@ -152,7 +152,7 @@ export async function handleFileInsertion<
|
|
|
152
152
|
top: (event as DragEvent).clientY,
|
|
153
153
|
};
|
|
154
154
|
|
|
155
|
-
const pos = editor.prosemirrorView
|
|
155
|
+
const pos = editor.prosemirrorView.posAtCoords(coords);
|
|
156
156
|
|
|
157
157
|
if (!pos) {
|
|
158
158
|
return;
|
|
@@ -160,7 +160,7 @@ export async function handleFileInsertion<
|
|
|
160
160
|
|
|
161
161
|
insertedBlockId = editor.transact((tr) => {
|
|
162
162
|
const posInfo = getNearestBlockPos(tr.doc, pos.pos);
|
|
163
|
-
const blockElement = editor.prosemirrorView
|
|
163
|
+
const blockElement = editor.prosemirrorView.dom.querySelector(
|
|
164
164
|
`[data-id="${posInfo.node.attrs.id}"]`,
|
|
165
165
|
);
|
|
166
166
|
|
|
@@ -3,6 +3,7 @@ import {
|
|
|
3
3
|
createDocument,
|
|
4
4
|
EditorOptions,
|
|
5
5
|
Extension,
|
|
6
|
+
FocusPosition,
|
|
6
7
|
getSchema,
|
|
7
8
|
InputRule,
|
|
8
9
|
isNodeSelection,
|
|
@@ -156,6 +157,13 @@ export type BlockNoteEditorOptions<
|
|
|
156
157
|
*/
|
|
157
158
|
animations?: boolean;
|
|
158
159
|
|
|
160
|
+
/**
|
|
161
|
+
* Whether the editor should be focused automatically when it's created.
|
|
162
|
+
*
|
|
163
|
+
* @default false
|
|
164
|
+
*/
|
|
165
|
+
autofocus?: FocusPosition;
|
|
166
|
+
|
|
159
167
|
/**
|
|
160
168
|
* When enabled, allows for collaboration between multiple users.
|
|
161
169
|
* See [Real-time Collaboration](https://www.blocknotejs.org/docs/advanced/real-time-collaboration) for more info.
|
|
@@ -433,7 +441,9 @@ export type BlockNoteEditorOptions<
|
|
|
433
441
|
/**
|
|
434
442
|
* Register extensions to the editor.
|
|
435
443
|
*
|
|
436
|
-
*
|
|
444
|
+
* See [Extensions](/docs/features/extensions) for more info.
|
|
445
|
+
*
|
|
446
|
+
* @remarks `BlockNoteExtension[]`
|
|
437
447
|
*/
|
|
438
448
|
extensions?: Array<BlockNoteExtension | BlockNoteExtensionFactory>;
|
|
439
449
|
};
|
|
@@ -794,29 +804,31 @@ export class BlockNoteEditor<
|
|
|
794
804
|
editor: this,
|
|
795
805
|
});
|
|
796
806
|
if (replaceWith) {
|
|
797
|
-
const
|
|
798
|
-
|
|
799
|
-
);
|
|
807
|
+
const cursorPosition =
|
|
808
|
+
this.getTextCursorPosition();
|
|
800
809
|
|
|
801
|
-
// TODO this is weird, why do we need it?
|
|
802
810
|
if (
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
811
|
+
this.schema.blockSchema[
|
|
812
|
+
cursorPosition.block.type
|
|
813
|
+
].content !== "inline"
|
|
806
814
|
) {
|
|
807
|
-
const tr = state.tr.deleteRange(
|
|
808
|
-
range.from,
|
|
809
|
-
range.to,
|
|
810
|
-
);
|
|
811
|
-
updateBlockTr(
|
|
812
|
-
tr,
|
|
813
|
-
blockInfo.bnBlock.beforePos,
|
|
814
|
-
replaceWith,
|
|
815
|
-
range.from,
|
|
816
|
-
range.to,
|
|
817
|
-
);
|
|
818
815
|
return undefined;
|
|
819
816
|
}
|
|
817
|
+
|
|
818
|
+
const blockInfo = getBlockInfoFromTransaction(
|
|
819
|
+
state.tr,
|
|
820
|
+
);
|
|
821
|
+
const tr = state.tr.deleteRange(
|
|
822
|
+
range.from,
|
|
823
|
+
range.to,
|
|
824
|
+
);
|
|
825
|
+
|
|
826
|
+
updateBlockTr(
|
|
827
|
+
tr,
|
|
828
|
+
blockInfo.bnBlock.beforePos,
|
|
829
|
+
replaceWith,
|
|
830
|
+
);
|
|
831
|
+
return undefined;
|
|
820
832
|
}
|
|
821
833
|
return null;
|
|
822
834
|
},
|
|
@@ -846,6 +858,7 @@ export class BlockNoteEditor<
|
|
|
846
858
|
...blockNoteTipTapOptions,
|
|
847
859
|
...newOptions._tiptapOptions,
|
|
848
860
|
element: null,
|
|
861
|
+
autofocus: newOptions.autofocus ?? false,
|
|
849
862
|
extensions: tiptapExtensions,
|
|
850
863
|
editorProps: {
|
|
851
864
|
...newOptions._tiptapOptions?.editorProps,
|
|
@@ -32,10 +32,10 @@ export class PlaceholderPlugin extends BlockNoteExtension {
|
|
|
32
32
|
styleEl.setAttribute("nonce", nonce);
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
if (
|
|
36
|
-
|
|
35
|
+
if (view.root instanceof window.ShadowRoot) {
|
|
36
|
+
view.root.append(styleEl);
|
|
37
37
|
} else {
|
|
38
|
-
|
|
38
|
+
view.root.head.appendChild(styleEl);
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
const styleSheet = styleEl.sheet!;
|
|
@@ -88,10 +88,10 @@ export class PlaceholderPlugin extends BlockNoteExtension {
|
|
|
88
88
|
|
|
89
89
|
return {
|
|
90
90
|
destroy: () => {
|
|
91
|
-
if (
|
|
92
|
-
|
|
91
|
+
if (view.root instanceof window.ShadowRoot) {
|
|
92
|
+
view.root.removeChild(styleEl);
|
|
93
93
|
} else {
|
|
94
|
-
|
|
94
|
+
view.root.head.removeChild(styleEl);
|
|
95
95
|
}
|
|
96
96
|
},
|
|
97
97
|
};
|
|
@@ -733,9 +733,7 @@ export class SideMenuProsemirrorPlugin<
|
|
|
733
733
|
* Handles drag & drop events for blocks.
|
|
734
734
|
*/
|
|
735
735
|
blockDragEnd = () => {
|
|
736
|
-
|
|
737
|
-
unsetDragImage(this.editor.prosemirrorView.root);
|
|
738
|
-
}
|
|
736
|
+
unsetDragImage(this.editor.prosemirrorView.root);
|
|
739
737
|
|
|
740
738
|
if (this.view) {
|
|
741
739
|
this.view.isDragOrigin = false;
|
|
@@ -159,10 +159,10 @@ export function dragStart<
|
|
|
159
159
|
return;
|
|
160
160
|
}
|
|
161
161
|
|
|
162
|
-
|
|
163
|
-
if (!view) {
|
|
162
|
+
if (editor.headless) {
|
|
164
163
|
return;
|
|
165
164
|
}
|
|
165
|
+
const view = editor.prosemirrorView;
|
|
166
166
|
|
|
167
167
|
const posInfo = getNodeById(block.id, view.state.doc);
|
|
168
168
|
if (!posInfo) {
|
|
@@ -32,6 +32,7 @@ class SuggestionMenuView<
|
|
|
32
32
|
constructor(
|
|
33
33
|
private readonly editor: BlockNoteEditor<BSchema, I, S>,
|
|
34
34
|
emitUpdate: (menuName: string, state: SuggestionMenuState) => void,
|
|
35
|
+
view: EditorView,
|
|
35
36
|
) {
|
|
36
37
|
this.pluginState = undefined;
|
|
37
38
|
|
|
@@ -46,7 +47,7 @@ class SuggestionMenuView<
|
|
|
46
47
|
});
|
|
47
48
|
};
|
|
48
49
|
|
|
49
|
-
this.rootEl =
|
|
50
|
+
this.rootEl = view.root;
|
|
50
51
|
|
|
51
52
|
// Setting capture=true ensures that any parent container of the editor that
|
|
52
53
|
// gets scrolled will trigger the scroll event. Scroll events do not bubble
|
|
@@ -181,12 +182,13 @@ export class SuggestionMenuProseMirrorPlugin<
|
|
|
181
182
|
new Plugin({
|
|
182
183
|
key: suggestionMenuPluginKey,
|
|
183
184
|
|
|
184
|
-
view: () => {
|
|
185
|
+
view: (view) => {
|
|
185
186
|
this.view = new SuggestionMenuView<BSchema, I, S>(
|
|
186
187
|
editor,
|
|
187
188
|
(triggerCharacter, state) => {
|
|
188
189
|
this.emit(`update ${triggerCharacter}`, state);
|
|
189
190
|
},
|
|
191
|
+
view,
|
|
190
192
|
);
|
|
191
193
|
return this.view;
|
|
192
194
|
},
|
|
@@ -829,8 +829,8 @@ export class TableHandlesProsemirrorPlugin<
|
|
|
829
829
|
}),
|
|
830
830
|
);
|
|
831
831
|
|
|
832
|
-
if (
|
|
833
|
-
|
|
832
|
+
if (this.editor.headless) {
|
|
833
|
+
return;
|
|
834
834
|
}
|
|
835
835
|
|
|
836
836
|
setHiddenDragImage(this.editor.prosemirrorView.root);
|
|
@@ -872,8 +872,8 @@ export class TableHandlesProsemirrorPlugin<
|
|
|
872
872
|
}),
|
|
873
873
|
);
|
|
874
874
|
|
|
875
|
-
if (
|
|
876
|
-
|
|
875
|
+
if (this.editor.headless) {
|
|
876
|
+
return;
|
|
877
877
|
}
|
|
878
878
|
|
|
879
879
|
setHiddenDragImage(this.editor.prosemirrorView.root);
|
|
@@ -897,8 +897,8 @@ export class TableHandlesProsemirrorPlugin<
|
|
|
897
897
|
|
|
898
898
|
this.editor.transact((tr) => tr.setMeta(tableHandlesPluginKey, null));
|
|
899
899
|
|
|
900
|
-
if (
|
|
901
|
-
|
|
900
|
+
if (this.editor.headless) {
|
|
901
|
+
return;
|
|
902
902
|
}
|
|
903
903
|
|
|
904
904
|
unsetHiddenDragImage(this.editor.prosemirrorView.root);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AnyExtension, EditorOptions, Editor as TiptapEditor } from "@tiptap/core";
|
|
1
|
+
import { AnyExtension, EditorOptions, FocusPosition, Editor as TiptapEditor } from "@tiptap/core";
|
|
2
2
|
import { type Command, type Plugin, type Transaction } from "@tiptap/pm/state";
|
|
3
3
|
import { Node, Schema } from "prosemirror-model";
|
|
4
4
|
import * as Y from "yjs";
|
|
@@ -40,6 +40,12 @@ export type BlockNoteEditorOptions<BSchema extends BlockSchema, ISchema extends
|
|
|
40
40
|
* @default true
|
|
41
41
|
*/
|
|
42
42
|
animations?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Whether the editor should be focused automatically when it's created.
|
|
45
|
+
*
|
|
46
|
+
* @default false
|
|
47
|
+
*/
|
|
48
|
+
autofocus?: FocusPosition;
|
|
43
49
|
/**
|
|
44
50
|
* When enabled, allows for collaboration between multiple users.
|
|
45
51
|
* See [Real-time Collaboration](https://www.blocknotejs.org/docs/advanced/real-time-collaboration) for more info.
|
|
@@ -278,7 +284,9 @@ export type BlockNoteEditorOptions<BSchema extends BlockSchema, ISchema extends
|
|
|
278
284
|
/**
|
|
279
285
|
* Register extensions to the editor.
|
|
280
286
|
*
|
|
281
|
-
*
|
|
287
|
+
* See [Extensions](/docs/features/extensions) for more info.
|
|
288
|
+
*
|
|
289
|
+
* @remarks `BlockNoteExtension[]`
|
|
282
290
|
*/
|
|
283
291
|
extensions?: Array<BlockNoteExtension | BlockNoteExtensionFactory>;
|
|
284
292
|
};
|