@blocknote/core 0.24.0 → 0.24.2
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 +1314 -964
- 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 +2 -2
- package/src/api/clipboard/fromClipboard/handleFileInsertion.ts +36 -14
- package/src/extensions/Collaboration/createCollaborationExtensions.ts +4 -2
- package/src/extensions/FormattingToolbar/FormattingToolbarPlugin.ts +7 -5
- package/src/extensions/SideMenu/SideMenuPlugin.ts +62 -39
- package/src/extensions/UniqueID/UniqueID.ts +8 -3
- package/src/i18n/locales/index.ts +1 -0
- package/src/i18n/locales/it.ts +6 -0
- package/src/i18n/locales/no.ts +323 -0
- package/src/util/browser.ts +1 -1
- package/types/src/extensions/FormattingToolbar/FormattingToolbarPlugin.d.ts +1 -1
- package/types/src/extensions/SideMenu/SideMenuPlugin.d.ts +1 -0
- package/types/src/i18n/locales/index.d.ts +1 -0
- package/types/src/i18n/locales/it.d.ts +6 -0
- package/types/src/i18n/locales/no.d.ts +2 -0
- package/types/src/util/browser.d.ts +1 -1
package/dist/webpack-stats.json
CHANGED
|
@@ -1 +1 @@
|
|
|
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"]}]}
|
|
1
|
+
{"builtAt":1740756852708,"assets":[{"name":"blocknote.umd.cjs","size":261510},{"name":"blocknote.umd.cjs.map","size":949535}],"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":7583,"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/no.ts","size":7371,"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":9054,"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":6763,"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":536,"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":3917,"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":3773,"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":5268,"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":14087,"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.24.
|
|
9
|
+
"version": "0.24.2",
|
|
10
10
|
"files": [
|
|
11
11
|
"dist",
|
|
12
12
|
"types",
|
|
@@ -124,5 +124,5 @@
|
|
|
124
124
|
"access": "public",
|
|
125
125
|
"registry": "https://registry.npmjs.org/"
|
|
126
126
|
},
|
|
127
|
-
"gitHead": "
|
|
127
|
+
"gitHead": "129f51b459753139ee0a4c441b4479f83fd7314d"
|
|
128
128
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PartialBlock } from "../../../blocks/defaultBlocks.js";
|
|
1
|
+
import { Block, PartialBlock } from "../../../blocks/defaultBlocks.js";
|
|
2
2
|
import type { BlockNoteEditor } from "../../../editor/BlockNoteEditor";
|
|
3
3
|
import {
|
|
4
4
|
BlockSchema,
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
InlineContentSchema,
|
|
7
7
|
StyleSchema,
|
|
8
8
|
} from "../../../schema/index.js";
|
|
9
|
-
import {
|
|
9
|
+
import { getNearestBlockPos } from "../../getBlockInfoFromPos.js";
|
|
10
10
|
import { acceptedMIMETypes } from "./acceptedMIMETypes.js";
|
|
11
11
|
|
|
12
12
|
function checkFileExtensionsMatch(
|
|
@@ -41,6 +41,33 @@ function checkMIMETypesMatch(mimeType1: string, mimeType2: string) {
|
|
|
41
41
|
return types1[0] === types2[0] && types1[1] === types2[1];
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
+
function insertOrUpdateBlock<
|
|
45
|
+
BSchema extends BlockSchema,
|
|
46
|
+
I extends InlineContentSchema,
|
|
47
|
+
S extends StyleSchema
|
|
48
|
+
>(
|
|
49
|
+
editor: BlockNoteEditor<BSchema, I, S>,
|
|
50
|
+
referenceBlock: Block<BSchema, I, S>,
|
|
51
|
+
newBlock: PartialBlock<BSchema, I, S>
|
|
52
|
+
) {
|
|
53
|
+
let insertedBlockId: string | undefined;
|
|
54
|
+
|
|
55
|
+
if (
|
|
56
|
+
Array.isArray(referenceBlock.content) &&
|
|
57
|
+
referenceBlock.content.length === 0
|
|
58
|
+
) {
|
|
59
|
+
insertedBlockId = editor.updateBlock(referenceBlock, newBlock).id;
|
|
60
|
+
} else {
|
|
61
|
+
insertedBlockId = editor.insertBlocks(
|
|
62
|
+
[newBlock],
|
|
63
|
+
referenceBlock,
|
|
64
|
+
"after"
|
|
65
|
+
)[0].id;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
return insertedBlockId;
|
|
69
|
+
}
|
|
70
|
+
|
|
44
71
|
export async function handleFileInsertion<
|
|
45
72
|
BSchema extends BlockSchema,
|
|
46
73
|
I extends InlineContentSchema,
|
|
@@ -120,11 +147,8 @@ export async function handleFileInsertion<
|
|
|
120
147
|
let insertedBlockId: string | undefined = undefined;
|
|
121
148
|
|
|
122
149
|
if (event.type === "paste") {
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
editor.getTextCursorPosition().block,
|
|
126
|
-
"after"
|
|
127
|
-
)[0].id;
|
|
150
|
+
const currentBlock = editor.getTextCursorPosition().block;
|
|
151
|
+
insertedBlockId = insertOrUpdateBlock(editor, currentBlock, fileBlock);
|
|
128
152
|
} else if (event.type === "drop") {
|
|
129
153
|
const coords = {
|
|
130
154
|
left: (event as DragEvent).clientX,
|
|
@@ -141,13 +165,11 @@ export async function handleFileInsertion<
|
|
|
141
165
|
pos.pos
|
|
142
166
|
);
|
|
143
167
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
"after"
|
|
150
|
-
)[0].id;
|
|
168
|
+
insertedBlockId = insertOrUpdateBlock(
|
|
169
|
+
editor,
|
|
170
|
+
editor.getBlock(posInfo.node.attrs.id)!,
|
|
171
|
+
fileBlock
|
|
172
|
+
);
|
|
151
173
|
} else {
|
|
152
174
|
return;
|
|
153
175
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Collaboration from "@tiptap/extension-collaboration";
|
|
2
|
-
import { Awareness } from "y-protocols/awareness";
|
|
3
2
|
import CollaborationCursor from "@tiptap/extension-collaboration-cursor";
|
|
3
|
+
import { Awareness } from "y-protocols/awareness";
|
|
4
4
|
import * as Y from "yjs";
|
|
5
5
|
|
|
6
6
|
export const createCollaborationExtensions = (collaboration: {
|
|
@@ -93,7 +93,9 @@ export const createCollaborationExtensions = (collaboration: {
|
|
|
93
93
|
);
|
|
94
94
|
|
|
95
95
|
if (!clientState) {
|
|
96
|
-
throw new Error(
|
|
96
|
+
throw new Error(
|
|
97
|
+
"Could not find client state for user, " + JSON.stringify(user)
|
|
98
|
+
);
|
|
97
99
|
}
|
|
98
100
|
|
|
99
101
|
const clientID = clientState[0];
|
|
@@ -67,7 +67,7 @@ export class FormattingToolbarView implements PluginView {
|
|
|
67
67
|
};
|
|
68
68
|
|
|
69
69
|
pmView.dom.addEventListener("mousedown", this.viewMousedownHandler);
|
|
70
|
-
pmView.
|
|
70
|
+
pmView.root.addEventListener("mouseup", this.mouseupHandler);
|
|
71
71
|
pmView.dom.addEventListener("dragstart", this.dragHandler);
|
|
72
72
|
pmView.dom.addEventListener("dragover", this.dragHandler);
|
|
73
73
|
pmView.dom.addEventListener("blur", this.blurHandler);
|
|
@@ -113,9 +113,11 @@ export class FormattingToolbarView implements PluginView {
|
|
|
113
113
|
this.preventShow = true;
|
|
114
114
|
};
|
|
115
115
|
|
|
116
|
-
|
|
117
|
-
this.preventShow
|
|
118
|
-
|
|
116
|
+
mouseupHandler = () => {
|
|
117
|
+
if (this.preventShow) {
|
|
118
|
+
this.preventShow = false;
|
|
119
|
+
setTimeout(() => this.update(this.pmView));
|
|
120
|
+
}
|
|
119
121
|
};
|
|
120
122
|
|
|
121
123
|
// For dragging the whole editor.
|
|
@@ -193,7 +195,7 @@ export class FormattingToolbarView implements PluginView {
|
|
|
193
195
|
|
|
194
196
|
destroy() {
|
|
195
197
|
this.pmView.dom.removeEventListener("mousedown", this.viewMousedownHandler);
|
|
196
|
-
this.pmView.
|
|
198
|
+
this.pmView.root.removeEventListener("mouseup", this.mouseupHandler);
|
|
197
199
|
this.pmView.dom.removeEventListener("dragstart", this.dragHandler);
|
|
198
200
|
this.pmView.dom.removeEventListener("dragover", this.dragHandler);
|
|
199
201
|
this.pmView.dom.removeEventListener("blur", this.blurHandler);
|
|
@@ -178,6 +178,11 @@ export class SideMenuView<
|
|
|
178
178
|
this.onDrop as EventListener,
|
|
179
179
|
true
|
|
180
180
|
);
|
|
181
|
+
this.pmView.root.addEventListener(
|
|
182
|
+
"dragend",
|
|
183
|
+
this.onDragEnd as EventListener,
|
|
184
|
+
true
|
|
185
|
+
);
|
|
181
186
|
initializeESMDependencies();
|
|
182
187
|
|
|
183
188
|
// Shows or updates menu position whenever the cursor moves, if the menu isn't frozen.
|
|
@@ -283,47 +288,52 @@ export class SideMenuView<
|
|
|
283
288
|
|
|
284
289
|
this.editor._tiptapEditor.commands.blur();
|
|
285
290
|
|
|
286
|
-
//
|
|
287
|
-
//
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
291
|
+
// Finds the BlockNote editor element that the drop event occurred in (if
|
|
292
|
+
// any).
|
|
293
|
+
const parentEditorElement =
|
|
294
|
+
event.target instanceof Node
|
|
295
|
+
? (event.target instanceof HTMLElement
|
|
296
|
+
? event.target
|
|
297
|
+
: event.target.parentElement
|
|
298
|
+
)?.closest(".bn-editor") || null
|
|
299
|
+
: null;
|
|
300
|
+
|
|
301
|
+
// Drop event occurred within an editor.
|
|
302
|
+
if (parentEditorElement) {
|
|
303
|
+
// When ProseMirror handles a drop event on the editor while
|
|
304
|
+
// `view.dragging` is set, it deletes the selected content. However, if
|
|
305
|
+
// a block from a different editor is being dropped, this causes some
|
|
306
|
+
// issues that the code below fixes:
|
|
307
|
+
if (!this.isDragOrigin && this.pmView.dom === parentEditorElement) {
|
|
308
|
+
// Because the editor selection is unrelated to the dragged content, we
|
|
309
|
+
// don't want PM to delete its content. Therefore, we collapse the
|
|
310
|
+
// selection.
|
|
311
|
+
this.pmView.dispatch(
|
|
312
|
+
this.pmView.state.tr.setSelection(
|
|
313
|
+
TextSelection.create(
|
|
314
|
+
this.pmView.state.tr.doc,
|
|
315
|
+
this.pmView.state.tr.selection.to
|
|
316
|
+
)
|
|
299
317
|
)
|
|
300
|
-
)
|
|
301
|
-
)
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
() => this.pmView.dispatch(this.pmView.state.tr.deleteSelection()),
|
|
319
|
-
0
|
|
320
|
-
);
|
|
318
|
+
);
|
|
319
|
+
} else if (this.isDragOrigin && this.pmView.dom !== parentEditorElement) {
|
|
320
|
+
// Because the editor from which the block originates doesn't get a drop
|
|
321
|
+
// event on it, PM doesn't delete its selected content. Therefore, we
|
|
322
|
+
// need to do so manually.
|
|
323
|
+
//
|
|
324
|
+
// Note: Deleting the selected content from the editor from which the
|
|
325
|
+
// block originates, may change its height. This can cause the position of
|
|
326
|
+
// the editor in which the block is being dropping to shift, before it
|
|
327
|
+
// can handle the drop event. That in turn can cause the drop to happen
|
|
328
|
+
// somewhere other than the user intended. To get around this, we delay
|
|
329
|
+
// deleting the selected content until all editors have had the chance to
|
|
330
|
+
// handle the event.
|
|
331
|
+
setTimeout(
|
|
332
|
+
() => this.pmView.dispatch(this.pmView.state.tr.deleteSelection()),
|
|
333
|
+
0
|
|
334
|
+
);
|
|
335
|
+
}
|
|
321
336
|
}
|
|
322
|
-
// 3. PM only clears `view.dragging` on the editor that the block was
|
|
323
|
-
// dropped, so we manually have to clear it on all the others. However,
|
|
324
|
-
// PM also needs to read `view.dragging` while handling the event, so we
|
|
325
|
-
// use a `setTimeout` to ensure it's only cleared after that.
|
|
326
|
-
setTimeout(() => (this.pmView.dragging = null), 0);
|
|
327
337
|
|
|
328
338
|
if (
|
|
329
339
|
this.sideMenuDetection === "editor" ||
|
|
@@ -350,6 +360,14 @@ export class SideMenuView<
|
|
|
350
360
|
}
|
|
351
361
|
};
|
|
352
362
|
|
|
363
|
+
onDragEnd = () => {
|
|
364
|
+
// When the user starts dragging a block, `view.dragging` is set on all
|
|
365
|
+
// BlockNote editors. However, when the drag ends, only the editor that the
|
|
366
|
+
// drag originated in automatically clears `view.dragging`. Therefore, we
|
|
367
|
+
// have to manually clear it on all editors.
|
|
368
|
+
this.pmView.dragging = null;
|
|
369
|
+
};
|
|
370
|
+
|
|
353
371
|
/**
|
|
354
372
|
* If a block is being dragged, ProseMirror usually gets the context of what's
|
|
355
373
|
* being dragged from `view.dragging`, which is automatically set when a
|
|
@@ -570,6 +588,11 @@ export class SideMenuView<
|
|
|
570
588
|
this.onDrop as EventListener,
|
|
571
589
|
true
|
|
572
590
|
);
|
|
591
|
+
this.pmView.root.removeEventListener(
|
|
592
|
+
"dragend",
|
|
593
|
+
this.onDragEnd as EventListener,
|
|
594
|
+
true
|
|
595
|
+
);
|
|
573
596
|
this.pmView.root.removeEventListener(
|
|
574
597
|
"keydown",
|
|
575
598
|
this.onKeyDown as EventListener,
|
|
@@ -252,8 +252,9 @@ const UniqueID = Extension.create({
|
|
|
252
252
|
};
|
|
253
253
|
},
|
|
254
254
|
props: {
|
|
255
|
-
// `handleDOMEvents` is called before `transformPasted`
|
|
256
|
-
//
|
|
255
|
+
// `handleDOMEvents` is called before `transformPasted` so we can do
|
|
256
|
+
// some checks before. However, `transformPasted` only runs when
|
|
257
|
+
// editor content is pasted - not external content.
|
|
257
258
|
handleDOMEvents: {
|
|
258
259
|
// only create new ids for dropped content while holding `alt`
|
|
259
260
|
// or content is dragged from another editor
|
|
@@ -265,9 +266,13 @@ const UniqueID = Extension.create({
|
|
|
265
266
|
? void 0
|
|
266
267
|
: _a.effectAllowed) === "copy"
|
|
267
268
|
) {
|
|
268
|
-
dragSourceElement = null;
|
|
269
269
|
transformPasted = true;
|
|
270
|
+
} else {
|
|
271
|
+
transformPasted = false;
|
|
270
272
|
}
|
|
273
|
+
|
|
274
|
+
dragSourceElement = null;
|
|
275
|
+
|
|
271
276
|
return false;
|
|
272
277
|
},
|
|
273
278
|
// always create new ids on pasted content
|
package/src/i18n/locales/it.ts
CHANGED
|
@@ -56,6 +56,12 @@ export const it = {
|
|
|
56
56
|
aliases: ["code", "pre"],
|
|
57
57
|
group: "Blocchi Base",
|
|
58
58
|
},
|
|
59
|
+
page_break: {
|
|
60
|
+
title: "Interruzione di Pagina",
|
|
61
|
+
subtext: "Separatore di pagina",
|
|
62
|
+
aliases: ["pagina", "interruzione", "separatore"],
|
|
63
|
+
group: "Blocchi base",
|
|
64
|
+
},
|
|
59
65
|
table: {
|
|
60
66
|
title: "Tabella",
|
|
61
67
|
subtext: "Tabella con celle modificabili",
|