@blocknote/core 0.27.2 → 0.29.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 +10 -10
- package/dist/blocknote.cjs.map +1 -1
- package/dist/blocknote.js +3032 -3118
- package/dist/blocknote.js.map +1 -1
- package/dist/locales.cjs +1 -1
- package/dist/locales.cjs.map +1 -1
- package/dist/locales.js +10 -10
- package/dist/locales.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/webpack-stats.json +1 -1
- package/package.json +2 -2
- package/src/api/__snapshots__/blocks-deleted-nested-deep.json +26 -0
- package/src/api/__snapshots__/blocks-deleted-nested.json +68 -0
- package/src/api/__snapshots__/blocks-deleted.json +26 -0
- package/src/api/__snapshots__/blocks-inserted-nested.json +62 -0
- package/src/api/__snapshots__/blocks-inserted.json +20 -0
- package/src/api/__snapshots__/blocks-updated-content-inserted.json +42 -0
- package/src/api/__snapshots__/blocks-updated-multiple-insert.json +50 -0
- package/src/api/__snapshots__/blocks-updated-multiple.json +82 -0
- package/src/api/__snapshots__/blocks-updated-nested-deep.json +42 -0
- package/src/api/__snapshots__/blocks-updated-nested-multiple.json +118 -0
- package/src/api/__snapshots__/blocks-updated-nested.json +78 -0
- package/src/api/__snapshots__/blocks-updated-single.json +42 -0
- package/src/api/__snapshots__/blocks-updated.json +42 -0
- package/src/api/blockManipulation/__snapshots__/transactions.test.ts.snap +34 -0
- package/src/api/blockManipulation/commands/insertBlocks/__snapshots__/insertBlocks.test.ts.snap +312 -0
- package/src/api/blockManipulation/commands/insertBlocks/insertBlocks.test.ts +127 -94
- package/src/api/blockManipulation/commands/insertBlocks/insertBlocks.ts +19 -37
- package/src/api/blockManipulation/commands/mergeBlocks/mergeBlocks.test.ts +8 -6
- package/src/api/blockManipulation/commands/moveBlocks/moveBlocks.test.ts +25 -31
- package/src/api/blockManipulation/commands/moveBlocks/moveBlocks.ts +93 -91
- package/src/api/blockManipulation/commands/nestBlock/nestBlock.ts +16 -20
- package/src/api/blockManipulation/commands/replaceBlocks/replaceBlocks.test.ts +14 -1
- package/src/api/blockManipulation/commands/replaceBlocks/replaceBlocks.ts +18 -56
- package/src/api/blockManipulation/commands/splitBlock/splitBlock.test.ts +52 -46
- package/src/api/blockManipulation/commands/updateBlock/__snapshots__/updateBlock.test.ts.snap +1051 -0
- package/src/api/blockManipulation/commands/updateBlock/updateBlock.test.ts +247 -154
- package/src/api/blockManipulation/commands/updateBlock/updateBlock.ts +109 -142
- package/src/api/blockManipulation/getBlock/getBlock.ts +23 -48
- package/src/api/blockManipulation/insertContentAt.ts +4 -17
- package/src/api/blockManipulation/selections/selection.test.ts +32 -16
- package/src/api/blockManipulation/selections/selection.ts +25 -51
- package/src/api/blockManipulation/selections/textCursorPosition/textCursorPosition.test.ts +35 -14
- package/src/api/blockManipulation/selections/textCursorPosition/textCursorPosition.ts +34 -65
- package/src/api/clipboard/fromClipboard/handleFileInsertion.ts +8 -10
- package/src/api/clipboard/toClipboard/copyExtension.ts +7 -7
- package/src/api/exporters/html/util/serializeBlocksExternalHTML.ts +7 -16
- package/src/api/exporters/html/util/serializeBlocksInternalHTML.ts +3 -17
- package/src/api/getBlockInfoFromPos.ts +13 -1
- package/src/api/nodeConversions/blockToNode.ts +21 -10
- package/src/api/nodeConversions/fragmentToBlocks.ts +5 -18
- package/src/api/nodeConversions/nodeToBlock.ts +11 -8
- package/src/api/nodeUtil.test.ts +228 -0
- package/src/api/nodeUtil.ts +235 -2
- package/src/api/parsers/html/parseHTML.ts +2 -10
- package/src/api/parsers/markdown/parseMarkdown.ts +2 -8
- package/src/api/pmUtil.ts +54 -0
- package/src/api/positionMapping.test.ts +370 -0
- package/src/api/positionMapping.ts +114 -0
- package/src/blocks/FileBlockContent/helpers/render/createAddFileButton.ts +2 -2
- package/src/blocks/HeadingBlockContent/HeadingBlockContent.ts +9 -13
- package/src/blocks/ListItemBlockContent/BulletListItemBlockContent/BulletListItemBlockContent.ts +5 -9
- package/src/blocks/ListItemBlockContent/CheckListItemBlockContent/CheckListItemBlockContent.ts +19 -31
- package/src/blocks/ListItemBlockContent/ListItemKeyboardShortcuts.ts +10 -8
- package/src/blocks/ListItemBlockContent/NumberedListItemBlockContent/NumberedListItemBlockContent.ts +9 -13
- package/src/blocks/ParagraphBlockContent/ParagraphBlockContent.ts +1 -1
- package/src/blocks/QuoteBlockContent/QuoteBlockContent.ts +5 -9
- package/src/blocks/defaultBlockHelpers.ts +1 -1
- package/src/editor/BlockNoteEditor.test.ts +1 -1
- package/src/editor/BlockNoteEditor.ts +259 -130
- package/src/editor/BlockNoteTipTapEditor.ts +91 -8
- package/src/extensions/Comments/CommentsPlugin.ts +32 -34
- package/src/extensions/KeyboardShortcuts/KeyboardShortcutsExtension.ts +4 -8
- package/src/extensions/LinkToolbar/LinkToolbarPlugin.ts +12 -13
- package/src/extensions/ShowSelection/ShowSelectionPlugin.ts +1 -3
- package/src/extensions/SideMenu/MultipleNodeSelection.ts +3 -1
- package/src/extensions/SideMenu/dragging.ts +1 -1
- package/src/extensions/SuggestionMenu/SuggestionPlugin.ts +38 -25
- package/src/extensions/SuggestionMenu/getDefaultSlashMenuItems.ts +8 -8
- package/src/extensions/TableHandles/TableHandlesPlugin.ts +150 -136
- package/src/i18n/locales/de.ts +10 -10
- package/src/index.ts +4 -3
- package/src/schema/inlineContent/createSpec.ts +1 -5
- package/types/src/api/blockManipulation/commands/insertBlocks/insertBlocks.d.ts +2 -2
- package/types/src/api/blockManipulation/commands/replaceBlocks/replaceBlocks.d.ts +4 -8
- package/types/src/api/blockManipulation/commands/updateBlock/updateBlock.d.ts +9 -10
- package/types/src/api/blockManipulation/getBlock/getBlock.d.ts +7 -7
- package/types/src/api/blockManipulation/insertContentAt.d.ts +5 -3
- package/types/src/api/blockManipulation/selections/selection.d.ts +3 -3
- package/types/src/api/blockManipulation/selections/textCursorPosition/textCursorPosition.d.ts +5 -5
- package/types/src/api/getBlockInfoFromPos.d.ts +8 -1
- package/types/src/api/nodeConversions/blockToNode.d.ts +3 -3
- package/types/src/api/nodeConversions/fragmentToBlocks.d.ts +1 -2
- package/types/src/api/nodeConversions/nodeToBlock.d.ts +2 -2
- package/types/src/api/nodeUtil.d.ts +67 -1
- package/types/src/api/parsers/html/parseHTML.d.ts +1 -1
- package/types/src/api/parsers/markdown/parseMarkdown.d.ts +1 -1
- package/types/src/api/pmUtil.d.ts +12 -0
- package/types/src/api/positionMapping.d.ts +25 -0
- package/types/src/editor/BlockNoteEditor.d.ts +72 -10
- package/types/src/editor/BlockNoteTipTapEditor.d.ts +15 -2
- package/types/src/extensions/TableHandles/TableHandlesPlugin.d.ts +1 -1
- package/types/src/index.d.ts +1 -2
- package/src/api/blockManipulation/commands/removeBlocks/__snapshots__/removeBlocks.test.ts.snap +0 -1859
- package/src/api/blockManipulation/commands/removeBlocks/removeBlocks.test.ts +0 -40
- package/src/api/blockManipulation/commands/removeBlocks/removeBlocks.ts +0 -20
- package/src/api/clipboard/__snapshots__/external/pasteEndOfParagraph.html +0 -138
- package/src/api/clipboard/__snapshots__/external/pasteEndOfParagraphText.html +0 -138
- package/src/api/clipboard/__snapshots__/external/pasteImage.html +0 -153
- package/src/api/clipboard/__snapshots__/external/pasteParagraphInCustomBlock.html +0 -138
- package/src/api/clipboard/__snapshots__/external/pasteTable.html +0 -233
- package/src/api/clipboard/__snapshots__/external/pasteTableInExistingTable.html +0 -216
- package/src/api/clipboard/__snapshots__/internal/basicBlocks.html +0 -1
- package/src/api/clipboard/__snapshots__/internal/basicBlocksWithProps.html +0 -1
- package/src/api/clipboard/__snapshots__/internal/childToParent.html +0 -1
- package/src/api/clipboard/__snapshots__/internal/childrenToNextParent.html +0 -1
- package/src/api/clipboard/__snapshots__/internal/childrenToNextParentsChildren.html +0 -1
- package/src/api/clipboard/__snapshots__/internal/image.html +0 -1
- package/src/api/clipboard/__snapshots__/internal/multipleChildren.html +0 -1
- package/src/api/clipboard/__snapshots__/internal/multipleStyledText.html +0 -1
- package/src/api/clipboard/__snapshots__/internal/nestedImage.html +0 -1
- package/src/api/clipboard/__snapshots__/internal/paragraphInCustomBlock.html +0 -1
- package/src/api/clipboard/__snapshots__/internal/partialChildToParent.html +0 -1
- package/src/api/clipboard/__snapshots__/internal/styledText.html +0 -1
- package/src/api/clipboard/__snapshots__/internal/tableAllCells.html +0 -1
- package/src/api/clipboard/__snapshots__/internal/tableCell.html +0 -1
- package/src/api/clipboard/__snapshots__/internal/tableCellText.html +0 -1
- package/src/api/clipboard/__snapshots__/internal/tableRow.html +0 -1
- package/src/api/clipboard/__snapshots__/internal/unstyledText.html +0 -1
- package/src/api/clipboard/clipboardExternal.test.ts +0 -161
- package/src/api/clipboard/clipboardInternal.test.ts +0 -435
- package/src/api/clipboard/testUtil.ts +0 -27
- package/src/api/exporters/html/__snapshots__/codeBlock/contains-newlines/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/codeBlock/contains-newlines/internal.html +0 -3
- package/src/api/exporters/html/__snapshots__/codeBlock/defaultLanguage/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/codeBlock/defaultLanguage/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/codeBlock/empty/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/codeBlock/empty/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/codeBlock/python/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/codeBlock/python/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/complex/misc/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/complex/misc/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/customBlock/basic/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/customBlock/basic/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/customParagraph/basic/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/customParagraph/basic/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/customParagraph/lineBreaks/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/customParagraph/lineBreaks/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/customParagraph/nested/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/customParagraph/nested/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/customParagraph/styled/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/customParagraph/styled/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/file/basic/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/file/basic/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/file/button/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/file/button/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/file/nested/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/file/nested/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/file/noCaption/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/file/noCaption/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/file/noName/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/file/noName/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/fontSize/basic/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/fontSize/basic/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/hardbreak/basic/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/hardbreak/basic/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/hardbreak/between-links/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/hardbreak/between-links/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/hardbreak/end/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/hardbreak/end/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/hardbreak/link/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/hardbreak/link/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/hardbreak/multiple/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/hardbreak/multiple/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/hardbreak/only/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/hardbreak/only/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/hardbreak/start/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/hardbreak/start/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/hardbreak/styles/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/hardbreak/styles/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/image/basic/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/image/basic/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/image/button/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/image/button/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/image/nested/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/image/nested/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/image/noCaption/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/image/noCaption/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/image/noName/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/image/noName/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/image/noPreview/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/image/noPreview/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/link/adjacent/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/link/adjacent/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/link/basic/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/link/basic/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/link/styled/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/link/styled/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/lists/basic/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/lists/basic/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/lists/nested/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/lists/nested/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/mention/basic/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/mention/basic/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/pageBreak/basic/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/pageBreak/basic/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/paragraph/basic/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/paragraph/basic/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/paragraph/empty/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/paragraph/empty/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/paragraph/lineBreaks/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/paragraph/lineBreaks/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/paragraph/nested/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/paragraph/nested/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/paragraph/styled/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/paragraph/styled/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/paste/parse-basic-block-types.json +0 -140
- package/src/api/exporters/html/__snapshots__/paste/parse-deep-nested-content.json +0 -240
- package/src/api/exporters/html/__snapshots__/paste/parse-div-with-inline-content.json +0 -91
- package/src/api/exporters/html/__snapshots__/paste/parse-divs.json +0 -19
- package/src/api/exporters/html/__snapshots__/paste/parse-fake-image-caption.json +0 -31
- package/src/api/exporters/html/__snapshots__/paste/parse-mixed-nested-lists.json +0 -70
- package/src/api/exporters/html/__snapshots__/paste/parse-nested-lists-with-paragraphs.json +0 -70
- package/src/api/exporters/html/__snapshots__/paste/parse-nested-lists.json +0 -70
- package/src/api/exporters/html/__snapshots__/simpleCustomParagraph/basic/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/simpleCustomParagraph/basic/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/simpleCustomParagraph/nested/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/simpleCustomParagraph/nested/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/simpleCustomParagraph/styled/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/simpleCustomParagraph/styled/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/simpleFile/basic/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/simpleFile/basic/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/simpleFile/button/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/simpleFile/button/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/simpleFile/nested/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/simpleFile/nested/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/simpleImage/basic/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/simpleImage/basic/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/simpleImage/button/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/simpleImage/button/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/simpleImage/nested/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/simpleImage/nested/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/simpleImage/noCaption/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/simpleImage/noCaption/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/simpleImage/noName/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/simpleImage/noName/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/simpleImage/noPreview/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/simpleImage/noPreview/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/small/basic/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/small/basic/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/table/allColWidths/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/table/allColWidths/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/table/basic/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/table/basic/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/table/headerCols/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/table/headerCols/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/table/headerRows/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/table/headerRows/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/table/headersRows/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/table/headersRows/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/table/mixedCellColors/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/table/mixedCellColors/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/table/mixedColWidths/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/table/mixedColWidths/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/table/mixedRowspansAndColspans/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/table/mixedRowspansAndColspans/internal.html +0 -1
- package/src/api/exporters/html/__snapshots__/tag/basic/external.html +0 -1
- package/src/api/exporters/html/__snapshots__/tag/basic/internal.html +0 -1
- package/src/api/exporters/html/htmlConversion.test.ts +0 -110
- package/src/api/exporters/markdown/__snapshots__/codeBlock/contains-newlines/markdown.md +0 -4
- package/src/api/exporters/markdown/__snapshots__/codeBlock/defaultLanguage/markdown.md +0 -3
- package/src/api/exporters/markdown/__snapshots__/codeBlock/empty/markdown.md +0 -2
- package/src/api/exporters/markdown/__snapshots__/codeBlock/python/markdown.md +0 -3
- package/src/api/exporters/markdown/__snapshots__/complex/misc/markdown.md +0 -5
- package/src/api/exporters/markdown/__snapshots__/customBlock/basic/markdown.md +0 -5
- package/src/api/exporters/markdown/__snapshots__/customParagraph/basic/markdown.md +0 -1
- package/src/api/exporters/markdown/__snapshots__/customParagraph/lineBreaks/markdown.md +0 -1
- package/src/api/exporters/markdown/__snapshots__/customParagraph/nested/markdown.md +0 -5
- package/src/api/exporters/markdown/__snapshots__/customParagraph/styled/markdown.md +0 -1
- package/src/api/exporters/markdown/__snapshots__/file/basic/markdown.md +0 -3
- package/src/api/exporters/markdown/__snapshots__/file/button/markdown.md +0 -1
- package/src/api/exporters/markdown/__snapshots__/file/nested/markdown.md +0 -7
- package/src/api/exporters/markdown/__snapshots__/file/noCaption/markdown.md +0 -1
- package/src/api/exporters/markdown/__snapshots__/file/noName/markdown.md +0 -3
- package/src/api/exporters/markdown/__snapshots__/fontSize/basic/markdown.md +0 -1
- package/src/api/exporters/markdown/__snapshots__/hardbreak/basic/markdown.md +0 -2
- package/src/api/exporters/markdown/__snapshots__/hardbreak/between-links/markdown.md +0 -2
- package/src/api/exporters/markdown/__snapshots__/hardbreak/end/markdown.md +0 -1
- package/src/api/exporters/markdown/__snapshots__/hardbreak/link/markdown.md +0 -2
- package/src/api/exporters/markdown/__snapshots__/hardbreak/multiple/markdown.md +0 -3
- package/src/api/exporters/markdown/__snapshots__/hardbreak/only/markdown.md +0 -0
- package/src/api/exporters/markdown/__snapshots__/hardbreak/start/markdown.md +0 -1
- package/src/api/exporters/markdown/__snapshots__/hardbreak/styles/markdown.md +0 -2
- package/src/api/exporters/markdown/__snapshots__/image/basic/markdown.md +0 -3
- package/src/api/exporters/markdown/__snapshots__/image/button/markdown.md +0 -1
- package/src/api/exporters/markdown/__snapshots__/image/nested/markdown.md +0 -7
- package/src/api/exporters/markdown/__snapshots__/image/noCaption/markdown.md +0 -1
- package/src/api/exporters/markdown/__snapshots__/image/noName/markdown.md +0 -3
- package/src/api/exporters/markdown/__snapshots__/image/noPreview/markdown.md +0 -3
- package/src/api/exporters/markdown/__snapshots__/link/adjacent/markdown.md +0 -1
- package/src/api/exporters/markdown/__snapshots__/link/basic/markdown.md +0 -1
- package/src/api/exporters/markdown/__snapshots__/link/styled/markdown.md +0 -1
- package/src/api/exporters/markdown/__snapshots__/lists/basic/markdown.md +0 -10
- package/src/api/exporters/markdown/__snapshots__/lists/nested/markdown.md +0 -10
- package/src/api/exporters/markdown/__snapshots__/mention/basic/markdown.md +0 -1
- package/src/api/exporters/markdown/__snapshots__/pageBreak/basic/markdown.md +0 -0
- package/src/api/exporters/markdown/__snapshots__/paragraph/basic/markdown.md +0 -1
- package/src/api/exporters/markdown/__snapshots__/paragraph/empty/markdown.md +0 -0
- package/src/api/exporters/markdown/__snapshots__/paragraph/lineBreaks/markdown.md +0 -2
- package/src/api/exporters/markdown/__snapshots__/paragraph/nested/markdown.md +0 -5
- package/src/api/exporters/markdown/__snapshots__/paragraph/styled/markdown.md +0 -1
- package/src/api/exporters/markdown/__snapshots__/simpleCustomParagraph/basic/markdown.md +0 -1
- package/src/api/exporters/markdown/__snapshots__/simpleCustomParagraph/nested/markdown.md +0 -5
- package/src/api/exporters/markdown/__snapshots__/simpleCustomParagraph/styled/markdown.md +0 -1
- package/src/api/exporters/markdown/__snapshots__/simpleFile/basic/markdown.md +0 -3
- package/src/api/exporters/markdown/__snapshots__/simpleFile/button/markdown.md +0 -1
- package/src/api/exporters/markdown/__snapshots__/simpleFile/nested/markdown.md +0 -7
- package/src/api/exporters/markdown/__snapshots__/simpleImage/basic/markdown.md +0 -3
- package/src/api/exporters/markdown/__snapshots__/simpleImage/button/markdown.md +0 -1
- package/src/api/exporters/markdown/__snapshots__/simpleImage/nested/markdown.md +0 -7
- package/src/api/exporters/markdown/__snapshots__/simpleImage/noCaption/markdown.md +0 -1
- package/src/api/exporters/markdown/__snapshots__/simpleImage/noName/markdown.md +0 -3
- package/src/api/exporters/markdown/__snapshots__/simpleImage/noPreview/markdown.md +0 -3
- package/src/api/exporters/markdown/__snapshots__/small/basic/markdown.md +0 -1
- package/src/api/exporters/markdown/__snapshots__/table/allColWidths/markdown.md +0 -5
- package/src/api/exporters/markdown/__snapshots__/table/basic/markdown.md +0 -5
- package/src/api/exporters/markdown/__snapshots__/table/headerCols/markdown.md +0 -4
- package/src/api/exporters/markdown/__snapshots__/table/headerRows/markdown.md +0 -4
- package/src/api/exporters/markdown/__snapshots__/table/mixedCellColors/markdown.md +0 -5
- package/src/api/exporters/markdown/__snapshots__/table/mixedColWidths/markdown.md +0 -5
- package/src/api/exporters/markdown/__snapshots__/table/mixedRowspansAndColspans/markdown.md +0 -5
- package/src/api/exporters/markdown/__snapshots__/tag/basic/markdown.md +0 -1
- package/src/api/exporters/markdown/markdownExporter.test.ts +0 -86
- package/src/api/nodeConversions/__snapshots__/nodeConversions.test.ts.snap +0 -3473
- package/src/api/nodeConversions/nodeConversions.test.ts +0 -83
- package/src/api/parsers/html/__snapshots__/list-test.json +0 -177
- package/src/api/parsers/html/__snapshots__/parse-2-tables.json +0 -129
- package/src/api/parsers/html/__snapshots__/parse-basic-block-types.json +0 -142
- package/src/api/parsers/html/__snapshots__/parse-codeblocks.json +0 -62
- package/src/api/parsers/html/__snapshots__/parse-div-with-inline-content.json +0 -91
- package/src/api/parsers/html/__snapshots__/parse-divs.json +0 -121
- package/src/api/parsers/html/__snapshots__/parse-fake-image-caption.json +0 -33
- package/src/api/parsers/html/__snapshots__/parse-image-in-paragraph.json +0 -16
- package/src/api/parsers/html/__snapshots__/parse-mixed-nested-lists.json +0 -265
- package/src/api/parsers/html/__snapshots__/parse-nested-lists-with-paragraphs.json +0 -265
- package/src/api/parsers/html/__snapshots__/parse-nested-lists.json +0 -265
- package/src/api/parsers/html/__snapshots__/parse-notion-html.json +0 -565
- package/src/api/parsers/html/__snapshots__/parse-two-divs.json +0 -36
- package/src/api/parsers/html/parseHTML.test.ts +0 -563
- package/src/api/parsers/markdown/__snapshots__/complex.json +0 -353
- package/src/api/parsers/markdown/__snapshots__/issue-226-1.json +0 -71
- package/src/api/parsers/markdown/__snapshots__/issue-226-2.json +0 -144
- package/src/api/parsers/markdown/__snapshots__/nested.json +0 -72
- package/src/api/parsers/markdown/__snapshots__/non-nested.json +0 -71
- package/src/api/parsers/markdown/__snapshots__/pasted/complex.json +0 -319
- package/src/api/parsers/markdown/__snapshots__/pasted/issue-226-1.json +0 -81
- package/src/api/parsers/markdown/__snapshots__/pasted/issue-226-2.json +0 -165
- package/src/api/parsers/markdown/__snapshots__/pasted/nested.json +0 -81
- package/src/api/parsers/markdown/__snapshots__/pasted/non-nested.json +0 -81
- package/src/api/parsers/markdown/__snapshots__/pasted/styled.json +0 -61
- package/src/api/parsers/markdown/__snapshots__/pasted/whitespace bold.json +0 -42
- package/src/api/parsers/markdown/__snapshots__/styled.json +0 -58
- package/src/api/parsers/markdown/__snapshots__/whitespace bold.json +0 -19
- package/src/api/parsers/markdown/parseMarkdown.test.ts +0 -135
- package/src/api/testUtil/cases/customBlocks.ts +0 -342
- package/src/api/testUtil/cases/customInlineContent.ts +0 -113
- package/src/api/testUtil/cases/customStyles.ts +0 -102
- package/src/api/testUtil/cases/defaultSchema.ts +0 -1493
- package/src/api/testUtil/index.ts +0 -19
- package/src/api/testUtil/partialBlockTestUtil.ts +0 -198
- package/src/api/testUtil/paste.ts +0 -46
- package/types/src/api/blockManipulation/commands/removeBlocks/removeBlocks.d.ts +0 -4
- package/types/src/api/clipboard/clipboardInternal.test.d.ts +0 -1
- package/types/src/api/clipboard/testUtil.d.ts +0 -541
- package/types/src/api/exporters/html/htmlConversion.test.d.ts +0 -1
- package/types/src/api/exporters/markdown/markdownExporter.test.d.ts +0 -1
- package/types/src/api/nodeConversions/nodeConversions.test.d.ts +0 -1
- package/types/src/api/parsers/html/parseHTML.test.d.ts +0 -1
- package/types/src/api/parsers/markdown/parseMarkdown.test.d.ts +0 -1
- package/types/src/api/testUtil/cases/customBlocks.d.ts +0 -670
- package/types/src/api/testUtil/cases/customInlineContent.d.ts +0 -558
- package/types/src/api/testUtil/cases/customStyles.d.ts +0 -552
- package/types/src/api/testUtil/cases/defaultSchema.d.ts +0 -4
- package/types/src/api/testUtil/index.d.ts +0 -14
- package/types/src/api/testUtil/partialBlockTestUtil.d.ts +0 -9
- package/types/src/api/testUtil/paste.d.ts +0 -2
- /package/types/src/api/{blockManipulation/commands/removeBlocks/removeBlocks.test.d.ts → nodeUtil.test.d.ts} +0 -0
- /package/types/src/api/{clipboard/clipboardExternal.test.d.ts → positionMapping.test.d.ts} +0 -0
|
@@ -1,435 +0,0 @@
|
|
|
1
|
-
import { Node } from "prosemirror-model";
|
|
2
|
-
import { NodeSelection, Selection, TextSelection } from "prosemirror-state";
|
|
3
|
-
import { CellSelection } from "prosemirror-tables";
|
|
4
|
-
import { afterAll, beforeAll, beforeEach, describe, expect, it } from "vitest";
|
|
5
|
-
|
|
6
|
-
import { PartialBlock } from "../../blocks/defaultBlocks.js";
|
|
7
|
-
import { BlockNoteEditor } from "../../editor/BlockNoteEditor.js";
|
|
8
|
-
import { initializeESMDependencies } from "../../util/esmDependencies.js";
|
|
9
|
-
import { doPaste } from "../testUtil/paste.js";
|
|
10
|
-
import { schema } from "./testUtil.js";
|
|
11
|
-
import { selectedFragmentToHTML } from "./toClipboard/copyExtension.js";
|
|
12
|
-
|
|
13
|
-
type SelectionTestCase = {
|
|
14
|
-
testName: string;
|
|
15
|
-
createCopySelection: (doc: Node) => Selection;
|
|
16
|
-
createPasteSelection?: (doc: Node) => Selection;
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
// These tests are meant to test the copying of user selections in the editor.
|
|
20
|
-
// The test cases used for the other HTML conversion tests are not suitable here
|
|
21
|
-
// as they are represented in the BlockNote API, whereas here we want to test
|
|
22
|
-
// ProseMirror/TipTap selections directly.
|
|
23
|
-
describe("Test ProseMirror selection clipboard HTML", () => {
|
|
24
|
-
const initialContent: PartialBlock<typeof schema.blockSchema>[] = [
|
|
25
|
-
{
|
|
26
|
-
type: "heading",
|
|
27
|
-
props: {
|
|
28
|
-
level: 2,
|
|
29
|
-
textColor: "red",
|
|
30
|
-
},
|
|
31
|
-
content: "Heading 1",
|
|
32
|
-
children: [
|
|
33
|
-
{
|
|
34
|
-
type: "paragraph",
|
|
35
|
-
content: "Nested Paragraph 1",
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
type: "paragraph",
|
|
39
|
-
content: "Nested Paragraph 2",
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
type: "paragraph",
|
|
43
|
-
content: "Nested Paragraph 3",
|
|
44
|
-
},
|
|
45
|
-
],
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
type: "heading",
|
|
49
|
-
props: {
|
|
50
|
-
level: 2,
|
|
51
|
-
textColor: "red",
|
|
52
|
-
},
|
|
53
|
-
content: "Heading 2",
|
|
54
|
-
children: [
|
|
55
|
-
{
|
|
56
|
-
type: "paragraph",
|
|
57
|
-
content: "Nested Paragraph 1",
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
type: "paragraph",
|
|
61
|
-
content: "Nested Paragraph 2",
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
type: "paragraph",
|
|
65
|
-
content: "Nested Paragraph 3",
|
|
66
|
-
},
|
|
67
|
-
],
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
type: "heading",
|
|
71
|
-
props: {
|
|
72
|
-
level: 2,
|
|
73
|
-
textColor: "red",
|
|
74
|
-
},
|
|
75
|
-
content: [
|
|
76
|
-
{
|
|
77
|
-
type: "text",
|
|
78
|
-
text: "Bold",
|
|
79
|
-
styles: {
|
|
80
|
-
bold: true,
|
|
81
|
-
},
|
|
82
|
-
},
|
|
83
|
-
{
|
|
84
|
-
type: "text",
|
|
85
|
-
text: "Italic",
|
|
86
|
-
styles: {
|
|
87
|
-
italic: true,
|
|
88
|
-
},
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
type: "text",
|
|
92
|
-
text: "Regular",
|
|
93
|
-
styles: {},
|
|
94
|
-
},
|
|
95
|
-
],
|
|
96
|
-
children: [
|
|
97
|
-
{
|
|
98
|
-
type: "image",
|
|
99
|
-
props: {
|
|
100
|
-
url: "https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg",
|
|
101
|
-
},
|
|
102
|
-
children: [
|
|
103
|
-
{
|
|
104
|
-
type: "paragraph",
|
|
105
|
-
content: "Nested Paragraph",
|
|
106
|
-
},
|
|
107
|
-
],
|
|
108
|
-
},
|
|
109
|
-
],
|
|
110
|
-
},
|
|
111
|
-
{
|
|
112
|
-
type: "table",
|
|
113
|
-
content: {
|
|
114
|
-
type: "tableContent",
|
|
115
|
-
rows: [
|
|
116
|
-
{
|
|
117
|
-
cells: ["Table Cell", "Table Cell"],
|
|
118
|
-
},
|
|
119
|
-
{
|
|
120
|
-
cells: ["Table Cell", "Table Cell"],
|
|
121
|
-
},
|
|
122
|
-
],
|
|
123
|
-
},
|
|
124
|
-
// Not needed as selections starting in table cells will get snapped to
|
|
125
|
-
// the table boundaries.
|
|
126
|
-
// children: [
|
|
127
|
-
// {
|
|
128
|
-
// type: "table",
|
|
129
|
-
// content: {
|
|
130
|
-
// type: "tableContent",
|
|
131
|
-
// rows: [
|
|
132
|
-
// {
|
|
133
|
-
// cells: ["Table Cell", "Table Cell"],
|
|
134
|
-
// },
|
|
135
|
-
// {
|
|
136
|
-
// cells: ["Table Cell", "Table Cell"],
|
|
137
|
-
// },
|
|
138
|
-
// ],
|
|
139
|
-
// },
|
|
140
|
-
// },
|
|
141
|
-
// ],
|
|
142
|
-
},
|
|
143
|
-
{
|
|
144
|
-
type: "paragraph",
|
|
145
|
-
content: "Paragraph",
|
|
146
|
-
},
|
|
147
|
-
{
|
|
148
|
-
type: "customParagraph",
|
|
149
|
-
content: "Paragraph",
|
|
150
|
-
},
|
|
151
|
-
{
|
|
152
|
-
type: "paragraph",
|
|
153
|
-
content: "Paragraph",
|
|
154
|
-
},
|
|
155
|
-
{
|
|
156
|
-
type: "heading",
|
|
157
|
-
content: "Heading",
|
|
158
|
-
},
|
|
159
|
-
{
|
|
160
|
-
type: "numberedListItem",
|
|
161
|
-
content: "Numbered List Item",
|
|
162
|
-
},
|
|
163
|
-
{
|
|
164
|
-
type: "bulletListItem",
|
|
165
|
-
content: "Bullet List Item",
|
|
166
|
-
},
|
|
167
|
-
{
|
|
168
|
-
type: "checkListItem",
|
|
169
|
-
content: "Check List Item",
|
|
170
|
-
},
|
|
171
|
-
{
|
|
172
|
-
type: "codeBlock",
|
|
173
|
-
content: 'console.log("Hello World");',
|
|
174
|
-
},
|
|
175
|
-
{
|
|
176
|
-
type: "table",
|
|
177
|
-
content: {
|
|
178
|
-
type: "tableContent",
|
|
179
|
-
rows: [
|
|
180
|
-
{
|
|
181
|
-
cells: [["Table Cell"], ["Table Cell"], ["Table Cell"]],
|
|
182
|
-
},
|
|
183
|
-
{
|
|
184
|
-
cells: [["Table Cell"], ["Table Cell"], ["Table Cell"]],
|
|
185
|
-
},
|
|
186
|
-
{
|
|
187
|
-
cells: [["Table Cell"], ["Table Cell"], ["Table Cell"]],
|
|
188
|
-
},
|
|
189
|
-
],
|
|
190
|
-
},
|
|
191
|
-
},
|
|
192
|
-
{
|
|
193
|
-
type: "image",
|
|
194
|
-
},
|
|
195
|
-
{
|
|
196
|
-
type: "paragraph",
|
|
197
|
-
props: {
|
|
198
|
-
textColor: "red",
|
|
199
|
-
},
|
|
200
|
-
content: "Paragraph",
|
|
201
|
-
},
|
|
202
|
-
{
|
|
203
|
-
type: "heading",
|
|
204
|
-
props: {
|
|
205
|
-
level: 2,
|
|
206
|
-
},
|
|
207
|
-
content: "Heading",
|
|
208
|
-
},
|
|
209
|
-
{
|
|
210
|
-
type: "numberedListItem",
|
|
211
|
-
props: {
|
|
212
|
-
start: 2,
|
|
213
|
-
},
|
|
214
|
-
content: "Numbered List Item",
|
|
215
|
-
},
|
|
216
|
-
{
|
|
217
|
-
type: "bulletListItem",
|
|
218
|
-
props: {
|
|
219
|
-
backgroundColor: "red",
|
|
220
|
-
},
|
|
221
|
-
content: "Bullet List Item",
|
|
222
|
-
},
|
|
223
|
-
{
|
|
224
|
-
type: "checkListItem",
|
|
225
|
-
props: {
|
|
226
|
-
checked: true,
|
|
227
|
-
},
|
|
228
|
-
content: "Check List Item",
|
|
229
|
-
},
|
|
230
|
-
{
|
|
231
|
-
type: "codeBlock",
|
|
232
|
-
props: {
|
|
233
|
-
language: "typescript",
|
|
234
|
-
},
|
|
235
|
-
content: 'console.log("Hello World");',
|
|
236
|
-
},
|
|
237
|
-
{
|
|
238
|
-
type: "table",
|
|
239
|
-
content: {
|
|
240
|
-
type: "tableContent",
|
|
241
|
-
rows: [
|
|
242
|
-
{
|
|
243
|
-
cells: [["Table Cell"], ["Table Cell"], ["Table Cell"]],
|
|
244
|
-
},
|
|
245
|
-
{
|
|
246
|
-
cells: [["Table Cell"], ["Table Cell"], ["Table Cell"]],
|
|
247
|
-
},
|
|
248
|
-
{
|
|
249
|
-
cells: [["Table Cell"], ["Table Cell"], ["Table Cell"]],
|
|
250
|
-
},
|
|
251
|
-
],
|
|
252
|
-
},
|
|
253
|
-
},
|
|
254
|
-
{
|
|
255
|
-
type: "image",
|
|
256
|
-
props: {
|
|
257
|
-
name: "1280px-Placeholder_view_vector.svg.png",
|
|
258
|
-
url: "https://upload.wikimedia.org/wikipedia/commons/thumb/3/3f/Placeholder_view_vector.svg/1280px-Placeholder_view_vector.svg.png",
|
|
259
|
-
caption: "Placeholder",
|
|
260
|
-
showPreview: true,
|
|
261
|
-
previewWidth: 256,
|
|
262
|
-
},
|
|
263
|
-
},
|
|
264
|
-
{
|
|
265
|
-
type: "paragraph",
|
|
266
|
-
},
|
|
267
|
-
];
|
|
268
|
-
|
|
269
|
-
let editor: BlockNoteEditor<typeof schema.blockSchema>;
|
|
270
|
-
const div = document.createElement("div");
|
|
271
|
-
|
|
272
|
-
beforeEach(() => {
|
|
273
|
-
editor.replaceBlocks(editor.document, initialContent);
|
|
274
|
-
});
|
|
275
|
-
|
|
276
|
-
beforeAll(async () => {
|
|
277
|
-
(window as any).__TEST_OPTIONS = (window as any).__TEST_OPTIONS || {};
|
|
278
|
-
|
|
279
|
-
editor = BlockNoteEditor.create({ schema });
|
|
280
|
-
editor.mount(div);
|
|
281
|
-
|
|
282
|
-
await initializeESMDependencies();
|
|
283
|
-
});
|
|
284
|
-
|
|
285
|
-
afterAll(() => {
|
|
286
|
-
editor.mount(undefined);
|
|
287
|
-
editor._tiptapEditor.destroy();
|
|
288
|
-
editor = undefined as any;
|
|
289
|
-
|
|
290
|
-
delete (window as Window & { __TEST_OPTIONS?: any }).__TEST_OPTIONS;
|
|
291
|
-
});
|
|
292
|
-
|
|
293
|
-
// Sets the editor selection to the given start and end positions, then
|
|
294
|
-
// exports the selected content to HTML and compares it to a snapshot.
|
|
295
|
-
async function testSelection(testCase: SelectionTestCase) {
|
|
296
|
-
if (!editor.prosemirrorView) {
|
|
297
|
-
throw new Error("Editor view not initialized.");
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
editor.dispatch(
|
|
301
|
-
editor._tiptapEditor.state.tr.setSelection(
|
|
302
|
-
testCase.createCopySelection(editor.prosemirrorView.state.doc)
|
|
303
|
-
)
|
|
304
|
-
);
|
|
305
|
-
|
|
306
|
-
const { clipboardHTML, externalHTML } = selectedFragmentToHTML(
|
|
307
|
-
editor.prosemirrorView,
|
|
308
|
-
editor
|
|
309
|
-
);
|
|
310
|
-
|
|
311
|
-
await expect(externalHTML).toMatchFileSnapshot(
|
|
312
|
-
`./__snapshots__/internal/${testCase.testName}.html`
|
|
313
|
-
);
|
|
314
|
-
|
|
315
|
-
if (testCase.createPasteSelection) {
|
|
316
|
-
editor.dispatch(
|
|
317
|
-
editor._tiptapEditor.state.tr.setSelection(
|
|
318
|
-
testCase.createPasteSelection(editor.prosemirrorView.state.doc)
|
|
319
|
-
)
|
|
320
|
-
);
|
|
321
|
-
}
|
|
322
|
-
|
|
323
|
-
const originalDocument = editor.document;
|
|
324
|
-
doPaste(
|
|
325
|
-
editor.prosemirrorView,
|
|
326
|
-
"text",
|
|
327
|
-
clipboardHTML,
|
|
328
|
-
false,
|
|
329
|
-
new ClipboardEvent("paste")
|
|
330
|
-
);
|
|
331
|
-
const newDocument = editor.document;
|
|
332
|
-
|
|
333
|
-
expect(newDocument).toStrictEqual(originalDocument);
|
|
334
|
-
}
|
|
335
|
-
|
|
336
|
-
const testCases: SelectionTestCase[] = [
|
|
337
|
-
// TODO: Consider adding test cases for nested blocks & double nested blocks.
|
|
338
|
-
// Copy/paste all of first heading's children.
|
|
339
|
-
{
|
|
340
|
-
testName: "multipleChildren",
|
|
341
|
-
createCopySelection: (doc) => TextSelection.create(doc, 16, 78),
|
|
342
|
-
},
|
|
343
|
-
// Copy/paste from start of first heading to end of its first child.
|
|
344
|
-
{
|
|
345
|
-
testName: "childToParent",
|
|
346
|
-
createCopySelection: (doc) => TextSelection.create(doc, 3, 34),
|
|
347
|
-
},
|
|
348
|
-
// Copy/paste from middle of first heading to the middle of its first child.
|
|
349
|
-
{
|
|
350
|
-
testName: "partialChildToParent",
|
|
351
|
-
createCopySelection: (doc) => TextSelection.create(doc, 6, 23),
|
|
352
|
-
},
|
|
353
|
-
// Copy/paste from start of first heading's first child to end of second
|
|
354
|
-
// heading's content (does not include second heading's children).
|
|
355
|
-
{
|
|
356
|
-
testName: "childrenToNextParent",
|
|
357
|
-
createCopySelection: (doc) => TextSelection.create(doc, 16, 93),
|
|
358
|
-
},
|
|
359
|
-
// Copy/paste from start of first heading's first child to end of second
|
|
360
|
-
// heading's last child.
|
|
361
|
-
{
|
|
362
|
-
testName: "childrenToNextParentsChildren",
|
|
363
|
-
createCopySelection: (doc) => TextSelection.create(doc, 16, 159),
|
|
364
|
-
},
|
|
365
|
-
// Copy/paste "Regular" text inside third heading.
|
|
366
|
-
{
|
|
367
|
-
testName: "unstyledText",
|
|
368
|
-
createCopySelection: (doc) => TextSelection.create(doc, 175, 182),
|
|
369
|
-
},
|
|
370
|
-
// Copy/paste "Italic" text inside third heading.
|
|
371
|
-
{
|
|
372
|
-
testName: "styledText",
|
|
373
|
-
createCopySelection: (doc) => TextSelection.create(doc, 169, 175),
|
|
374
|
-
},
|
|
375
|
-
// Copy/paste third heading's content (does not include third heading's
|
|
376
|
-
// children).
|
|
377
|
-
{
|
|
378
|
-
testName: "multipleStyledText",
|
|
379
|
-
createCopySelection: (doc) => TextSelection.create(doc, 165, 182),
|
|
380
|
-
},
|
|
381
|
-
// Copy/paste the image block content.
|
|
382
|
-
{
|
|
383
|
-
testName: "image",
|
|
384
|
-
createCopySelection: (doc) => NodeSelection.create(doc, 185),
|
|
385
|
-
},
|
|
386
|
-
// Copy/paste from start of third heading to end of it's last descendant.
|
|
387
|
-
{
|
|
388
|
-
testName: "nestedImage",
|
|
389
|
-
createCopySelection: (doc) => TextSelection.create(doc, 165, 205),
|
|
390
|
-
},
|
|
391
|
-
// Copy/paste text in first cell of the table.
|
|
392
|
-
{
|
|
393
|
-
testName: "tableCellText",
|
|
394
|
-
createCopySelection: (doc) => TextSelection.create(doc, 216, 226),
|
|
395
|
-
},
|
|
396
|
-
// Copy/paste first cell of the table.
|
|
397
|
-
// TODO: External HTML is wrapped in unnecessary `tr` element.
|
|
398
|
-
{
|
|
399
|
-
testName: "tableCell",
|
|
400
|
-
createCopySelection: (doc) => CellSelection.create(doc, 214),
|
|
401
|
-
},
|
|
402
|
-
// Copy/paste first row of the table.
|
|
403
|
-
{
|
|
404
|
-
testName: "tableRow",
|
|
405
|
-
createCopySelection: (doc) => CellSelection.create(doc, 214, 228),
|
|
406
|
-
},
|
|
407
|
-
// Copy/paste all cells of the table.
|
|
408
|
-
{
|
|
409
|
-
testName: "tableAllCells",
|
|
410
|
-
createCopySelection: (doc) => CellSelection.create(doc, 214, 258),
|
|
411
|
-
},
|
|
412
|
-
// Copy regular paragraph content and paste over custom block content.
|
|
413
|
-
{
|
|
414
|
-
testName: "paragraphInCustomBlock",
|
|
415
|
-
createCopySelection: (doc) => TextSelection.create(doc, 277, 286),
|
|
416
|
-
createPasteSelection: (doc) => TextSelection.create(doc, 290, 299),
|
|
417
|
-
},
|
|
418
|
-
// Copy/paste basic blocks.
|
|
419
|
-
{
|
|
420
|
-
testName: "basicBlocks",
|
|
421
|
-
createCopySelection: (doc) => TextSelection.create(doc, 303, 558),
|
|
422
|
-
},
|
|
423
|
-
// Copy/paste basic blocks with props.
|
|
424
|
-
{
|
|
425
|
-
testName: "basicBlocksWithProps",
|
|
426
|
-
createCopySelection: (doc) => TextSelection.create(doc, 558, 813),
|
|
427
|
-
},
|
|
428
|
-
];
|
|
429
|
-
|
|
430
|
-
for (const testCase of testCases) {
|
|
431
|
-
it(`${testCase.testName}`, async () => {
|
|
432
|
-
await testSelection(testCase);
|
|
433
|
-
});
|
|
434
|
-
}
|
|
435
|
-
});
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { createBlockSpec } from "../../schema/index.js";
|
|
2
|
-
import { BlockNoteSchema } from "../../editor/BlockNoteSchema.js";
|
|
3
|
-
import { defaultBlockSpecs } from "../../blocks/defaultBlocks.js";
|
|
4
|
-
|
|
5
|
-
const CustomParagraph = createBlockSpec(
|
|
6
|
-
{
|
|
7
|
-
type: "customParagraph",
|
|
8
|
-
content: "inline",
|
|
9
|
-
propSchema: {},
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
render: () => {
|
|
13
|
-
const customParagraph = document.createElement("p");
|
|
14
|
-
|
|
15
|
-
return {
|
|
16
|
-
dom: customParagraph,
|
|
17
|
-
contentDOM: customParagraph,
|
|
18
|
-
};
|
|
19
|
-
},
|
|
20
|
-
}
|
|
21
|
-
);
|
|
22
|
-
export const schema = BlockNoteSchema.create({
|
|
23
|
-
blockSpecs: {
|
|
24
|
-
...defaultBlockSpecs,
|
|
25
|
-
customParagraph: CustomParagraph as any,
|
|
26
|
-
},
|
|
27
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<pre><code class="bn-inline-content language-javascript" data-language="javascript">const hello = 'world';<br>console.log(hello);<br></code></pre>
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
<div class="bn-block-group" data-node-type="blockGroup"><div class="bn-block-outer" data-node-type="blockOuter" data-id="1"><div class="bn-block" data-node-type="blockContainer" data-id="1"><div class="bn-block-content" data-content-type="codeBlock"><pre><code class="bn-inline-content language-javascript" data-language="javascript">const hello = 'world';
|
|
2
|
-
console.log(hello);
|
|
3
|
-
</code></pre></div></div></div></div>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<pre><code class="bn-inline-content language-text" data-language="text">console.log('Hello, world!');</code></pre>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<div class="bn-block-group" data-node-type="blockGroup"><div class="bn-block-outer" data-node-type="blockOuter" data-id="1"><div class="bn-block" data-node-type="blockContainer" data-id="1"><div class="bn-block-content" data-content-type="codeBlock"><pre><code class="bn-inline-content language-text" data-language="text">console.log('Hello, world!');</code></pre></div></div></div></div>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<pre><code class="bn-inline-content language-text" data-language="text"></code></pre>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<div class="bn-block-group" data-node-type="blockGroup"><div class="bn-block-outer" data-node-type="blockOuter" data-id="1"><div class="bn-block" data-node-type="blockContainer" data-id="1"><div class="bn-block-content" data-content-type="codeBlock"><pre><code class="bn-inline-content language-text" data-language="text"></code></pre></div></div></div></div>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<pre><code class="bn-inline-content language-python" data-language="python">print('Hello, world!')</code></pre>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<div class="bn-block-group" data-node-type="blockGroup"><div class="bn-block-outer" data-node-type="blockOuter" data-id="1"><div class="bn-block" data-node-type="blockContainer" data-id="1"><div class="bn-block-content" data-content-type="codeBlock"><pre><code class="bn-inline-content language-python" data-language="python">print('Hello, world!')</code></pre></div></div></div></div>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<h2 data-text-color="yellow" data-background-color="blue" data-text-alignment="right" data-level="2"><strong><u>Heading </u></strong><em><s>2</s></em></h2><p data-background-color="red">Paragraph</p><ul><li><p></p></li></ul>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<div class="bn-block-group" data-node-type="blockGroup"><div class="bn-block-outer" data-node-type="blockOuter" data-id="1" data-text-color="yellow" data-background-color="blue"><div class="bn-block" data-node-type="blockContainer" data-id="1" data-text-color="yellow" data-background-color="blue"><div class="bn-block-content" data-content-type="heading" data-text-alignment="right" data-level="2"><h2 class="bn-inline-content"><strong><u>Heading </u></strong><em><s>2</s></em></h2></div><div class="bn-block-group" data-node-type="blockGroup"><div class="bn-block-outer" data-node-type="blockOuter" data-id="2" data-background-color="red"><div class="bn-block" data-node-type="blockContainer" data-id="2" data-background-color="red"><div class="bn-block-content" data-content-type="paragraph"><p class="bn-inline-content">Paragraph</p></div></div></div><div class="bn-block-outer" data-node-type="blockOuter" data-id="3"><div class="bn-block" data-node-type="blockContainer" data-id="3"><div class="bn-block-content" data-content-type="bulletListItem"><p class="bn-inline-content"></p></div></div></div></div></div></div></div>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<div class="bn-inline-content custom-block" data-editable="">Custom customBlock</div><div class="bn-inline-content custom-block" data-editable="">Custom customBlock <br>with <br>line breaks</div>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<div class="bn-block-group" data-node-type="blockGroup"><div class="bn-block-outer" data-node-type="blockOuter" data-id="1"><div class="bn-block" data-node-type="blockContainer" data-id="1"><div class="bn-block-content" data-content-type="customBlock"><div class="bn-inline-content custom-block" data-editable="">Custom customBlock</div></div></div></div><div class="bn-block-outer" data-node-type="blockOuter" data-id="2"><div class="bn-block" data-node-type="blockContainer" data-id="2"><div class="bn-block-content" data-content-type="customBlock"><div class="bn-inline-content custom-block" data-editable="">Custom customBlock <br>with <br>line breaks</div></div></div></div></div>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<p class="custom-paragraph">Hello World</p>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<div class="bn-block-group" data-node-type="blockGroup"><div class="bn-block-outer" data-node-type="blockOuter" data-id="1"><div class="bn-block" data-node-type="blockContainer" data-id="1"><div class="bn-block-content" data-content-type="customParagraph"><p class="bn-inline-content custom-paragraph" data-editable="">Custom Paragraph</p></div></div></div></div>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<p class="custom-paragraph">Hello World</p>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<div class="bn-block-group" data-node-type="blockGroup"><div class="bn-block-outer" data-node-type="blockOuter" data-id="1"><div class="bn-block" data-node-type="blockContainer" data-id="1"><div class="bn-block-content" data-content-type="customParagraph"><p class="bn-inline-content custom-paragraph" data-editable="">Line 1<br>Line 2</p></div></div></div></div>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<p class="custom-paragraph">Hello World</p><p class="custom-paragraph">Hello World</p><p class="custom-paragraph">Hello World</p>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<div class="bn-block-group" data-node-type="blockGroup"><div class="bn-block-outer" data-node-type="blockOuter" data-id="1"><div class="bn-block" data-node-type="blockContainer" data-id="1"><div class="bn-block-content" data-content-type="customParagraph"><p class="bn-inline-content custom-paragraph" data-editable="">Custom Paragraph</p></div><div class="bn-block-group" data-node-type="blockGroup"><div class="bn-block-outer" data-node-type="blockOuter" data-id="2"><div class="bn-block" data-node-type="blockContainer" data-id="2"><div class="bn-block-content" data-content-type="customParagraph"><p class="bn-inline-content custom-paragraph" data-editable="">Nested Custom Paragraph 1</p></div></div></div><div class="bn-block-outer" data-node-type="blockOuter" data-id="3"><div class="bn-block" data-node-type="blockContainer" data-id="3"><div class="bn-block-content" data-content-type="customParagraph"><p class="bn-inline-content custom-paragraph" data-editable="">Nested Custom Paragraph 2</p></div></div></div></div></div></div></div>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<p class="custom-paragraph" data-text-color="orange" data-background-color="pink" data-text-alignment="center">Hello World</p>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<div class="bn-block-group" data-node-type="blockGroup"><div class="bn-block-outer" data-node-type="blockOuter" data-id="1" data-text-color="orange" data-background-color="pink"><div class="bn-block" data-node-type="blockContainer" data-id="1" data-text-color="orange" data-background-color="pink"><div class="bn-block-content" data-content-type="customParagraph" data-text-alignment="center"><p class="bn-inline-content custom-paragraph" data-editable="">Plain <span data-text-color="red">Red Text </span><span data-background-color="blue">Blue Background </span><span data-text-color="red"><span data-background-color="blue">Mixed Colors</span></span></p></div></div></div></div>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<div data-name="example" data-url="exampleURL" data-caption="Caption"><a href="exampleURL">example</a><p>Caption</p></div>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<div class="bn-block-group" data-node-type="blockGroup"><div class="bn-block-outer" data-node-type="blockOuter" data-id="1"><div class="bn-block" data-node-type="blockContainer" data-id="1"><div class="bn-block-content" data-content-type="file" data-name="example" data-url="exampleURL" data-caption="Caption" data-file-block=""><div class="bn-file-block-content-wrapper"><div class="bn-file-name-with-icon"><div class="bn-file-icon"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M3 8L9.00319 2H19.9978C20.5513 2 21 2.45531 21 2.9918V21.0082C21 21.556 20.5551 22 20.0066 22H3.9934C3.44476 22 3 21.5501 3 20.9932V8ZM10 4V9H5V20H19V4H10Z"></path></svg></div><p class="bn-file-name">example</p></div><p class="bn-file-caption">Caption</p></div></div></div></div></div>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<p>Add file</p>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<div class="bn-block-group" data-node-type="blockGroup"><div class="bn-block-outer" data-node-type="blockOuter" data-id="1"><div class="bn-block" data-node-type="blockContainer" data-id="1"><div class="bn-block-content" data-content-type="file" data-file-block=""><div class="bn-file-block-content-wrapper"><div class="bn-add-file-button"><div class="bn-add-file-button-icon"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M3 8L9.00319 2H19.9978C20.5513 2 21 2.45531 21 2.9918V21.0082C21 21.556 20.5551 22 20.0066 22H3.9934C3.44476 22 3 21.5501 3 20.9932V8ZM10 4V9H5V20H19V4H10Z"></path></svg></div><p class="bn-add-file-button-text">Add file</p></div></div></div></div></div></div>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<div data-name="example" data-url="exampleURL" data-caption="Caption"><a href="exampleURL">example</a><p>Caption</p></div><div data-name="example" data-url="exampleURL" data-caption="Caption"><a href="exampleURL">example</a><p>Caption</p></div>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<div class="bn-block-group" data-node-type="blockGroup"><div class="bn-block-outer" data-node-type="blockOuter" data-id="1"><div class="bn-block" data-node-type="blockContainer" data-id="1"><div class="bn-block-content" data-content-type="file" data-name="example" data-url="exampleURL" data-caption="Caption" data-file-block=""><div class="bn-file-block-content-wrapper"><div class="bn-file-name-with-icon"><div class="bn-file-icon"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M3 8L9.00319 2H19.9978C20.5513 2 21 2.45531 21 2.9918V21.0082C21 21.556 20.5551 22 20.0066 22H3.9934C3.44476 22 3 21.5501 3 20.9932V8ZM10 4V9H5V20H19V4H10Z"></path></svg></div><p class="bn-file-name">example</p></div><p class="bn-file-caption">Caption</p></div></div><div class="bn-block-group" data-node-type="blockGroup"><div class="bn-block-outer" data-node-type="blockOuter" data-id="2"><div class="bn-block" data-node-type="blockContainer" data-id="2"><div class="bn-block-content" data-content-type="file" data-name="example" data-url="exampleURL" data-caption="Caption" data-file-block=""><div class="bn-file-block-content-wrapper"><div class="bn-file-name-with-icon"><div class="bn-file-icon"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M3 8L9.00319 2H19.9978C20.5513 2 21 2.45531 21 2.9918V21.0082C21 21.556 20.5551 22 20.0066 22H3.9934C3.44476 22 3 21.5501 3 20.9932V8ZM10 4V9H5V20H19V4H10Z"></path></svg></div><p class="bn-file-name">example</p></div><p class="bn-file-caption">Caption</p></div></div></div></div></div></div></div></div>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<a href="exampleURL" data-name="example" data-url="exampleURL">example</a>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<div class="bn-block-group" data-node-type="blockGroup"><div class="bn-block-outer" data-node-type="blockOuter" data-id="1"><div class="bn-block" data-node-type="blockContainer" data-id="1"><div class="bn-block-content" data-content-type="file" data-name="example" data-url="exampleURL" data-file-block=""><div class="bn-file-block-content-wrapper"><div class="bn-file-name-with-icon"><div class="bn-file-icon"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M3 8L9.00319 2H19.9978C20.5513 2 21 2.45531 21 2.9918V21.0082C21 21.556 20.5551 22 20.0066 22H3.9934C3.44476 22 3 21.5501 3 20.9932V8ZM10 4V9H5V20H19V4H10Z"></path></svg></div><p class="bn-file-name">example</p></div></div></div></div></div></div>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<div data-url="exampleURL" data-caption="Caption"><a href="exampleURL">exampleURL</a><p>Caption</p></div>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<div class="bn-block-group" data-node-type="blockGroup"><div class="bn-block-outer" data-node-type="blockOuter" data-id="1"><div class="bn-block" data-node-type="blockContainer" data-id="1"><div class="bn-block-content" data-content-type="file" data-url="exampleURL" data-caption="Caption" data-file-block=""><div class="bn-file-block-content-wrapper"><div class="bn-file-name-with-icon"><div class="bn-file-icon"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M3 8L9.00319 2H19.9978C20.5513 2 21 2.45531 21 2.9918V21.0082C21 21.556 20.5551 22 20.0066 22H3.9934C3.44476 22 3 21.5501 3 20.9932V8ZM10 4V9H5V20H19V4H10Z"></path></svg></div><p class="bn-file-name"></p></div><p class="bn-file-caption">Caption</p></div></div></div></div></div>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<p><span style="font-size: 18px" data-style-type="fontSize" data-value="18px" data-editable="">This is text with a custom fontSize</span></p>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<div class="bn-block-group" data-node-type="blockGroup"><div class="bn-block-outer" data-node-type="blockOuter" data-id="1"><div class="bn-block" data-node-type="blockContainer" data-id="1"><div class="bn-block-content" data-content-type="paragraph"><p class="bn-inline-content"><span style="font-size: 18px" data-style-type="fontSize" data-value="18px" data-editable="">This is text with a custom fontSize</span></p></div></div></div></div>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<p>Text1<br>Text2</p>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<div class="bn-block-group" data-node-type="blockGroup"><div class="bn-block-outer" data-node-type="blockOuter" data-id="1"><div class="bn-block" data-node-type="blockContainer" data-id="1"><div class="bn-block-content" data-content-type="paragraph"><p class="bn-inline-content">Text1<br>Text2</p></div></div></div></div>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<p><a target="_blank" rel="noopener noreferrer nofollow" href="https://www.website.com">Link1</a><br><a target="_blank" rel="noopener noreferrer nofollow" href="https://www.website2.com">Link2</a></p>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<div class="bn-block-group" data-node-type="blockGroup"><div class="bn-block-outer" data-node-type="blockOuter" data-id="1"><div class="bn-block" data-node-type="blockContainer" data-id="1"><div class="bn-block-content" data-content-type="paragraph"><p class="bn-inline-content"><a target="_blank" rel="noopener noreferrer nofollow" href="https://www.website.com">Link1</a><br><a target="_blank" rel="noopener noreferrer nofollow" href="https://www.website2.com">Link2</a></p></div></div></div></div>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<p>Text1<br></p>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<div class="bn-block-group" data-node-type="blockGroup"><div class="bn-block-outer" data-node-type="blockOuter" data-id="1"><div class="bn-block" data-node-type="blockContainer" data-id="1"><div class="bn-block-content" data-content-type="paragraph"><p class="bn-inline-content">Text1<br></p></div></div></div></div>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<p><a target="_blank" rel="noopener noreferrer nofollow" href="https://www.website.com">Link1</a><br><a target="_blank" rel="noopener noreferrer nofollow" href="https://www.website.com">Link1</a></p>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<div class="bn-block-group" data-node-type="blockGroup"><div class="bn-block-outer" data-node-type="blockOuter" data-id="1"><div class="bn-block" data-node-type="blockContainer" data-id="1"><div class="bn-block-content" data-content-type="paragraph"><p class="bn-inline-content"><a target="_blank" rel="noopener noreferrer nofollow" href="https://www.website.com">Link1</a><br><a target="_blank" rel="noopener noreferrer nofollow" href="https://www.website.com">Link1</a></p></div></div></div></div>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<p>Text1<br>Text2<br>Text3</p>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<div class="bn-block-group" data-node-type="blockGroup"><div class="bn-block-outer" data-node-type="blockOuter" data-id="1"><div class="bn-block" data-node-type="blockContainer" data-id="1"><div class="bn-block-content" data-content-type="paragraph"><p class="bn-inline-content">Text1<br>Text2<br>Text3</p></div></div></div></div>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<p><br></p>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<div class="bn-block-group" data-node-type="blockGroup"><div class="bn-block-outer" data-node-type="blockOuter" data-id="1"><div class="bn-block" data-node-type="blockContainer" data-id="1"><div class="bn-block-content" data-content-type="paragraph"><p class="bn-inline-content"><br></p></div></div></div></div>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<p><br>Text1</p>
|