@blocknote/core 0.42.1 → 0.42.3
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 +1 -1
- package/dist/blocknote.cjs.map +1 -1
- package/dist/blocknote.js +5 -19
- package/dist/blocknote.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/webpack-stats.json +1 -1
- package/package.json +4 -4
- package/src/editor/BlockNoteEditor.test.ts +1 -1
- package/src/editor/BlockNoteEditor.ts +8 -28
- package/types/src/editor/BlockNoteEditor.d.ts +0 -4
package/dist/webpack-stats.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"builtAt":1763459614094,"assets":[{"name":"blocks.cjs","size":3859},{"name":"yjs.cjs","size":882},{"name":"comments.cjs","size":11846},{"name":"locales.cjs","size":161252},{"name":"blocknote.cjs","size":142492},{"name":"en-Cl87Uuyf.cjs","size":6760},{"name":"blockToNode-w7H99R6p.cjs","size":19430},{"name":"BlockNoteSchema-DjDaA2C3.cjs","size":66198},{"name":"en-Cl87Uuyf.cjs.map","size":15254},{"name":"blockToNode-w7H99R6p.cjs.map","size":122080},{"name":"BlockNoteSchema-DjDaA2C3.cjs.map","size":296414},{"name":"yjs.cjs.map","size":5601},{"name":"blocks.cjs.map","size":91},{"name":"comments.cjs.map","size":47692},{"name":"locales.cjs.map","size":331893},{"name":"blocknote.cjs.map","size":641068}],"chunks":[{"id":"c90dbef","entry":true,"initial":true,"files":["blocks.cjs"],"names":["blocks"]},{"id":"526cf7b","entry":true,"initial":true,"files":["yjs.cjs"],"names":["yjs"]},{"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-Cl87Uuyf.cjs"],"names":["en"]},{"id":"cdc653a","entry":false,"initial":true,"files":["blockToNode-w7H99R6p.cjs"],"names":["blockToNode"]},{"id":"7515671","entry":false,"initial":true,"files":["BlockNoteSchema-DjDaA2C3.cjs"],"names":["BlockNoteSchema"]}],"modules":[{"name":"./src/blocks/index.ts","size":0,"chunks":["c90dbef"]},{"name":"./src/yjs/utils.ts","size":1121,"chunks":["526cf7b"]},{"name":"./src/yjs/index.ts","size":0,"chunks":["526cf7b"]},{"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":849,"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":9531,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/de.ts","size":10742,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/es.ts","size":10261,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/fr.ts","size":11221,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/he.ts","size":9268,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/hr.ts","size":10088,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/is.ts","size":10269,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/it.ts","size":10687,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/ja.ts","size":9098,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/ko.ts","size":8586,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/nl.ts","size":10215,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/no.ts","size":10394,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/pl.ts","size":9911,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/pt.ts","size":10066,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/ru.ts","size":11236,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/sk.ts","size":9951,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/uk.ts","size":10896,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/vi.ts","size":9932,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/zh.ts","size":8562,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/zh-tw.ts","size":8602,"chunks":["9eaffe2"]},{"name":"./src/i18n/index.ts","size":0,"chunks":["9eaffe2"]},{"name":"./src/schema/inlineContent/createSpec.ts","size":3810,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/insertBlocks/insertBlocks.ts","size":837,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/replaceBlocks/util/fixColumnList.ts","size":3571,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/replaceBlocks/replaceBlocks.ts","size":2248,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/html/util/serializeBlocksExternalHTML.ts","size":7424,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/html/externalHTMLExporter.ts","size":904,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/html/util/serializeBlocksInternalHTML.ts","size":4945,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/html/internalHTMLSerializer.ts","size":288,"chunks":["a1ee98a"]},{"name":"./src/api/getBlocksChangedByTransaction.ts","size":6569,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/acceptedMIMETypes.ts","size":134,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/handleFileInsertion.ts","size":4172,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/fileDropExtension.ts","size":884,"chunks":["a1ee98a"]},{"name":"./src/api/parsers/markdown/detectMarkdown.ts","size":1144,"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/exporters/markdown/util/removeUnderlinesRehypePlugin.ts","size":752,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/markdown/util/addSpacesToCheckboxesRehypePlugin.ts","size":775,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/markdown/util/convertVideoToMarkdownRehypePlugin.ts","size":470,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/markdown/markdownExporter.ts","size":674,"chunks":["a1ee98a"]},{"name":"./src/api/nodeConversions/fragmentToBlocks.ts","size":665,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/toClipboard/copyExtension.ts","size":5183,"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":1688,"chunks":["a1ee98a"]},{"name":"./src/extensions/Collaboration/schemaMigration/migrationRules/index.ts","size":45,"chunks":["a1ee98a"]},{"name":"./src/extensions/Collaboration/schemaMigration/SchemaMigrationPlugin.ts","size":1352,"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":8731,"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":2907,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/nestBlock/nestBlock.ts","size":2059,"chunks":["a1ee98a"]},{"name":"./src/extensions/KeyboardShortcuts/KeyboardShortcutsExtension.ts","size":15693,"chunks":["a1ee98a"]},{"name":"./src/extensions/LinkToolbar/LinkToolbarPlugin.ts","size":7727,"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":16683,"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":27450,"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":5440,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/moveBlocks/moveBlocks.ts","size":5698,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/getBlock/getBlock.ts","size":2055,"chunks":["a1ee98a"]},{"name":"./src/editor/managers/BlockManager.ts","size":6465,"chunks":["a1ee98a"]},{"name":"./src/editor/managers/CollaborationManager.ts","size":2919,"chunks":["a1ee98a"]},{"name":"./src/editor/managers/EventManager.ts","size":1929,"chunks":["a1ee98a"]},{"name":"./src/api/parsers/html/util/nestedLists.ts","size":2170,"chunks":["a1ee98a"]},{"name":"./src/api/parsers/html/parseHTML.ts","size":435,"chunks":["a1ee98a"]},{"name":"./src/api/parsers/markdown/parseMarkdown.ts","size":1760,"chunks":["a1ee98a"]},{"name":"./src/editor/managers/ExportManager.ts","size":3723,"chunks":["a1ee98a"]},{"name":"./src/editor/managers/ExtensionManager.ts","size":2087,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/selections/selection.ts","size":5257,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/selections/textCursorPosition.ts","size":2566,"chunks":["a1ee98a"]},{"name":"./src/editor/managers/SelectionManager.ts","size":2588,"chunks":["a1ee98a"]},{"name":"./src/editor/managers/StateManager.ts","size":5730,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/insertContentAt.ts","size":1049,"chunks":["a1ee98a"]},{"name":"./src/editor/managers/StyleManager.ts","size":4330,"chunks":["a1ee98a"]},{"name":"./src/editor/transformPasted.ts","size":2616,"chunks":["a1ee98a"]},{"name":"./src/style.css","size":0,"chunks":["a1ee98a"]},{"name":"./src/editor/BlockNoteEditor.ts","size":36643,"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":9591,"chunks":["a1e239a"]},{"name":"./src/extensions/UniqueID/UniqueID.ts","size":8905,"chunks":["cdc653a"]},{"name":"./src/schema/inlineContent/types.ts","size":302,"chunks":["cdc653a"]},{"name":"./src/util/table.ts","size":1212,"chunks":["cdc653a"]},{"name":"./src/util/typescript.ts","size":331,"chunks":["cdc653a"]},{"name":"./src/api/getBlockInfoFromPos.ts","size":3797,"chunks":["cdc653a"]},{"name":"./src/api/pmUtil.ts","size":651,"chunks":["cdc653a"]},{"name":"./src/api/nodeConversions/nodeToBlock.ts","size":13078,"chunks":["cdc653a"]},{"name":"./src/api/blockManipulation/tables/tables.ts","size":10346,"chunks":["cdc653a"]},{"name":"./src/api/nodeConversions/blockToNode.ts","size":7193,"chunks":["cdc653a"]},{"name":"./src/util/browser.ts","size":643,"chunks":["7515671"]},{"name":"./src/blocks/defaultBlockHelpers.ts","size":2115,"chunks":["7515671"]},{"name":"./src/util/string.ts","size":656,"chunks":["7515671"]},{"name":"./src/schema/blocks/internal.ts","size":3387,"chunks":["7515671"]},{"name":"./src/schema/blocks/createSpec.ts","size":6665,"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":2498,"chunks":["7515671"]},{"name":"./src/util/topo-sort.ts","size":2271,"chunks":["7515671"]},{"name":"./src/schema/schema.ts","size":4429,"chunks":["7515671"]},{"name":"./src/api/nodeUtil.ts","size":549,"chunks":["7515671"]},{"name":"./src/api/blockManipulation/commands/updateBlock/updateBlock.ts","size":8527,"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":6528,"chunks":["7515671"]},{"name":"./src/blocks/Divider/block.ts","size":747,"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":5204,"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":945,"chunks":["7515671"]},{"name":"./src/blocks/utils/listItemEnterHandler.ts","size":892,"chunks":["7515671"]},{"name":"./src/blocks/ListItem/getListItemContent.ts","size":1425,"chunks":["7515671"]},{"name":"./src/blocks/ListItem/BulletListItem/block.ts","size":2411,"chunks":["7515671"]},{"name":"./src/blocks/ListItem/CheckListItem/block.ts","size":3824,"chunks":["7515671"]},{"name":"./src/blocks/ListItem/NumberedListItem/IndexingPlugin.ts","size":3203,"chunks":["7515671"]},{"name":"./src/blocks/ListItem/NumberedListItem/block.ts","size":2941,"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":9792,"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":2005,"chunks":["7515671"]},{"name":"./src/extensions/SuggestionMenu/getDefaultSlashMenuItems.ts","size":9036,"chunks":["7515671"]},{"name":"./src/blocks/PageBreak/getPageBreakSlashMenuItems.ts","size":447,"chunks":["7515671"]},{"name":"./src/blocks/defaultBlocks.ts","size":2851,"chunks":["7515671"]},{"name":"./src/blocks/BlockNoteSchema.ts","size":330,"chunks":["7515671"]}]}
|
|
1
|
+
{"builtAt":1763555172006,"assets":[{"name":"blocks.cjs","size":3859},{"name":"yjs.cjs","size":882},{"name":"comments.cjs","size":11846},{"name":"locales.cjs","size":161252},{"name":"blocknote.cjs","size":142252},{"name":"en-Cl87Uuyf.cjs","size":6760},{"name":"blockToNode-w7H99R6p.cjs","size":19430},{"name":"BlockNoteSchema-DjDaA2C3.cjs","size":66198},{"name":"en-Cl87Uuyf.cjs.map","size":15254},{"name":"blockToNode-w7H99R6p.cjs.map","size":122080},{"name":"BlockNoteSchema-DjDaA2C3.cjs.map","size":296414},{"name":"yjs.cjs.map","size":5601},{"name":"blocks.cjs.map","size":91},{"name":"comments.cjs.map","size":47692},{"name":"locales.cjs.map","size":331893},{"name":"blocknote.cjs.map","size":639778}],"chunks":[{"id":"c90dbef","entry":true,"initial":true,"files":["blocks.cjs"],"names":["blocks"]},{"id":"526cf7b","entry":true,"initial":true,"files":["yjs.cjs"],"names":["yjs"]},{"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-Cl87Uuyf.cjs"],"names":["en"]},{"id":"cdc653a","entry":false,"initial":true,"files":["blockToNode-w7H99R6p.cjs"],"names":["blockToNode"]},{"id":"7515671","entry":false,"initial":true,"files":["BlockNoteSchema-DjDaA2C3.cjs"],"names":["BlockNoteSchema"]}],"modules":[{"name":"./src/blocks/index.ts","size":0,"chunks":["c90dbef"]},{"name":"./src/yjs/utils.ts","size":1121,"chunks":["526cf7b"]},{"name":"./src/yjs/index.ts","size":0,"chunks":["526cf7b"]},{"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":849,"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":9531,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/de.ts","size":10742,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/es.ts","size":10261,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/fr.ts","size":11221,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/he.ts","size":9268,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/hr.ts","size":10088,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/is.ts","size":10269,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/it.ts","size":10687,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/ja.ts","size":9098,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/ko.ts","size":8586,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/nl.ts","size":10215,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/no.ts","size":10394,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/pl.ts","size":9911,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/pt.ts","size":10066,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/ru.ts","size":11236,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/sk.ts","size":9951,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/uk.ts","size":10896,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/vi.ts","size":9932,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/zh.ts","size":8562,"chunks":["9eaffe2"]},{"name":"./src/i18n/locales/zh-tw.ts","size":8602,"chunks":["9eaffe2"]},{"name":"./src/i18n/index.ts","size":0,"chunks":["9eaffe2"]},{"name":"./src/schema/inlineContent/createSpec.ts","size":3810,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/insertBlocks/insertBlocks.ts","size":837,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/replaceBlocks/util/fixColumnList.ts","size":3571,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/replaceBlocks/replaceBlocks.ts","size":2248,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/html/util/serializeBlocksExternalHTML.ts","size":7424,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/html/externalHTMLExporter.ts","size":904,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/html/util/serializeBlocksInternalHTML.ts","size":4945,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/html/internalHTMLSerializer.ts","size":288,"chunks":["a1ee98a"]},{"name":"./src/api/getBlocksChangedByTransaction.ts","size":6569,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/acceptedMIMETypes.ts","size":134,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/handleFileInsertion.ts","size":4172,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/fileDropExtension.ts","size":884,"chunks":["a1ee98a"]},{"name":"./src/api/parsers/markdown/detectMarkdown.ts","size":1144,"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/exporters/markdown/util/removeUnderlinesRehypePlugin.ts","size":752,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/markdown/util/addSpacesToCheckboxesRehypePlugin.ts","size":775,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/markdown/util/convertVideoToMarkdownRehypePlugin.ts","size":470,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/markdown/markdownExporter.ts","size":674,"chunks":["a1ee98a"]},{"name":"./src/api/nodeConversions/fragmentToBlocks.ts","size":665,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/toClipboard/copyExtension.ts","size":5183,"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":1688,"chunks":["a1ee98a"]},{"name":"./src/extensions/Collaboration/schemaMigration/migrationRules/index.ts","size":45,"chunks":["a1ee98a"]},{"name":"./src/extensions/Collaboration/schemaMigration/SchemaMigrationPlugin.ts","size":1352,"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":8731,"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":2907,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/nestBlock/nestBlock.ts","size":2059,"chunks":["a1ee98a"]},{"name":"./src/extensions/KeyboardShortcuts/KeyboardShortcutsExtension.ts","size":15693,"chunks":["a1ee98a"]},{"name":"./src/extensions/LinkToolbar/LinkToolbarPlugin.ts","size":7727,"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":16683,"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":27450,"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":5440,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/moveBlocks/moveBlocks.ts","size":5698,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/getBlock/getBlock.ts","size":2055,"chunks":["a1ee98a"]},{"name":"./src/editor/managers/BlockManager.ts","size":6465,"chunks":["a1ee98a"]},{"name":"./src/editor/managers/CollaborationManager.ts","size":2919,"chunks":["a1ee98a"]},{"name":"./src/editor/managers/EventManager.ts","size":1929,"chunks":["a1ee98a"]},{"name":"./src/api/parsers/html/util/nestedLists.ts","size":2170,"chunks":["a1ee98a"]},{"name":"./src/api/parsers/html/parseHTML.ts","size":435,"chunks":["a1ee98a"]},{"name":"./src/api/parsers/markdown/parseMarkdown.ts","size":1760,"chunks":["a1ee98a"]},{"name":"./src/editor/managers/ExportManager.ts","size":3723,"chunks":["a1ee98a"]},{"name":"./src/editor/managers/ExtensionManager.ts","size":2087,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/selections/selection.ts","size":5257,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/selections/textCursorPosition.ts","size":2566,"chunks":["a1ee98a"]},{"name":"./src/editor/managers/SelectionManager.ts","size":2588,"chunks":["a1ee98a"]},{"name":"./src/editor/managers/StateManager.ts","size":5730,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/insertContentAt.ts","size":1049,"chunks":["a1ee98a"]},{"name":"./src/editor/managers/StyleManager.ts","size":4330,"chunks":["a1ee98a"]},{"name":"./src/editor/transformPasted.ts","size":2616,"chunks":["a1ee98a"]},{"name":"./src/style.css","size":0,"chunks":["a1ee98a"]},{"name":"./src/editor/BlockNoteEditor.ts","size":36093,"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":9591,"chunks":["a1e239a"]},{"name":"./src/extensions/UniqueID/UniqueID.ts","size":8905,"chunks":["cdc653a"]},{"name":"./src/schema/inlineContent/types.ts","size":302,"chunks":["cdc653a"]},{"name":"./src/util/table.ts","size":1212,"chunks":["cdc653a"]},{"name":"./src/util/typescript.ts","size":331,"chunks":["cdc653a"]},{"name":"./src/api/getBlockInfoFromPos.ts","size":3797,"chunks":["cdc653a"]},{"name":"./src/api/pmUtil.ts","size":651,"chunks":["cdc653a"]},{"name":"./src/api/nodeConversions/nodeToBlock.ts","size":13078,"chunks":["cdc653a"]},{"name":"./src/api/blockManipulation/tables/tables.ts","size":10346,"chunks":["cdc653a"]},{"name":"./src/api/nodeConversions/blockToNode.ts","size":7193,"chunks":["cdc653a"]},{"name":"./src/util/browser.ts","size":643,"chunks":["7515671"]},{"name":"./src/blocks/defaultBlockHelpers.ts","size":2115,"chunks":["7515671"]},{"name":"./src/util/string.ts","size":656,"chunks":["7515671"]},{"name":"./src/schema/blocks/internal.ts","size":3387,"chunks":["7515671"]},{"name":"./src/schema/blocks/createSpec.ts","size":6665,"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":2498,"chunks":["7515671"]},{"name":"./src/util/topo-sort.ts","size":2271,"chunks":["7515671"]},{"name":"./src/schema/schema.ts","size":4429,"chunks":["7515671"]},{"name":"./src/api/nodeUtil.ts","size":549,"chunks":["7515671"]},{"name":"./src/api/blockManipulation/commands/updateBlock/updateBlock.ts","size":8527,"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":6528,"chunks":["7515671"]},{"name":"./src/blocks/Divider/block.ts","size":747,"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":5204,"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":945,"chunks":["7515671"]},{"name":"./src/blocks/utils/listItemEnterHandler.ts","size":892,"chunks":["7515671"]},{"name":"./src/blocks/ListItem/getListItemContent.ts","size":1425,"chunks":["7515671"]},{"name":"./src/blocks/ListItem/BulletListItem/block.ts","size":2411,"chunks":["7515671"]},{"name":"./src/blocks/ListItem/CheckListItem/block.ts","size":3824,"chunks":["7515671"]},{"name":"./src/blocks/ListItem/NumberedListItem/IndexingPlugin.ts","size":3203,"chunks":["7515671"]},{"name":"./src/blocks/ListItem/NumberedListItem/block.ts","size":2941,"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":9792,"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":2005,"chunks":["7515671"]},{"name":"./src/extensions/SuggestionMenu/getDefaultSlashMenuItems.ts","size":9036,"chunks":["7515671"]},{"name":"./src/blocks/PageBreak/getPageBreakSlashMenuItems.ts","size":447,"chunks":["7515671"]},{"name":"./src/blocks/defaultBlocks.ts","size":2851,"chunks":["7515671"]},{"name":"./src/blocks/BlockNoteSchema.ts","size":330,"chunks":["7515671"]}]}
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"directory": "packages/core"
|
|
12
12
|
},
|
|
13
13
|
"license": "MPL-2.0",
|
|
14
|
-
"version": "0.42.
|
|
14
|
+
"version": "0.42.3",
|
|
15
15
|
"files": [
|
|
16
16
|
"dist",
|
|
17
17
|
"types",
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"dependencies": {
|
|
77
77
|
"@emoji-mart/data": "^1.2.1",
|
|
78
78
|
"@shikijs/types": "3.13.0",
|
|
79
|
-
"@tiptap/core": "^3.
|
|
79
|
+
"@tiptap/core": "^3.11.0",
|
|
80
80
|
"@tiptap/extension-bold": "^3.7.2",
|
|
81
81
|
"@tiptap/extension-code": "^3.7.2",
|
|
82
82
|
"@tiptap/extension-gapcursor": "^3.7.2",
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
"@tiptap/extension-strike": "^3.7.2",
|
|
89
89
|
"@tiptap/extension-text": "^3.7.2",
|
|
90
90
|
"@tiptap/extension-underline": "^3.7.2",
|
|
91
|
-
"@tiptap/pm": "^3.
|
|
91
|
+
"@tiptap/pm": "^3.11.0",
|
|
92
92
|
"emoji-mart": "^5.6.0",
|
|
93
93
|
"fast-deep-equal": "^3.1.3",
|
|
94
94
|
"hast-util-from-dom": "^5.0.1",
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
"prosemirror-model": "^1.25.4",
|
|
98
98
|
"prosemirror-state": "^1.4.4",
|
|
99
99
|
"prosemirror-tables": "^1.8.1",
|
|
100
|
-
"prosemirror-transform": "^1.10.
|
|
100
|
+
"prosemirror-transform": "^1.10.5",
|
|
101
101
|
"prosemirror-view": "^1.41.3",
|
|
102
102
|
"rehype-format": "^5.0.1",
|
|
103
103
|
"rehype-parse": "^9.0.1",
|
|
@@ -120,7 +120,7 @@ it("onMount and onUnmount", async () => {
|
|
|
120
120
|
expect(unmounted).toBe(false);
|
|
121
121
|
editor.unmount();
|
|
122
122
|
// expect the unmount event to not have been triggered yet, since it waits 2 ticks
|
|
123
|
-
expect(unmounted).toBe(false);
|
|
123
|
+
// expect(unmounted).toBe(false);
|
|
124
124
|
// wait 3 ticks to ensure the unmount event is triggered
|
|
125
125
|
await new Promise((resolve) => setTimeout(resolve, 3));
|
|
126
126
|
expect(mounted).toBe(true);
|
|
@@ -1054,40 +1054,14 @@ export class BlockNoteEditor<
|
|
|
1054
1054
|
* @warning Not needed to call manually when using React, use BlockNoteView to take care of mounting
|
|
1055
1055
|
*/
|
|
1056
1056
|
public mount = (element: HTMLElement) => {
|
|
1057
|
-
if (
|
|
1058
|
-
// If the editor is scheduled for destruction, and
|
|
1059
|
-
this.scheduledDestructionTimeout &&
|
|
1060
|
-
// If the editor is being remounted to the same element as the one which is scheduled for destruction,
|
|
1061
|
-
// then just cancel the destruction timeout
|
|
1062
|
-
this.prosemirrorView.dom === element
|
|
1063
|
-
) {
|
|
1064
|
-
clearTimeout(this.scheduledDestructionTimeout);
|
|
1065
|
-
this.scheduledDestructionTimeout = undefined;
|
|
1066
|
-
return;
|
|
1067
|
-
}
|
|
1068
|
-
|
|
1069
1057
|
this._tiptapEditor.mount({ mount: element });
|
|
1070
1058
|
};
|
|
1071
1059
|
|
|
1072
|
-
/**
|
|
1073
|
-
* Timeout to schedule the {@link unmount}ing of the editor.
|
|
1074
|
-
*/
|
|
1075
|
-
private scheduledDestructionTimeout:
|
|
1076
|
-
| ReturnType<typeof setTimeout>
|
|
1077
|
-
| undefined = undefined;
|
|
1078
|
-
|
|
1079
1060
|
/**
|
|
1080
1061
|
* Unmount the editor from the DOM element it is bound to
|
|
1081
1062
|
*/
|
|
1082
1063
|
public unmount = () => {
|
|
1083
|
-
|
|
1084
|
-
// This can result in the editor being unmounted mid-rendering the content of node views.
|
|
1085
|
-
// To avoid this, we only ever schedule the `unmount`ing of the editor when we've seen whether React "meant" to actually unmount the editor (i.e. not calling mount one tick later).
|
|
1086
|
-
// So, we wait two ticks to see if the component is still meant to be unmounted, and if not, we actually unmount the editor.
|
|
1087
|
-
this.scheduledDestructionTimeout = setTimeout(() => {
|
|
1088
|
-
this._tiptapEditor.unmount();
|
|
1089
|
-
this.scheduledDestructionTimeout = undefined;
|
|
1090
|
-
}, 1);
|
|
1064
|
+
this._tiptapEditor.unmount();
|
|
1091
1065
|
};
|
|
1092
1066
|
|
|
1093
1067
|
/**
|
|
@@ -1108,10 +1082,16 @@ export class BlockNoteEditor<
|
|
|
1108
1082
|
}
|
|
1109
1083
|
|
|
1110
1084
|
public get domElement() {
|
|
1085
|
+
if (this.headless) {
|
|
1086
|
+
return undefined;
|
|
1087
|
+
}
|
|
1111
1088
|
return this.prosemirrorView?.dom as HTMLDivElement | undefined;
|
|
1112
1089
|
}
|
|
1113
1090
|
|
|
1114
1091
|
public isFocused() {
|
|
1092
|
+
if (this.headless) {
|
|
1093
|
+
return false;
|
|
1094
|
+
}
|
|
1115
1095
|
return this.prosemirrorView?.hasFocus() || false;
|
|
1116
1096
|
}
|
|
1117
1097
|
|
|
@@ -1699,7 +1679,7 @@ export class BlockNoteEditor<
|
|
|
1699
1679
|
ignoreQueryLength?: boolean;
|
|
1700
1680
|
},
|
|
1701
1681
|
) {
|
|
1702
|
-
if (!this.prosemirrorView) {
|
|
1682
|
+
if (!this.prosemirrorView || this.headless) {
|
|
1703
1683
|
return;
|
|
1704
1684
|
}
|
|
1705
1685
|
|
|
@@ -443,10 +443,6 @@ export declare class BlockNoteEditor<BSchema extends BlockSchema = DefaultBlockS
|
|
|
443
443
|
* @warning Not needed to call manually when using React, use BlockNoteView to take care of mounting
|
|
444
444
|
*/
|
|
445
445
|
mount: (element: HTMLElement) => void;
|
|
446
|
-
/**
|
|
447
|
-
* Timeout to schedule the {@link unmount}ing of the editor.
|
|
448
|
-
*/
|
|
449
|
-
private scheduledDestructionTimeout;
|
|
450
446
|
/**
|
|
451
447
|
* Unmount the editor from the DOM element it is bound to
|
|
452
448
|
*/
|