@blocknote/core 0.23.5 → 0.24.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.js +750 -610
- package/dist/blocknote.js.map +1 -1
- package/dist/blocknote.umd.cjs +6 -6
- package/dist/blocknote.umd.cjs.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/webpack-stats.json +1 -1
- package/package.json +3 -3
- package/src/api/blockManipulation/commands/insertBlocks/__snapshots__/insertBlocks.test.ts.snap +492 -0
- package/src/api/blockManipulation/commands/insertBlocks/insertBlocks.test.ts +6 -0
- package/src/api/clipboard/toClipboard/copyExtension.ts +37 -2
- package/src/api/nodeConversions/blockToNode.ts +5 -3
- package/src/api/nodeConversions/nodeToBlock.ts +11 -5
- package/src/blocks/TableBlockContent/TableBlockContent.ts +2 -1
- package/src/editor/BlockNoteEditor.ts +21 -6
- package/src/editor/BlockNoteExtensions.ts +9 -4
- package/src/editor/BlockNoteTipTapEditor.ts +37 -36
- package/src/extensions/Placeholder/PlaceholderPlugin.ts +69 -54
- package/src/extensions/SideMenu/dragging.ts +2 -5
- package/src/i18n/locales/ar.ts +3 -0
- package/src/i18n/locales/de.ts +3 -0
- package/src/i18n/locales/en.ts +4 -1
- package/src/i18n/locales/es.ts +3 -0
- package/src/i18n/locales/fr.ts +3 -0
- package/src/i18n/locales/hr.ts +3 -0
- package/src/i18n/locales/is.ts +3 -0
- package/src/i18n/locales/it.ts +316 -314
- package/src/i18n/locales/ja.ts +3 -0
- package/src/i18n/locales/ko.ts +3 -0
- package/src/i18n/locales/nl.ts +3 -0
- package/src/i18n/locales/pl.ts +3 -0
- package/src/i18n/locales/pt.ts +3 -0
- package/src/i18n/locales/ru.ts +3 -0
- package/src/i18n/locales/uk.ts +337 -278
- package/src/i18n/locales/vi.ts +3 -0
- package/src/i18n/locales/zh.ts +3 -0
- package/types/src/editor/BlockNoteEditor.d.ts +2 -2
- package/types/src/editor/BlockNoteExtensions.d.ts +2 -2
- package/types/src/editor/BlockNoteTipTapEditor.d.ts +1 -2
- package/types/src/extensions/Placeholder/PlaceholderPlugin.d.ts +1 -1
- package/types/src/i18n/locales/de.d.ts +3 -0
- package/types/src/i18n/locales/en.d.ts +4 -7
- package/types/src/i18n/locales/es.d.ts +3 -0
- package/types/src/i18n/locales/hr.d.ts +3 -0
- package/types/src/i18n/locales/it.d.ts +3 -0
package/dist/webpack-stats.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"builtAt":1739374017683,"assets":[{"name":"blocknote.umd.cjs","size":254787},{"name":"blocknote.umd.cjs.map","size":931756}],"chunks":[{"id":"a1ee98a","entry":true,"initial":true,"files":["blocknote.umd.cjs"],"names":["index"]}],"modules":[{"name":"./src/i18n/locales/ar.ts","size":6919,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/de.ts","size":7549,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/en.ts","size":6990,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/es.ts","size":7421,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/fr.ts","size":8147,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/hr.ts","size":7328,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/is.ts","size":7210,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/it.ts","size":7338,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/ja.ts","size":6639,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/ko.ts","size":6437,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/nl.ts","size":7426,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/pl.ts","size":7129,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/pt.ts","size":7349,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/ru.ts","size":8013,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/uk.ts","size":7519,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/vi.ts","size":7264,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/zh.ts","size":6381,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/index.ts","size":0,"chunks":["a1ee98a"]},{"name":"./src/util/typescript.ts","size":331,"chunks":["a1ee98a"]},{"name":"./src/extensions/UniqueID/UniqueID.ts","size":8887,"chunks":["a1ee98a"]},{"name":"./src/schema/inlineContent/types.ts","size":302,"chunks":["a1ee98a"]},{"name":"./src/api/nodeConversions/blockToNode.ts","size":6071,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/html/util/serializeBlocksExternalHTML.ts","size":5122,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/html/externalHTMLExporter.ts","size":886,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/html/util/serializeBlocksInternalHTML.ts","size":3264,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/html/internalHTMLSerializer.ts","size":288,"chunks":["a1ee98a"]},{"name":"./src/api/getBlockInfoFromPos.ts","size":3648,"chunks":["a1ee98a"]},{"name":"./src/api/nodeUtil.ts","size":490,"chunks":["a1ee98a"]},{"name":"./src/util/browser.ts","size":536,"chunks":["a1ee98a"]},{"name":"./src/blocks/defaultBlockHelpers.ts","size":1755,"chunks":["a1ee98a"]},{"name":"./src/blocks/defaultProps.ts","size":269,"chunks":["a1ee98a"]},{"name":"./src/util/string.ts","size":299,"chunks":["a1ee98a"]},{"name":"./src/schema/blocks/internal.ts","size":4130,"chunks":["a1ee98a"]},{"name":"./src/schema/blocks/createSpec.ts","size":3609,"chunks":["a1ee98a"]},{"name":"./src/api/nodeConversions/nodeToBlock.ts","size":7706,"chunks":["a1ee98a"]},{"name":"./src/schema/inlineContent/internal.ts","size":1398,"chunks":["a1ee98a"]},{"name":"./src/schema/inlineContent/createSpec.ts","size":2739,"chunks":["a1ee98a"]},{"name":"./src/schema/styles/internal.ts","size":1162,"chunks":["a1ee98a"]},{"name":"./src/schema/styles/createSpec.ts","size":1263,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/parse/parseFigureElement.ts","size":342,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/render/createAddFileButton.ts","size":1725,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/render/createFileNameWithIcon.ts","size":753,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/render/createFileBlockWrapper.ts","size":1428,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/toExternalHTML/createFigureWithCaption.ts","size":307,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/toExternalHTML/createLinkWithCaption.ts","size":294,"chunks":["a1ee98a"]},{"name":"./src/blocks/AudioBlockContent/parseAudioElement.ts","size":108,"chunks":["a1ee98a"]},{"name":"./src/blocks/AudioBlockContent/AudioBlockContent.ts","size":3155,"chunks":["a1ee98a"]},{"name":"./src/blocks/CodeBlockContent/defaultSupportedLanguages.ts","size":1707,"chunks":["a1ee98a"]},{"name":"./src/blocks/CodeBlockContent/CodeBlockContent.ts","size":9104,"chunks":["a1ee98a"]},{"name":"./src/blocks/PageBreakBlockContent/PageBreakBlockContent.ts","size":854,"chunks":["a1ee98a"]},{"name":"./src/extensions/BackgroundColor/BackgroundColorMark.ts","size":946,"chunks":["a1ee98a"]},{"name":"./src/extensions/TextColor/TextColorMark.ts","size":866,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/parse/parseEmbedElement.ts","size":108,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/FileBlockContent.ts","size":1460,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/updateBlock/updateBlock.ts","size":4725,"chunks":["a1ee98a"]},{"name":"./src/blocks/HeadingBlockContent/HeadingBlockContent.ts","size":3418,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/render/createResizableFileBlockWrapper.ts","size":4637,"chunks":["a1ee98a"]},{"name":"./src/blocks/ImageBlockContent/parseImageElement.ts","size":175,"chunks":["a1ee98a"]},{"name":"./src/blocks/ImageBlockContent/ImageBlockContent.ts","size":3243,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/splitBlock/splitBlock.ts","size":868,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/ListItemKeyboardShortcuts.ts","size":1429,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/BulletListItemBlockContent/BulletListItemBlockContent.ts","size":3415,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/CheckListItemBlockContent/CheckListItemBlockContent.ts","size":7148,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/NumberedListItemBlockContent/NumberedListIndexingPlugin.ts","size":2207,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/NumberedListItemBlockContent/NumberedListItemBlockContent.ts","size":4427,"chunks":["a1ee98a"]},{"name":"./src/blocks/ParagraphBlockContent/ParagraphBlockContent.ts","size":1434,"chunks":["a1ee98a"]},{"name":"./src/blocks/TableBlockContent/TableExtension.ts","size":2275,"chunks":["a1ee98a"]},{"name":"./src/blocks/TableBlockContent/TableBlockContent.ts","size":4223,"chunks":["a1ee98a"]},{"name":"./src/blocks/VideoBlockContent/parseVideoElement.ts","size":175,"chunks":["a1ee98a"]},{"name":"./src/blocks/VideoBlockContent/VideoBlockContent.ts","size":3162,"chunks":["a1ee98a"]},{"name":"./src/blocks/defaultBlocks.ts","size":1147,"chunks":["a1ee98a"]},{"name":"./src/blocks/defaultBlockTypeGuards.ts","size":1580,"chunks":["a1ee98a"]},{"name":"./src/extensions/SuggestionMenu/getDefaultSlashMenuItems.ts","size":6735,"chunks":["a1ee98a"]},{"name":"./src/editor/BlockNoteSchema.ts","size":1044,"chunks":["a1ee98a"]},{"name":"./src/blocks/PageBreakBlockContent/schema.ts","size":350,"chunks":["a1ee98a"]},{"name":"./src/blocks/PageBreakBlockContent/getPageBreakSlashMenuItems.ts","size":534,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/uploadToTmpFilesDotOrg_DEV_ONLY.ts","size":316,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/insertBlocks/insertBlocks.ts","size":1141,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/moveBlocks/moveBlocks.ts","size":5693,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/nestBlock/nestBlock.ts","size":2324,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/replaceBlocks/replaceBlocks.ts","size":2533,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/removeBlocks/removeBlocks.ts","size":123,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/getBlock/getBlock.ts","size":2452,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/insertContentAt.ts","size":1120,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/selections/selection.ts","size":4698,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/selections/textCursorPosition/textCursorPosition.ts","size":2880,"chunks":["a1ee98a"]},{"name":"./src/util/esmDependencies.ts","size":820,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/markdown/removeUnderlinesRehypePlugin.ts","size":752,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/markdown/util/addSpacesToCheckboxesRehypePlugin.ts","size":969,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/markdown/markdownExporter.ts","size":837,"chunks":["a1ee98a"]},{"name":"./src/api/parsers/html/util/nestedLists.ts","size":2174,"chunks":["a1ee98a"]},{"name":"./src/api/parsers/html/parseHTML.ts","size":503,"chunks":["a1ee98a"]},{"name":"./src/api/parsers/markdown/parseMarkdown.ts","size":1097,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/acceptedMIMETypes.ts","size":115,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/handleFileInsertion.ts","size":3576,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/fileDropExtension.ts","size":884,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/handleVSCodePaste.ts","size":661,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/pasteExtension.ts","size":1552,"chunks":["a1ee98a"]},{"name":"./src/api/nodeConversions/fragmentToBlocks.ts","size":859,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/toClipboard/copyExtension.ts","size":4666,"chunks":["a1ee98a"]},{"name":"./src/extensions/BackgroundColor/BackgroundColorExtension.ts","size":791,"chunks":["a1ee98a"]},{"name":"./src/util/EventEmitter.ts","size":744,"chunks":["a1ee98a"]},{"name":"./src/extensions/FilePanel/FilePanelPlugin.ts","size":3584,"chunks":["a1ee98a"]},{"name":"./src/extensions/FormattingToolbar/FormattingToolbarPlugin.ts","size":5240,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/mergeBlocks/mergeBlocks.ts","size":3228,"chunks":["a1ee98a"]},{"name":"./src/extensions/KeyboardShortcuts/KeyboardShortcutsExtension.ts","size":14774,"chunks":["a1ee98a"]},{"name":"./src/extensions/LinkToolbar/LinkToolbarPlugin.ts","size":7557,"chunks":["a1ee98a"]},{"name":"./src/extensions/LinkToolbar/protocols.ts","size":172,"chunks":["a1ee98a"]},{"name":"./src/extensions/NodeSelectionKeyboard/NodeSelectionKeyboardPlugin.ts","size":1195,"chunks":["a1ee98a"]},{"name":"./src/extensions/Placeholder/PlaceholderPlugin.ts","size":3316,"chunks":["a1ee98a"]},{"name":"./src/extensions/PreviousBlockType/PreviousBlockTypePlugin.ts","size":4802,"chunks":["a1ee98a"]},{"name":"./src/extensions/getDraggableBlockFromElement.ts","size":404,"chunks":["a1ee98a"]},{"name":"./src/extensions/SideMenu/MultipleNodeSelection.ts","size":1616,"chunks":["a1ee98a"]},{"name":"./src/extensions/SideMenu/dragging.ts","size":4521,"chunks":["a1ee98a"]},{"name":"./src/extensions/SideMenu/SideMenuPlugin.ts","size":13634,"chunks":["a1ee98a"]},{"name":"./src/extensions/SuggestionMenu/SuggestionPlugin.ts","size":8034,"chunks":["a1ee98a"]},{"name":"./src/extensions/TableHandles/TableHandlesPlugin.ts","size":19364,"chunks":["a1ee98a"]},{"name":"./src/extensions/TextAlignment/TextAlignmentExtension.ts","size":928,"chunks":["a1ee98a"]},{"name":"./src/extensions/TextColor/TextColorExtension.ts","size":725,"chunks":["a1ee98a"]},{"name":"./src/extensions/TrailingNode/TrailingNodeExtension.ts","size":1563,"chunks":["a1ee98a"]},{"name":"./src/pm-nodes/BlockContainer.ts","size":2038,"chunks":["a1ee98a"]},{"name":"./src/pm-nodes/BlockGroup.ts","size":1102,"chunks":["a1ee98a"]},{"name":"./src/pm-nodes/Doc.ts","size":90,"chunks":["a1ee98a"]},{"name":"./src/extensions/Collaboration/createCollaborationExtensions.ts","size":3728,"chunks":["a1ee98a"]},{"name":"./src/editor/BlockNoteExtensions.ts","size":4367,"chunks":["a1ee98a"]},{"name":"./src/editor/transformPasted.ts","size":2604,"chunks":["a1ee98a"]},{"name":"./src/editor/BlockNoteTipTapEditor.ts","size":3599,"chunks":["a1ee98a"]},{"name":"./src/style.css","size":0,"chunks":["a1ee98a"]},{"name":"./src/editor/BlockNoteEditor.ts","size":26432,"chunks":["a1ee98a"]},{"name":"./src/editor/defaultColors.ts","size":1193,"chunks":["a1ee98a"]},{"name":"./src/exporter/Exporter.ts","size":1075,"chunks":["a1ee98a"]},{"name":"./src/exporter/mapping.ts","size":197,"chunks":["a1ee98a"]},{"name":"./src/extensions/SuggestionMenu/getDefaultEmojiPickerItems.ts","size":700,"chunks":["a1ee98a"]},{"name":"./src/util/combineByGroup.ts","size":550,"chunks":["a1ee98a"]},{"name":"./src/api/testUtil/partialBlockTestUtil.ts","size":3149,"chunks":["a1ee98a"]},{"name":"./src/index.ts","size":0,"chunks":["a1ee98a"]}]}
|
|
1
|
+
{"builtAt":1739818766641,"assets":[{"name":"blocknote.umd.cjs","size":255858},{"name":"blocknote.umd.cjs.map","size":935633}],"chunks":[{"id":"a1ee98a","entry":true,"initial":true,"files":["blocknote.umd.cjs"],"names":["index"]}],"modules":[{"name":"./src/i18n/locales/ar.ts","size":6971,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/de.ts","size":7609,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/en.ts","size":7041,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/es.ts","size":7479,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/fr.ts","size":8209,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/hr.ts","size":7382,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/is.ts","size":7266,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/it.ts","size":7395,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/ja.ts","size":6686,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/ko.ts","size":6483,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/nl.ts","size":7486,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/pl.ts","size":7184,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/pt.ts","size":7409,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/ru.ts","size":8073,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/uk.ts","size":8022,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/vi.ts","size":7318,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/zh.ts","size":6425,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/index.ts","size":0,"chunks":["a1ee98a"]},{"name":"./src/util/typescript.ts","size":331,"chunks":["a1ee98a"]},{"name":"./src/extensions/UniqueID/UniqueID.ts","size":8887,"chunks":["a1ee98a"]},{"name":"./src/schema/inlineContent/types.ts","size":302,"chunks":["a1ee98a"]},{"name":"./src/api/nodeConversions/blockToNode.ts","size":6137,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/html/util/serializeBlocksExternalHTML.ts","size":5122,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/html/externalHTMLExporter.ts","size":886,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/html/util/serializeBlocksInternalHTML.ts","size":3264,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/html/internalHTMLSerializer.ts","size":288,"chunks":["a1ee98a"]},{"name":"./src/api/getBlockInfoFromPos.ts","size":3648,"chunks":["a1ee98a"]},{"name":"./src/api/nodeUtil.ts","size":490,"chunks":["a1ee98a"]},{"name":"./src/util/browser.ts","size":536,"chunks":["a1ee98a"]},{"name":"./src/blocks/defaultBlockHelpers.ts","size":1755,"chunks":["a1ee98a"]},{"name":"./src/blocks/defaultProps.ts","size":269,"chunks":["a1ee98a"]},{"name":"./src/util/string.ts","size":299,"chunks":["a1ee98a"]},{"name":"./src/schema/blocks/internal.ts","size":4130,"chunks":["a1ee98a"]},{"name":"./src/schema/blocks/createSpec.ts","size":3609,"chunks":["a1ee98a"]},{"name":"./src/api/nodeConversions/nodeToBlock.ts","size":7897,"chunks":["a1ee98a"]},{"name":"./src/schema/inlineContent/internal.ts","size":1398,"chunks":["a1ee98a"]},{"name":"./src/schema/inlineContent/createSpec.ts","size":2739,"chunks":["a1ee98a"]},{"name":"./src/schema/styles/internal.ts","size":1162,"chunks":["a1ee98a"]},{"name":"./src/schema/styles/createSpec.ts","size":1263,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/parse/parseFigureElement.ts","size":342,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/render/createAddFileButton.ts","size":1725,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/render/createFileNameWithIcon.ts","size":753,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/render/createFileBlockWrapper.ts","size":1428,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/toExternalHTML/createFigureWithCaption.ts","size":307,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/toExternalHTML/createLinkWithCaption.ts","size":294,"chunks":["a1ee98a"]},{"name":"./src/blocks/AudioBlockContent/parseAudioElement.ts","size":108,"chunks":["a1ee98a"]},{"name":"./src/blocks/AudioBlockContent/AudioBlockContent.ts","size":3155,"chunks":["a1ee98a"]},{"name":"./src/blocks/CodeBlockContent/defaultSupportedLanguages.ts","size":1707,"chunks":["a1ee98a"]},{"name":"./src/blocks/CodeBlockContent/CodeBlockContent.ts","size":9104,"chunks":["a1ee98a"]},{"name":"./src/blocks/PageBreakBlockContent/PageBreakBlockContent.ts","size":854,"chunks":["a1ee98a"]},{"name":"./src/extensions/BackgroundColor/BackgroundColorMark.ts","size":946,"chunks":["a1ee98a"]},{"name":"./src/extensions/TextColor/TextColorMark.ts","size":866,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/parse/parseEmbedElement.ts","size":108,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/FileBlockContent.ts","size":1460,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/updateBlock/updateBlock.ts","size":4725,"chunks":["a1ee98a"]},{"name":"./src/blocks/HeadingBlockContent/HeadingBlockContent.ts","size":3418,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/render/createResizableFileBlockWrapper.ts","size":4637,"chunks":["a1ee98a"]},{"name":"./src/blocks/ImageBlockContent/parseImageElement.ts","size":175,"chunks":["a1ee98a"]},{"name":"./src/blocks/ImageBlockContent/ImageBlockContent.ts","size":3243,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/splitBlock/splitBlock.ts","size":868,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/ListItemKeyboardShortcuts.ts","size":1429,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/BulletListItemBlockContent/BulletListItemBlockContent.ts","size":3415,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/CheckListItemBlockContent/CheckListItemBlockContent.ts","size":7148,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/NumberedListItemBlockContent/NumberedListIndexingPlugin.ts","size":2207,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/NumberedListItemBlockContent/NumberedListItemBlockContent.ts","size":4427,"chunks":["a1ee98a"]},{"name":"./src/blocks/ParagraphBlockContent/ParagraphBlockContent.ts","size":1434,"chunks":["a1ee98a"]},{"name":"./src/blocks/TableBlockContent/TableExtension.ts","size":2275,"chunks":["a1ee98a"]},{"name":"./src/blocks/TableBlockContent/TableBlockContent.ts","size":4223,"chunks":["a1ee98a"]},{"name":"./src/blocks/VideoBlockContent/parseVideoElement.ts","size":175,"chunks":["a1ee98a"]},{"name":"./src/blocks/VideoBlockContent/VideoBlockContent.ts","size":3162,"chunks":["a1ee98a"]},{"name":"./src/blocks/defaultBlocks.ts","size":1147,"chunks":["a1ee98a"]},{"name":"./src/blocks/defaultBlockTypeGuards.ts","size":1580,"chunks":["a1ee98a"]},{"name":"./src/extensions/SuggestionMenu/getDefaultSlashMenuItems.ts","size":6735,"chunks":["a1ee98a"]},{"name":"./src/editor/BlockNoteSchema.ts","size":1044,"chunks":["a1ee98a"]},{"name":"./src/blocks/PageBreakBlockContent/schema.ts","size":350,"chunks":["a1ee98a"]},{"name":"./src/blocks/PageBreakBlockContent/getPageBreakSlashMenuItems.ts","size":534,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/uploadToTmpFilesDotOrg_DEV_ONLY.ts","size":316,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/insertBlocks/insertBlocks.ts","size":1141,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/moveBlocks/moveBlocks.ts","size":5693,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/nestBlock/nestBlock.ts","size":2324,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/replaceBlocks/replaceBlocks.ts","size":2533,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/removeBlocks/removeBlocks.ts","size":123,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/getBlock/getBlock.ts","size":2452,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/insertContentAt.ts","size":1120,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/selections/selection.ts","size":4698,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/selections/textCursorPosition/textCursorPosition.ts","size":2880,"chunks":["a1ee98a"]},{"name":"./src/util/esmDependencies.ts","size":820,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/markdown/removeUnderlinesRehypePlugin.ts","size":752,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/markdown/util/addSpacesToCheckboxesRehypePlugin.ts","size":969,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/markdown/markdownExporter.ts","size":837,"chunks":["a1ee98a"]},{"name":"./src/api/parsers/html/util/nestedLists.ts","size":2174,"chunks":["a1ee98a"]},{"name":"./src/api/parsers/html/parseHTML.ts","size":503,"chunks":["a1ee98a"]},{"name":"./src/api/parsers/markdown/parseMarkdown.ts","size":1097,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/acceptedMIMETypes.ts","size":115,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/handleFileInsertion.ts","size":3576,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/fileDropExtension.ts","size":884,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/handleVSCodePaste.ts","size":661,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/pasteExtension.ts","size":1552,"chunks":["a1ee98a"]},{"name":"./src/api/nodeConversions/fragmentToBlocks.ts","size":859,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/toClipboard/copyExtension.ts","size":5228,"chunks":["a1ee98a"]},{"name":"./src/extensions/BackgroundColor/BackgroundColorExtension.ts","size":791,"chunks":["a1ee98a"]},{"name":"./src/extensions/Collaboration/createCollaborationExtensions.ts","size":3728,"chunks":["a1ee98a"]},{"name":"./src/util/EventEmitter.ts","size":744,"chunks":["a1ee98a"]},{"name":"./src/extensions/FilePanel/FilePanelPlugin.ts","size":3584,"chunks":["a1ee98a"]},{"name":"./src/extensions/FormattingToolbar/FormattingToolbarPlugin.ts","size":5240,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/mergeBlocks/mergeBlocks.ts","size":3228,"chunks":["a1ee98a"]},{"name":"./src/extensions/KeyboardShortcuts/KeyboardShortcutsExtension.ts","size":14774,"chunks":["a1ee98a"]},{"name":"./src/extensions/LinkToolbar/LinkToolbarPlugin.ts","size":7557,"chunks":["a1ee98a"]},{"name":"./src/extensions/LinkToolbar/protocols.ts","size":172,"chunks":["a1ee98a"]},{"name":"./src/extensions/NodeSelectionKeyboard/NodeSelectionKeyboardPlugin.ts","size":1195,"chunks":["a1ee98a"]},{"name":"./src/extensions/Placeholder/PlaceholderPlugin.ts","size":3609,"chunks":["a1ee98a"]},{"name":"./src/extensions/PreviousBlockType/PreviousBlockTypePlugin.ts","size":4820,"chunks":["a1ee98a"]},{"name":"./src/extensions/getDraggableBlockFromElement.ts","size":404,"chunks":["a1ee98a"]},{"name":"./src/extensions/SideMenu/MultipleNodeSelection.ts","size":1616,"chunks":["a1ee98a"]},{"name":"./src/extensions/SideMenu/dragging.ts","size":4482,"chunks":["a1ee98a"]},{"name":"./src/extensions/SideMenu/SideMenuPlugin.ts","size":13634,"chunks":["a1ee98a"]},{"name":"./src/extensions/SuggestionMenu/SuggestionPlugin.ts","size":8070,"chunks":["a1ee98a"]},{"name":"./src/extensions/TableHandles/TableHandlesPlugin.ts","size":19400,"chunks":["a1ee98a"]},{"name":"./src/extensions/TextAlignment/TextAlignmentExtension.ts","size":928,"chunks":["a1ee98a"]},{"name":"./src/extensions/TextColor/TextColorExtension.ts","size":725,"chunks":["a1ee98a"]},{"name":"./src/extensions/TrailingNode/TrailingNodeExtension.ts","size":1563,"chunks":["a1ee98a"]},{"name":"./src/pm-nodes/BlockContainer.ts","size":2038,"chunks":["a1ee98a"]},{"name":"./src/pm-nodes/BlockGroup.ts","size":1102,"chunks":["a1ee98a"]},{"name":"./src/pm-nodes/Doc.ts","size":90,"chunks":["a1ee98a"]},{"name":"./src/editor/BlockNoteExtensions.ts","size":4416,"chunks":["a1ee98a"]},{"name":"./src/editor/transformPasted.ts","size":2604,"chunks":["a1ee98a"]},{"name":"./src/editor/BlockNoteTipTapEditor.ts","size":3732,"chunks":["a1ee98a"]},{"name":"./src/style.css","size":0,"chunks":["a1ee98a"]},{"name":"./src/editor/BlockNoteEditor.ts","size":26795,"chunks":["a1ee98a"]},{"name":"./src/editor/defaultColors.ts","size":1193,"chunks":["a1ee98a"]},{"name":"./src/exporter/Exporter.ts","size":1075,"chunks":["a1ee98a"]},{"name":"./src/exporter/mapping.ts","size":197,"chunks":["a1ee98a"]},{"name":"./src/extensions/SuggestionMenu/getDefaultEmojiPickerItems.ts","size":700,"chunks":["a1ee98a"]},{"name":"./src/util/combineByGroup.ts","size":550,"chunks":["a1ee98a"]},{"name":"./src/api/testUtil/partialBlockTestUtil.ts","size":3149,"chunks":["a1ee98a"]},{"name":"./src/index.ts","size":0,"chunks":["a1ee98a"]}]}
|
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"*.css"
|
|
7
7
|
],
|
|
8
8
|
"license": "MPL-2.0",
|
|
9
|
-
"version": "0.
|
|
9
|
+
"version": "0.24.0",
|
|
10
10
|
"files": [
|
|
11
11
|
"dist",
|
|
12
12
|
"types",
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
"prosemirror-state": "^1.4.3",
|
|
86
86
|
"prosemirror-tables": "^1.6.1",
|
|
87
87
|
"prosemirror-transform": "^1.10.2",
|
|
88
|
-
"prosemirror-view": "^1.
|
|
88
|
+
"prosemirror-view": "^1.38.0",
|
|
89
89
|
"rehype-format": "^5.0.0",
|
|
90
90
|
"rehype-parse": "^8.0.4",
|
|
91
91
|
"rehype-remark": "^9.1.2",
|
|
@@ -124,5 +124,5 @@
|
|
|
124
124
|
"access": "public",
|
|
125
125
|
"registry": "https://registry.npmjs.org/"
|
|
126
126
|
},
|
|
127
|
-
"gitHead": "
|
|
127
|
+
"gitHead": "4aa4f25c190f4cc364cbefe25e9b17c25d47e84d"
|
|
128
128
|
}
|
package/src/api/blockManipulation/commands/insertBlocks/__snapshots__/insertBlocks.test.ts.snap
CHANGED
|
@@ -1538,6 +1538,498 @@ exports[`Test insertBlocks > Insert single basic block after 1`] = `
|
|
|
1538
1538
|
]
|
|
1539
1539
|
`;
|
|
1540
1540
|
|
|
1541
|
+
exports[`Test insertBlocks > Insert single basic block before (without type) 1`] = `
|
|
1542
|
+
[
|
|
1543
|
+
{
|
|
1544
|
+
"children": [],
|
|
1545
|
+
"content": [
|
|
1546
|
+
{
|
|
1547
|
+
"styles": {},
|
|
1548
|
+
"text": "test",
|
|
1549
|
+
"type": "text",
|
|
1550
|
+
},
|
|
1551
|
+
],
|
|
1552
|
+
"id": "0",
|
|
1553
|
+
"props": {
|
|
1554
|
+
"backgroundColor": "default",
|
|
1555
|
+
"textAlignment": "left",
|
|
1556
|
+
"textColor": "default",
|
|
1557
|
+
},
|
|
1558
|
+
"type": "paragraph",
|
|
1559
|
+
},
|
|
1560
|
+
{
|
|
1561
|
+
"children": [],
|
|
1562
|
+
"content": [
|
|
1563
|
+
{
|
|
1564
|
+
"styles": {},
|
|
1565
|
+
"text": "Paragraph 0",
|
|
1566
|
+
"type": "text",
|
|
1567
|
+
},
|
|
1568
|
+
],
|
|
1569
|
+
"id": "paragraph-0",
|
|
1570
|
+
"props": {
|
|
1571
|
+
"backgroundColor": "default",
|
|
1572
|
+
"textAlignment": "left",
|
|
1573
|
+
"textColor": "default",
|
|
1574
|
+
},
|
|
1575
|
+
"type": "paragraph",
|
|
1576
|
+
},
|
|
1577
|
+
{
|
|
1578
|
+
"children": [],
|
|
1579
|
+
"content": [
|
|
1580
|
+
{
|
|
1581
|
+
"styles": {},
|
|
1582
|
+
"text": "Paragraph 1",
|
|
1583
|
+
"type": "text",
|
|
1584
|
+
},
|
|
1585
|
+
],
|
|
1586
|
+
"id": "paragraph-1",
|
|
1587
|
+
"props": {
|
|
1588
|
+
"backgroundColor": "default",
|
|
1589
|
+
"textAlignment": "left",
|
|
1590
|
+
"textColor": "default",
|
|
1591
|
+
},
|
|
1592
|
+
"type": "paragraph",
|
|
1593
|
+
},
|
|
1594
|
+
{
|
|
1595
|
+
"children": [
|
|
1596
|
+
{
|
|
1597
|
+
"children": [
|
|
1598
|
+
{
|
|
1599
|
+
"children": [],
|
|
1600
|
+
"content": [
|
|
1601
|
+
{
|
|
1602
|
+
"styles": {},
|
|
1603
|
+
"text": "Double Nested Paragraph 0",
|
|
1604
|
+
"type": "text",
|
|
1605
|
+
},
|
|
1606
|
+
],
|
|
1607
|
+
"id": "double-nested-paragraph-0",
|
|
1608
|
+
"props": {
|
|
1609
|
+
"backgroundColor": "default",
|
|
1610
|
+
"textAlignment": "left",
|
|
1611
|
+
"textColor": "default",
|
|
1612
|
+
},
|
|
1613
|
+
"type": "paragraph",
|
|
1614
|
+
},
|
|
1615
|
+
],
|
|
1616
|
+
"content": [
|
|
1617
|
+
{
|
|
1618
|
+
"styles": {},
|
|
1619
|
+
"text": "Nested Paragraph 0",
|
|
1620
|
+
"type": "text",
|
|
1621
|
+
},
|
|
1622
|
+
],
|
|
1623
|
+
"id": "nested-paragraph-0",
|
|
1624
|
+
"props": {
|
|
1625
|
+
"backgroundColor": "default",
|
|
1626
|
+
"textAlignment": "left",
|
|
1627
|
+
"textColor": "default",
|
|
1628
|
+
},
|
|
1629
|
+
"type": "paragraph",
|
|
1630
|
+
},
|
|
1631
|
+
],
|
|
1632
|
+
"content": [
|
|
1633
|
+
{
|
|
1634
|
+
"styles": {},
|
|
1635
|
+
"text": "Paragraph with children",
|
|
1636
|
+
"type": "text",
|
|
1637
|
+
},
|
|
1638
|
+
],
|
|
1639
|
+
"id": "paragraph-with-children",
|
|
1640
|
+
"props": {
|
|
1641
|
+
"backgroundColor": "default",
|
|
1642
|
+
"textAlignment": "left",
|
|
1643
|
+
"textColor": "default",
|
|
1644
|
+
},
|
|
1645
|
+
"type": "paragraph",
|
|
1646
|
+
},
|
|
1647
|
+
{
|
|
1648
|
+
"children": [],
|
|
1649
|
+
"content": [
|
|
1650
|
+
{
|
|
1651
|
+
"styles": {},
|
|
1652
|
+
"text": "Paragraph 2",
|
|
1653
|
+
"type": "text",
|
|
1654
|
+
},
|
|
1655
|
+
],
|
|
1656
|
+
"id": "paragraph-2",
|
|
1657
|
+
"props": {
|
|
1658
|
+
"backgroundColor": "default",
|
|
1659
|
+
"textAlignment": "left",
|
|
1660
|
+
"textColor": "default",
|
|
1661
|
+
},
|
|
1662
|
+
"type": "paragraph",
|
|
1663
|
+
},
|
|
1664
|
+
{
|
|
1665
|
+
"children": [],
|
|
1666
|
+
"content": [
|
|
1667
|
+
{
|
|
1668
|
+
"styles": {},
|
|
1669
|
+
"text": "Paragraph with props",
|
|
1670
|
+
"type": "text",
|
|
1671
|
+
},
|
|
1672
|
+
],
|
|
1673
|
+
"id": "paragraph-with-props",
|
|
1674
|
+
"props": {
|
|
1675
|
+
"backgroundColor": "default",
|
|
1676
|
+
"textAlignment": "center",
|
|
1677
|
+
"textColor": "red",
|
|
1678
|
+
},
|
|
1679
|
+
"type": "paragraph",
|
|
1680
|
+
},
|
|
1681
|
+
{
|
|
1682
|
+
"children": [],
|
|
1683
|
+
"content": [
|
|
1684
|
+
{
|
|
1685
|
+
"styles": {},
|
|
1686
|
+
"text": "Paragraph 3",
|
|
1687
|
+
"type": "text",
|
|
1688
|
+
},
|
|
1689
|
+
],
|
|
1690
|
+
"id": "paragraph-3",
|
|
1691
|
+
"props": {
|
|
1692
|
+
"backgroundColor": "default",
|
|
1693
|
+
"textAlignment": "left",
|
|
1694
|
+
"textColor": "default",
|
|
1695
|
+
},
|
|
1696
|
+
"type": "paragraph",
|
|
1697
|
+
},
|
|
1698
|
+
{
|
|
1699
|
+
"children": [],
|
|
1700
|
+
"content": [
|
|
1701
|
+
{
|
|
1702
|
+
"styles": {
|
|
1703
|
+
"bold": true,
|
|
1704
|
+
},
|
|
1705
|
+
"text": "Paragraph",
|
|
1706
|
+
"type": "text",
|
|
1707
|
+
},
|
|
1708
|
+
{
|
|
1709
|
+
"styles": {},
|
|
1710
|
+
"text": " with styled ",
|
|
1711
|
+
"type": "text",
|
|
1712
|
+
},
|
|
1713
|
+
{
|
|
1714
|
+
"styles": {
|
|
1715
|
+
"italic": true,
|
|
1716
|
+
},
|
|
1717
|
+
"text": "content",
|
|
1718
|
+
"type": "text",
|
|
1719
|
+
},
|
|
1720
|
+
],
|
|
1721
|
+
"id": "paragraph-with-styled-content",
|
|
1722
|
+
"props": {
|
|
1723
|
+
"backgroundColor": "default",
|
|
1724
|
+
"textAlignment": "left",
|
|
1725
|
+
"textColor": "default",
|
|
1726
|
+
},
|
|
1727
|
+
"type": "paragraph",
|
|
1728
|
+
},
|
|
1729
|
+
{
|
|
1730
|
+
"children": [],
|
|
1731
|
+
"content": [
|
|
1732
|
+
{
|
|
1733
|
+
"styles": {},
|
|
1734
|
+
"text": "Paragraph 4",
|
|
1735
|
+
"type": "text",
|
|
1736
|
+
},
|
|
1737
|
+
],
|
|
1738
|
+
"id": "paragraph-4",
|
|
1739
|
+
"props": {
|
|
1740
|
+
"backgroundColor": "default",
|
|
1741
|
+
"textAlignment": "left",
|
|
1742
|
+
"textColor": "default",
|
|
1743
|
+
},
|
|
1744
|
+
"type": "paragraph",
|
|
1745
|
+
},
|
|
1746
|
+
{
|
|
1747
|
+
"children": [],
|
|
1748
|
+
"content": [
|
|
1749
|
+
{
|
|
1750
|
+
"styles": {},
|
|
1751
|
+
"text": "Heading 1",
|
|
1752
|
+
"type": "text",
|
|
1753
|
+
},
|
|
1754
|
+
],
|
|
1755
|
+
"id": "heading-0",
|
|
1756
|
+
"props": {
|
|
1757
|
+
"backgroundColor": "default",
|
|
1758
|
+
"level": 1,
|
|
1759
|
+
"textAlignment": "left",
|
|
1760
|
+
"textColor": "default",
|
|
1761
|
+
},
|
|
1762
|
+
"type": "heading",
|
|
1763
|
+
},
|
|
1764
|
+
{
|
|
1765
|
+
"children": [],
|
|
1766
|
+
"content": [
|
|
1767
|
+
{
|
|
1768
|
+
"styles": {},
|
|
1769
|
+
"text": "Paragraph 5",
|
|
1770
|
+
"type": "text",
|
|
1771
|
+
},
|
|
1772
|
+
],
|
|
1773
|
+
"id": "paragraph-5",
|
|
1774
|
+
"props": {
|
|
1775
|
+
"backgroundColor": "default",
|
|
1776
|
+
"textAlignment": "left",
|
|
1777
|
+
"textColor": "default",
|
|
1778
|
+
},
|
|
1779
|
+
"type": "paragraph",
|
|
1780
|
+
},
|
|
1781
|
+
{
|
|
1782
|
+
"children": [],
|
|
1783
|
+
"content": undefined,
|
|
1784
|
+
"id": "image-0",
|
|
1785
|
+
"props": {
|
|
1786
|
+
"backgroundColor": "default",
|
|
1787
|
+
"caption": "",
|
|
1788
|
+
"name": "",
|
|
1789
|
+
"previewWidth": 512,
|
|
1790
|
+
"showPreview": true,
|
|
1791
|
+
"textAlignment": "left",
|
|
1792
|
+
"url": "https://via.placeholder.com/150",
|
|
1793
|
+
},
|
|
1794
|
+
"type": "image",
|
|
1795
|
+
},
|
|
1796
|
+
{
|
|
1797
|
+
"children": [],
|
|
1798
|
+
"content": [
|
|
1799
|
+
{
|
|
1800
|
+
"styles": {},
|
|
1801
|
+
"text": "Paragraph 6",
|
|
1802
|
+
"type": "text",
|
|
1803
|
+
},
|
|
1804
|
+
],
|
|
1805
|
+
"id": "paragraph-6",
|
|
1806
|
+
"props": {
|
|
1807
|
+
"backgroundColor": "default",
|
|
1808
|
+
"textAlignment": "left",
|
|
1809
|
+
"textColor": "default",
|
|
1810
|
+
},
|
|
1811
|
+
"type": "paragraph",
|
|
1812
|
+
},
|
|
1813
|
+
{
|
|
1814
|
+
"children": [],
|
|
1815
|
+
"content": {
|
|
1816
|
+
"columnWidths": [
|
|
1817
|
+
undefined,
|
|
1818
|
+
undefined,
|
|
1819
|
+
undefined,
|
|
1820
|
+
],
|
|
1821
|
+
"rows": [
|
|
1822
|
+
{
|
|
1823
|
+
"cells": [
|
|
1824
|
+
[
|
|
1825
|
+
{
|
|
1826
|
+
"styles": {},
|
|
1827
|
+
"text": "Cell 1",
|
|
1828
|
+
"type": "text",
|
|
1829
|
+
},
|
|
1830
|
+
],
|
|
1831
|
+
[
|
|
1832
|
+
{
|
|
1833
|
+
"styles": {},
|
|
1834
|
+
"text": "Cell 2",
|
|
1835
|
+
"type": "text",
|
|
1836
|
+
},
|
|
1837
|
+
],
|
|
1838
|
+
[
|
|
1839
|
+
{
|
|
1840
|
+
"styles": {},
|
|
1841
|
+
"text": "Cell 3",
|
|
1842
|
+
"type": "text",
|
|
1843
|
+
},
|
|
1844
|
+
],
|
|
1845
|
+
],
|
|
1846
|
+
},
|
|
1847
|
+
{
|
|
1848
|
+
"cells": [
|
|
1849
|
+
[
|
|
1850
|
+
{
|
|
1851
|
+
"styles": {},
|
|
1852
|
+
"text": "Cell 4",
|
|
1853
|
+
"type": "text",
|
|
1854
|
+
},
|
|
1855
|
+
],
|
|
1856
|
+
[
|
|
1857
|
+
{
|
|
1858
|
+
"styles": {},
|
|
1859
|
+
"text": "Cell 5",
|
|
1860
|
+
"type": "text",
|
|
1861
|
+
},
|
|
1862
|
+
],
|
|
1863
|
+
[
|
|
1864
|
+
{
|
|
1865
|
+
"styles": {},
|
|
1866
|
+
"text": "Cell 6",
|
|
1867
|
+
"type": "text",
|
|
1868
|
+
},
|
|
1869
|
+
],
|
|
1870
|
+
],
|
|
1871
|
+
},
|
|
1872
|
+
{
|
|
1873
|
+
"cells": [
|
|
1874
|
+
[
|
|
1875
|
+
{
|
|
1876
|
+
"styles": {},
|
|
1877
|
+
"text": "Cell 7",
|
|
1878
|
+
"type": "text",
|
|
1879
|
+
},
|
|
1880
|
+
],
|
|
1881
|
+
[
|
|
1882
|
+
{
|
|
1883
|
+
"styles": {},
|
|
1884
|
+
"text": "Cell 8",
|
|
1885
|
+
"type": "text",
|
|
1886
|
+
},
|
|
1887
|
+
],
|
|
1888
|
+
[
|
|
1889
|
+
{
|
|
1890
|
+
"styles": {},
|
|
1891
|
+
"text": "Cell 9",
|
|
1892
|
+
"type": "text",
|
|
1893
|
+
},
|
|
1894
|
+
],
|
|
1895
|
+
],
|
|
1896
|
+
},
|
|
1897
|
+
],
|
|
1898
|
+
"type": "tableContent",
|
|
1899
|
+
},
|
|
1900
|
+
"id": "table-0",
|
|
1901
|
+
"props": {
|
|
1902
|
+
"textColor": "default",
|
|
1903
|
+
},
|
|
1904
|
+
"type": "table",
|
|
1905
|
+
},
|
|
1906
|
+
{
|
|
1907
|
+
"children": [],
|
|
1908
|
+
"content": [
|
|
1909
|
+
{
|
|
1910
|
+
"styles": {},
|
|
1911
|
+
"text": "Paragraph 7",
|
|
1912
|
+
"type": "text",
|
|
1913
|
+
},
|
|
1914
|
+
],
|
|
1915
|
+
"id": "paragraph-7",
|
|
1916
|
+
"props": {
|
|
1917
|
+
"backgroundColor": "default",
|
|
1918
|
+
"textAlignment": "left",
|
|
1919
|
+
"textColor": "default",
|
|
1920
|
+
},
|
|
1921
|
+
"type": "paragraph",
|
|
1922
|
+
},
|
|
1923
|
+
{
|
|
1924
|
+
"children": [],
|
|
1925
|
+
"content": [],
|
|
1926
|
+
"id": "empty-paragraph",
|
|
1927
|
+
"props": {
|
|
1928
|
+
"backgroundColor": "default",
|
|
1929
|
+
"textAlignment": "left",
|
|
1930
|
+
"textColor": "default",
|
|
1931
|
+
},
|
|
1932
|
+
"type": "paragraph",
|
|
1933
|
+
},
|
|
1934
|
+
{
|
|
1935
|
+
"children": [],
|
|
1936
|
+
"content": [
|
|
1937
|
+
{
|
|
1938
|
+
"styles": {},
|
|
1939
|
+
"text": "Paragraph 8",
|
|
1940
|
+
"type": "text",
|
|
1941
|
+
},
|
|
1942
|
+
],
|
|
1943
|
+
"id": "paragraph-8",
|
|
1944
|
+
"props": {
|
|
1945
|
+
"backgroundColor": "default",
|
|
1946
|
+
"textAlignment": "left",
|
|
1947
|
+
"textColor": "default",
|
|
1948
|
+
},
|
|
1949
|
+
"type": "paragraph",
|
|
1950
|
+
},
|
|
1951
|
+
{
|
|
1952
|
+
"children": [
|
|
1953
|
+
{
|
|
1954
|
+
"children": [
|
|
1955
|
+
{
|
|
1956
|
+
"children": [],
|
|
1957
|
+
"content": [
|
|
1958
|
+
{
|
|
1959
|
+
"styles": {},
|
|
1960
|
+
"text": "Double Nested Paragraph 1",
|
|
1961
|
+
"type": "text",
|
|
1962
|
+
},
|
|
1963
|
+
],
|
|
1964
|
+
"id": "double-nested-paragraph-1",
|
|
1965
|
+
"props": {
|
|
1966
|
+
"backgroundColor": "default",
|
|
1967
|
+
"textAlignment": "left",
|
|
1968
|
+
"textColor": "default",
|
|
1969
|
+
},
|
|
1970
|
+
"type": "paragraph",
|
|
1971
|
+
},
|
|
1972
|
+
],
|
|
1973
|
+
"content": [
|
|
1974
|
+
{
|
|
1975
|
+
"styles": {},
|
|
1976
|
+
"text": "Nested Paragraph 1",
|
|
1977
|
+
"type": "text",
|
|
1978
|
+
},
|
|
1979
|
+
],
|
|
1980
|
+
"id": "nested-paragraph-1",
|
|
1981
|
+
"props": {
|
|
1982
|
+
"backgroundColor": "default",
|
|
1983
|
+
"textAlignment": "left",
|
|
1984
|
+
"textColor": "default",
|
|
1985
|
+
},
|
|
1986
|
+
"type": "paragraph",
|
|
1987
|
+
},
|
|
1988
|
+
],
|
|
1989
|
+
"content": [
|
|
1990
|
+
{
|
|
1991
|
+
"styles": {
|
|
1992
|
+
"bold": true,
|
|
1993
|
+
},
|
|
1994
|
+
"text": "Heading",
|
|
1995
|
+
"type": "text",
|
|
1996
|
+
},
|
|
1997
|
+
{
|
|
1998
|
+
"styles": {},
|
|
1999
|
+
"text": " with styled ",
|
|
2000
|
+
"type": "text",
|
|
2001
|
+
},
|
|
2002
|
+
{
|
|
2003
|
+
"styles": {
|
|
2004
|
+
"italic": true,
|
|
2005
|
+
},
|
|
2006
|
+
"text": "content",
|
|
2007
|
+
"type": "text",
|
|
2008
|
+
},
|
|
2009
|
+
],
|
|
2010
|
+
"id": "heading-with-everything",
|
|
2011
|
+
"props": {
|
|
2012
|
+
"backgroundColor": "red",
|
|
2013
|
+
"level": 2,
|
|
2014
|
+
"textAlignment": "center",
|
|
2015
|
+
"textColor": "red",
|
|
2016
|
+
},
|
|
2017
|
+
"type": "heading",
|
|
2018
|
+
},
|
|
2019
|
+
{
|
|
2020
|
+
"children": [],
|
|
2021
|
+
"content": [],
|
|
2022
|
+
"id": "trailing-paragraph",
|
|
2023
|
+
"props": {
|
|
2024
|
+
"backgroundColor": "default",
|
|
2025
|
+
"textAlignment": "left",
|
|
2026
|
+
"textColor": "default",
|
|
2027
|
+
},
|
|
2028
|
+
"type": "paragraph",
|
|
2029
|
+
},
|
|
2030
|
+
]
|
|
2031
|
+
`;
|
|
2032
|
+
|
|
1541
2033
|
exports[`Test insertBlocks > Insert single basic block before 1`] = `
|
|
1542
2034
|
[
|
|
1543
2035
|
{
|
|
@@ -6,6 +6,12 @@ import { insertBlocks } from "./insertBlocks.js";
|
|
|
6
6
|
const getEditor = setupTestEnv();
|
|
7
7
|
|
|
8
8
|
describe("Test insertBlocks", () => {
|
|
9
|
+
it("Insert single basic block before (without type)", () => {
|
|
10
|
+
insertBlocks(getEditor(), [{ content: "test" }], "paragraph-0", "before");
|
|
11
|
+
|
|
12
|
+
expect(getEditor().document).toMatchSnapshot();
|
|
13
|
+
});
|
|
14
|
+
|
|
9
15
|
it("Insert single basic block before", () => {
|
|
10
16
|
insertBlocks(getEditor(), [{ type: "paragraph" }], "paragraph-0", "before");
|
|
11
17
|
|