@ctzhian/tiptap 0.4.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/LICENSE +21 -0
- package/README.md +43 -0
- package/dist/Editor/demo.d.ts +4 -0
- package/dist/Editor/demo.js +150 -0
- package/dist/Editor/index.d.ts +4 -0
- package/dist/Editor/index.js +21 -0
- package/dist/EditorThemeProvider/index.d.ts +11 -0
- package/dist/EditorThemeProvider/index.js +90 -0
- package/dist/EditorToolbar/index.d.ts +9 -0
- package/dist/EditorToolbar/index.js +286 -0
- package/dist/asset/css/index.css +161 -0
- package/dist/asset/images/disk.png +0 -0
- package/dist/asset/images/down.svg +3 -0
- package/dist/component/CustomBubbleMenu/SelectionText.d.ts +9 -0
- package/dist/component/CustomBubbleMenu/SelectionText.js +295 -0
- package/dist/component/CustomDragHandle/index.d.ts +9 -0
- package/dist/component/CustomDragHandle/index.js +1172 -0
- package/dist/component/CustomFloatingMenu/index.d.ts +0 -0
- package/dist/component/CustomFloatingMenu/index.js +85 -0
- package/dist/component/FloatingPopover/index.d.ts +13 -0
- package/dist/component/FloatingPopover/index.js +104 -0
- package/dist/component/Icons/ai-generate-2-icon.d.ts +6 -0
- package/dist/component/Icons/ai-generate-2-icon.js +13 -0
- package/dist/component/Icons/ai-generate-text-icon.d.ts +6 -0
- package/dist/component/Icons/ai-generate-text-icon.js +13 -0
- package/dist/component/Icons/align-bottom-icon.d.ts +6 -0
- package/dist/component/Icons/align-bottom-icon.js +13 -0
- package/dist/component/Icons/align-center-icon.d.ts +6 -0
- package/dist/component/Icons/align-center-icon.js +13 -0
- package/dist/component/Icons/align-justify-icon.d.ts +6 -0
- package/dist/component/Icons/align-justify-icon.js +13 -0
- package/dist/component/Icons/align-left-icon.d.ts +6 -0
- package/dist/component/Icons/align-left-icon.js +13 -0
- package/dist/component/Icons/align-right-icon.d.ts +6 -0
- package/dist/component/Icons/align-right-icon.js +13 -0
- package/dist/component/Icons/align-top-icon.d.ts +6 -0
- package/dist/component/Icons/align-top-icon.js +13 -0
- package/dist/component/Icons/align-vertically-icon.d.ts +6 -0
- package/dist/component/Icons/align-vertically-icon.js +13 -0
- package/dist/component/Icons/anticlockwise-line-icon.d.ts +6 -0
- package/dist/component/Icons/anticlockwise-line-icon.js +13 -0
- package/dist/component/Icons/arrow-down-s-line-icon.d.ts +6 -0
- package/dist/component/Icons/arrow-down-s-line-icon.js +13 -0
- package/dist/component/Icons/arrow-go-back-line-icon.d.ts +6 -0
- package/dist/component/Icons/arrow-go-back-line-icon.js +13 -0
- package/dist/component/Icons/arrow-go-forward-line-icon.d.ts +6 -0
- package/dist/component/Icons/arrow-go-forward-line-icon.js +13 -0
- package/dist/component/Icons/arrow-left-wide-line-icon.d.ts +6 -0
- package/dist/component/Icons/arrow-left-wide-line-icon.js +13 -0
- package/dist/component/Icons/at-line-icon.d.ts +6 -0
- package/dist/component/Icons/at-line-icon.js +13 -0
- package/dist/component/Icons/attachment-2-icon.d.ts +6 -0
- package/dist/component/Icons/attachment-2-icon.js +13 -0
- package/dist/component/Icons/attachment-line-icon.d.ts +6 -0
- package/dist/component/Icons/attachment-line-icon.js +13 -0
- package/dist/component/Icons/bold-icon.d.ts +6 -0
- package/dist/component/Icons/bold-icon.js +13 -0
- package/dist/component/Icons/brush-line-icon.d.ts +6 -0
- package/dist/component/Icons/brush-line-icon.js +13 -0
- package/dist/component/Icons/carousel-view-icon.d.ts +6 -0
- package/dist/component/Icons/carousel-view-icon.js +13 -0
- package/dist/component/Icons/checkbox-blank-circle-line-icon.d.ts +6 -0
- package/dist/component/Icons/checkbox-blank-circle-line-icon.js +13 -0
- package/dist/component/Icons/checkbox-circle-line-icon.d.ts +6 -0
- package/dist/component/Icons/checkbox-circle-line-icon.js +13 -0
- package/dist/component/Icons/clockwise-line-icon.d.ts +6 -0
- package/dist/component/Icons/clockwise-line-icon.js +13 -0
- package/dist/component/Icons/code-box-line-icon.d.ts +6 -0
- package/dist/component/Icons/code-box-line-icon.js +13 -0
- package/dist/component/Icons/code-line-icon.d.ts +6 -0
- package/dist/component/Icons/code-line-icon.js +13 -0
- package/dist/component/Icons/code-s-slash-line-icon.d.ts +6 -0
- package/dist/component/Icons/code-s-slash-line-icon.js +13 -0
- package/dist/component/Icons/copy-icon.d.ts +6 -0
- package/dist/component/Icons/copy-icon.js +13 -0
- package/dist/component/Icons/custom-size-icon.d.ts +6 -0
- package/dist/component/Icons/custom-size-icon.js +13 -0
- package/dist/component/Icons/delete-column-icon.d.ts +6 -0
- package/dist/component/Icons/delete-column-icon.js +13 -0
- package/dist/component/Icons/delete-line-icon.d.ts +6 -0
- package/dist/component/Icons/delete-line-icon.js +13 -0
- package/dist/component/Icons/delete-row-icon.d.ts +6 -0
- package/dist/component/Icons/delete-row-icon.js +13 -0
- package/dist/component/Icons/double-quotes-l-icon.d.ts +6 -0
- package/dist/component/Icons/double-quotes-l-icon.js +13 -0
- package/dist/component/Icons/download-line-icon.d.ts +6 -0
- package/dist/component/Icons/download-line-icon.js +13 -0
- package/dist/component/Icons/draggable-icon.d.ts +6 -0
- package/dist/component/Icons/draggable-icon.js +13 -0
- package/dist/component/Icons/edit-box-line-icon.d.ts +6 -0
- package/dist/component/Icons/edit-box-line-icon.js +13 -0
- package/dist/component/Icons/export-line-icon.d.ts +6 -0
- package/dist/component/Icons/export-line-icon.js +13 -0
- package/dist/component/Icons/file-copy-line-icon.d.ts +6 -0
- package/dist/component/Icons/file-copy-line-icon.js +13 -0
- package/dist/component/Icons/file-upload-line-icon.d.ts +6 -0
- package/dist/component/Icons/file-upload-line-icon.js +13 -0
- package/dist/component/Icons/flow-chart-icon.d.ts +6 -0
- package/dist/component/Icons/flow-chart-icon.js +13 -0
- package/dist/component/Icons/font-color-icon.d.ts +6 -0
- package/dist/component/Icons/font-color-icon.js +13 -0
- package/dist/component/Icons/font-family-icon.d.ts +6 -0
- package/dist/component/Icons/font-family-icon.js +13 -0
- package/dist/component/Icons/font-size-icon.d.ts +6 -0
- package/dist/component/Icons/font-size-icon.js +13 -0
- package/dist/component/Icons/format-clear-icon.d.ts +6 -0
- package/dist/component/Icons/format-clear-icon.js +13 -0
- package/dist/component/Icons/formula-icon.d.ts +6 -0
- package/dist/component/Icons/formula-icon.js +13 -0
- package/dist/component/Icons/fullscreen-exit-line-icon.d.ts +6 -0
- package/dist/component/Icons/fullscreen-exit-line-icon.js +13 -0
- package/dist/component/Icons/fullscreen-line-icon.d.ts +6 -0
- package/dist/component/Icons/fullscreen-line-icon.js +13 -0
- package/dist/component/Icons/functions-icon.d.ts +6 -0
- package/dist/component/Icons/functions-icon.js +13 -0
- package/dist/component/Icons/game-line-icon.d.ts +6 -0
- package/dist/component/Icons/game-line-icon.js +13 -0
- package/dist/component/Icons/h-1-icon.d.ts +6 -0
- package/dist/component/Icons/h-1-icon.js +13 -0
- package/dist/component/Icons/h-2-icon.d.ts +6 -0
- package/dist/component/Icons/h-2-icon.js +13 -0
- package/dist/component/Icons/h-3-icon.d.ts +6 -0
- package/dist/component/Icons/h-3-icon.js +13 -0
- package/dist/component/Icons/h-4-icon.d.ts +6 -0
- package/dist/component/Icons/h-4-icon.js +13 -0
- package/dist/component/Icons/h-5-icon.d.ts +6 -0
- package/dist/component/Icons/h-5-icon.js +13 -0
- package/dist/component/Icons/h-6-icon.d.ts +6 -0
- package/dist/component/Icons/h-6-icon.js +13 -0
- package/dist/component/Icons/heading-icon.d.ts +6 -0
- package/dist/component/Icons/heading-icon.js +13 -0
- package/dist/component/Icons/image-add-line-icon.d.ts +6 -0
- package/dist/component/Icons/image-add-line-icon.js +13 -0
- package/dist/component/Icons/image-line-icon.d.ts +6 -0
- package/dist/component/Icons/image-line-icon.js +13 -0
- package/dist/component/Icons/import-line-icon.d.ts +6 -0
- package/dist/component/Icons/import-line-icon.js +13 -0
- package/dist/component/Icons/index.d.ts +110 -0
- package/dist/component/Icons/index.js +113 -0
- package/dist/component/Icons/insert-column-left-icon.d.ts +6 -0
- package/dist/component/Icons/insert-column-left-icon.js +13 -0
- package/dist/component/Icons/insert-column-right-icon.d.ts +6 -0
- package/dist/component/Icons/insert-column-right-icon.js +13 -0
- package/dist/component/Icons/insert-row-bottom-icon.d.ts +6 -0
- package/dist/component/Icons/insert-row-bottom-icon.js +13 -0
- package/dist/component/Icons/insert-row-top-icon.d.ts +6 -0
- package/dist/component/Icons/insert-row-top-icon.js +13 -0
- package/dist/component/Icons/italic-icon.d.ts +6 -0
- package/dist/component/Icons/italic-icon.js +13 -0
- package/dist/component/Icons/layout-left-2-line-icon.d.ts +6 -0
- package/dist/component/Icons/layout-left-2-line-icon.js +13 -0
- package/dist/component/Icons/layout-top-2-line-icon.d.ts +6 -0
- package/dist/component/Icons/layout-top-2-line-icon.js +13 -0
- package/dist/component/Icons/link-icon.d.ts +6 -0
- package/dist/component/Icons/link-icon.js +13 -0
- package/dist/component/Icons/link-unlink-icon.d.ts +6 -0
- package/dist/component/Icons/link-unlink-icon.js +13 -0
- package/dist/component/Icons/list-check-2-icon.d.ts +6 -0
- package/dist/component/Icons/list-check-2-icon.js +13 -0
- package/dist/component/Icons/list-check-3-icon.d.ts +6 -0
- package/dist/component/Icons/list-check-3-icon.js +13 -0
- package/dist/component/Icons/list-ordered-2-icon.d.ts +6 -0
- package/dist/component/Icons/list-ordered-2-icon.js +13 -0
- package/dist/component/Icons/list-unordered-icon.d.ts +6 -0
- package/dist/component/Icons/list-unordered-icon.js +13 -0
- package/dist/component/Icons/markdown-line-icon.d.ts +6 -0
- package/dist/component/Icons/markdown-line-icon.js +13 -0
- package/dist/component/Icons/markup-line-icon.d.ts +6 -0
- package/dist/component/Icons/markup-line-icon.js +13 -0
- package/dist/component/Icons/menu-fold-2-fill-icon.d.ts +6 -0
- package/dist/component/Icons/menu-fold-2-fill-icon.js +13 -0
- package/dist/component/Icons/merge-cells-horizontal-icon.d.ts +6 -0
- package/dist/component/Icons/merge-cells-horizontal-icon.js +13 -0
- package/dist/component/Icons/merge-cells-vertical-icon.d.ts +6 -0
- package/dist/component/Icons/merge-cells-vertical-icon.js +13 -0
- package/dist/component/Icons/mind-map-icon.d.ts +6 -0
- package/dist/component/Icons/mind-map-icon.js +13 -0
- package/dist/component/Icons/more-line-icon.d.ts +6 -0
- package/dist/component/Icons/more-line-icon.js +13 -0
- package/dist/component/Icons/movie-line-icon.d.ts +6 -0
- package/dist/component/Icons/movie-line-icon.js +13 -0
- package/dist/component/Icons/music-2-line-icon.d.ts +6 -0
- package/dist/component/Icons/music-2-line-icon.js +13 -0
- package/dist/component/Icons/node-tree-icon.d.ts +6 -0
- package/dist/component/Icons/node-tree-icon.js +13 -0
- package/dist/component/Icons/notification-3-line-icon.d.ts +6 -0
- package/dist/component/Icons/notification-3-line-icon.js +13 -0
- package/dist/component/Icons/organization-chart-icon.d.ts +6 -0
- package/dist/component/Icons/organization-chart-icon.js +13 -0
- package/dist/component/Icons/pause-line-icon.d.ts +6 -0
- package/dist/component/Icons/pause-line-icon.js +13 -0
- package/dist/component/Icons/play-line-icon.d.ts +6 -0
- package/dist/component/Icons/play-line-icon.js +13 -0
- package/dist/component/Icons/quote-text-icon.d.ts +6 -0
- package/dist/component/Icons/quote-text-icon.js +13 -0
- package/dist/component/Icons/repeat-2-line-icon.d.ts +6 -0
- package/dist/component/Icons/repeat-2-line-icon.js +13 -0
- package/dist/component/Icons/reset-left-fill-icon.d.ts +6 -0
- package/dist/component/Icons/reset-left-fill-icon.js +13 -0
- package/dist/component/Icons/scissors-cut-line-icon.d.ts +6 -0
- package/dist/component/Icons/scissors-cut-line-icon.js +13 -0
- package/dist/component/Icons/screenshot-line-icon.d.ts +6 -0
- package/dist/component/Icons/screenshot-line-icon.js +13 -0
- package/dist/component/Icons/scroll-to-bottom-line-icon.d.ts +6 -0
- package/dist/component/Icons/scroll-to-bottom-line-icon.js +13 -0
- package/dist/component/Icons/separator-icon.d.ts +6 -0
- package/dist/component/Icons/separator-icon.js +13 -0
- package/dist/component/Icons/share-box-line-icon.d.ts +6 -0
- package/dist/component/Icons/share-box-line-icon.js +13 -0
- package/dist/component/Icons/slash-commands-2-icon.d.ts +3 -0
- package/dist/component/Icons/slash-commands-2-icon.js +13 -0
- package/dist/component/Icons/speed-line-icon.d.ts +6 -0
- package/dist/component/Icons/speed-line-icon.js +13 -0
- package/dist/component/Icons/split-cells-horizontal-icon.d.ts +6 -0
- package/dist/component/Icons/split-cells-horizontal-icon.js +13 -0
- package/dist/component/Icons/split-cells-vertical-icon.d.ts +6 -0
- package/dist/component/Icons/split-cells-vertical-icon.js +13 -0
- package/dist/component/Icons/square-root-icon.d.ts +6 -0
- package/dist/component/Icons/square-root-icon.js +13 -0
- package/dist/component/Icons/strikethrough-icon.d.ts +6 -0
- package/dist/component/Icons/strikethrough-icon.js +13 -0
- package/dist/component/Icons/subscript-icon.d.ts +6 -0
- package/dist/component/Icons/subscript-icon.js +13 -0
- package/dist/component/Icons/superscript-icon.d.ts +6 -0
- package/dist/component/Icons/superscript-icon.js +13 -0
- package/dist/component/Icons/table-2-icon.d.ts +6 -0
- package/dist/component/Icons/table-2-icon.js +13 -0
- package/dist/component/Icons/text-icon.d.ts +6 -0
- package/dist/component/Icons/text-icon.js +13 -0
- package/dist/component/Icons/text-wrap-icon.d.ts +6 -0
- package/dist/component/Icons/text-wrap-icon.js +13 -0
- package/dist/component/Icons/title-icon.d.ts +6 -0
- package/dist/component/Icons/title-icon.js +13 -0
- package/dist/component/Icons/underline-icon.d.ts +6 -0
- package/dist/component/Icons/underline-icon.js +13 -0
- package/dist/component/Icons/upload-cloud-2-line-icon.d.ts +6 -0
- package/dist/component/Icons/upload-cloud-2-line-icon.js +13 -0
- package/dist/component/Icons/upload-icon.d.ts +6 -0
- package/dist/component/Icons/upload-icon.js +13 -0
- package/dist/component/Icons/volume-mute-line-icon.d.ts +6 -0
- package/dist/component/Icons/volume-mute-line-icon.js +13 -0
- package/dist/component/Icons/volume-up-line-icon.d.ts +6 -0
- package/dist/component/Icons/volume-up-line-icon.js +13 -0
- package/dist/component/ListHover/index.d.ts +7 -0
- package/dist/component/ListHover/index.js +367 -0
- package/dist/component/Menu/index.d.ts +4 -0
- package/dist/component/Menu/index.js +189 -0
- package/dist/component/Toolbar/EditorAlignSelect.d.ts +7 -0
- package/dist/component/Toolbar/EditorAlignSelect.js +176 -0
- package/dist/component/Toolbar/EditorCode.d.ts +7 -0
- package/dist/component/Toolbar/EditorCode.js +150 -0
- package/dist/component/Toolbar/EditorFontBgColor.d.ts +7 -0
- package/dist/component/Toolbar/EditorFontBgColor.js +244 -0
- package/dist/component/Toolbar/EditorFontColor.d.ts +7 -0
- package/dist/component/Toolbar/EditorFontColor.js +246 -0
- package/dist/component/Toolbar/EditorFontSize.d.ts +7 -0
- package/dist/component/Toolbar/EditorFontSize.js +137 -0
- package/dist/component/Toolbar/EditorHeading.d.ts +7 -0
- package/dist/component/Toolbar/EditorHeading.js +174 -0
- package/dist/component/Toolbar/EditorInsert/index.d.ts +7 -0
- package/dist/component/Toolbar/EditorInsert/index.js +186 -0
- package/dist/component/Toolbar/EditorListSelect.d.ts +7 -0
- package/dist/component/Toolbar/EditorListSelect.js +163 -0
- package/dist/component/Toolbar/EditorMath.d.ts +7 -0
- package/dist/component/Toolbar/EditorMath.js +148 -0
- package/dist/component/Toolbar/EditorMore/NotificationDialog.d.ts +7 -0
- package/dist/component/Toolbar/EditorMore/NotificationDialog.js +72 -0
- package/dist/component/Toolbar/EditorMore/index.d.ts +7 -0
- package/dist/component/Toolbar/EditorMore/index.js +101 -0
- package/dist/component/Toolbar/EditorScript.d.ts +7 -0
- package/dist/component/Toolbar/EditorScript.js +150 -0
- package/dist/component/Toolbar/EditorVerticalAlignSelect.d.ts +7 -0
- package/dist/component/Toolbar/EditorVerticalAlignSelect.js +163 -0
- package/dist/component/Toolbar/Item.d.ts +15 -0
- package/dist/component/Toolbar/Item.js +69 -0
- package/dist/component/Toolbar/index.d.ts +13 -0
- package/dist/component/Toolbar/index.js +13 -0
- package/dist/component/index.d.ts +1 -0
- package/dist/component/index.js +1 -0
- package/dist/contants/enums.d.ts +30 -0
- package/dist/contants/enums.js +98 -0
- package/dist/contants/highlight.d.ts +4 -0
- package/dist/contants/highlight.js +580 -0
- package/dist/contants/placeholder.d.ts +16 -0
- package/dist/contants/placeholder.js +16 -0
- package/dist/contants/shortcut-key.d.ts +48 -0
- package/dist/contants/shortcut-key.js +224 -0
- package/dist/contants/slash-commands.d.ts +13 -0
- package/dist/contants/slash-commands.js +313 -0
- package/dist/extension/component/Attachment/Insert.d.ts +13 -0
- package/dist/extension/component/Attachment/Insert.js +222 -0
- package/dist/extension/component/Attachment/Readonly.d.ts +9 -0
- package/dist/extension/component/Attachment/Readonly.js +93 -0
- package/dist/extension/component/Attachment/index.d.ts +13 -0
- package/dist/extension/component/Attachment/index.js +317 -0
- package/dist/extension/component/Audio/Insert.d.ts +10 -0
- package/dist/extension/component/Audio/Insert.js +351 -0
- package/dist/extension/component/Audio/Readonly.d.ts +8 -0
- package/dist/extension/component/Audio/Readonly.js +428 -0
- package/dist/extension/component/Audio/index.d.ts +14 -0
- package/dist/extension/component/Audio/index.js +740 -0
- package/dist/extension/component/CodeBlock/Readonly.d.ts +4 -0
- package/dist/extension/component/CodeBlock/Readonly.js +135 -0
- package/dist/extension/component/CodeBlock/index.d.ts +4 -0
- package/dist/extension/component/CodeBlock/index.js +296 -0
- package/dist/extension/component/CustomLink/Insert.d.ts +0 -0
- package/dist/extension/component/CustomLink/Insert.js +176 -0
- package/dist/extension/component/CustomLink/Readonly.d.ts +0 -0
- package/dist/extension/component/CustomLink/Readonly.js +106 -0
- package/dist/extension/component/CustomLink/index.d.ts +0 -0
- package/dist/extension/component/CustomLink/index.js +440 -0
- package/dist/extension/component/EmojiList/index.d.ts +14 -0
- package/dist/extension/component/EmojiList/index.js +104 -0
- package/dist/extension/component/Image/Crop.d.ts +12 -0
- package/dist/extension/component/Image/Crop.js +218 -0
- package/dist/extension/component/Image/Insert.d.ts +10 -0
- package/dist/extension/component/Image/Insert.js +309 -0
- package/dist/extension/component/Image/Readonly.d.ts +8 -0
- package/dist/extension/component/Image/Readonly.js +52 -0
- package/dist/extension/component/Image/index.d.ts +21 -0
- package/dist/extension/component/Image/index.js +372 -0
- package/dist/extension/component/Link/Insert.d.ts +10 -0
- package/dist/extension/component/Link/Insert.js +253 -0
- package/dist/extension/component/Link/Readonly.d.ts +8 -0
- package/dist/extension/component/Link/Readonly.js +102 -0
- package/dist/extension/component/Link/index.d.ts +12 -0
- package/dist/extension/component/Link/index.js +510 -0
- package/dist/extension/component/Mathematics/block/Readonly.d.ts +9 -0
- package/dist/extension/component/Mathematics/block/Readonly.js +36 -0
- package/dist/extension/component/Mathematics/block/index.d.ts +8 -0
- package/dist/extension/component/Mathematics/block/index.js +149 -0
- package/dist/extension/component/Mathematics/index.d.ts +3 -0
- package/dist/extension/component/Mathematics/index.js +3 -0
- package/dist/extension/component/Mathematics/inline/Readonly.d.ts +9 -0
- package/dist/extension/component/Mathematics/inline/Readonly.js +34 -0
- package/dist/extension/component/Mathematics/inline/index.d.ts +8 -0
- package/dist/extension/component/Mathematics/inline/index.js +148 -0
- package/dist/extension/component/MentionList/index.d.ts +13 -0
- package/dist/extension/component/MentionList/index.js +92 -0
- package/dist/extension/component/SlashCommandsList/index.d.ts +4 -0
- package/dist/extension/component/SlashCommandsList/index.js +121 -0
- package/dist/extension/component/Table/ContextMenu.d.ts +10 -0
- package/dist/extension/component/Table/ContextMenu.js +228 -0
- package/dist/extension/component/Table/TableContextMenuPlugin.d.ts +9 -0
- package/dist/extension/component/Table/TableContextMenuPlugin.js +272 -0
- package/dist/extension/component/Table/index.d.ts +2 -0
- package/dist/extension/component/Table/index.js +2 -0
- package/dist/extension/component/UploadProgress/index.d.ts +10 -0
- package/dist/extension/component/UploadProgress/index.js +103 -0
- package/dist/extension/component/Video/Insert.d.ts +10 -0
- package/dist/extension/component/Video/Insert.js +257 -0
- package/dist/extension/component/Video/Readonly.d.ts +8 -0
- package/dist/extension/component/Video/Readonly.js +41 -0
- package/dist/extension/component/Video/index.d.ts +14 -0
- package/dist/extension/component/Video/index.js +166 -0
- package/dist/extension/extension/SlashCommands.d.ts +3 -0
- package/dist/extension/extension/SlashCommands.js +25 -0
- package/dist/extension/extension/index.d.ts +1 -0
- package/dist/extension/extension/index.js +1 -0
- package/dist/extension/index.d.ts +2 -0
- package/dist/extension/index.js +176 -0
- package/dist/extension/mark/Link.d.ts +0 -0
- package/dist/extension/mark/Link.js +58 -0
- package/dist/extension/mark/index.d.ts +0 -0
- package/dist/extension/mark/index.js +1 -0
- package/dist/extension/node/Attachment.d.ts +28 -0
- package/dist/extension/node/Attachment.js +227 -0
- package/dist/extension/node/Audio.d.ts +23 -0
- package/dist/extension/node/Audio.js +194 -0
- package/dist/extension/node/CodeBlockLowlight.d.ts +1 -0
- package/dist/extension/node/CodeBlockLowlight.js +40 -0
- package/dist/extension/node/Details.d.ts +3 -0
- package/dist/extension/node/Details.js +39 -0
- package/dist/extension/node/Emoji.d.ts +1 -0
- package/dist/extension/node/Emoji.js +7 -0
- package/dist/extension/node/FileHandler.d.ts +4 -0
- package/dist/extension/node/FileHandler.js +294 -0
- package/dist/extension/node/Image.d.ts +3 -0
- package/dist/extension/node/Image.js +38 -0
- package/dist/extension/node/Link/helpers/autolink.d.ts +15 -0
- package/dist/extension/node/Link/helpers/autolink.js +162 -0
- package/dist/extension/node/Link/helpers/clickHandler.d.ts +10 -0
- package/dist/extension/node/Link/helpers/clickHandler.js +46 -0
- package/dist/extension/node/Link/helpers/pasteHandler.d.ts +10 -0
- package/dist/extension/node/Link/helpers/pasteHandler.js +32 -0
- package/dist/extension/node/Link/helpers/whitespace.d.ts +4 -0
- package/dist/extension/node/Link/helpers/whitespace.js +6 -0
- package/dist/extension/node/Link/index.d.ts +162 -0
- package/dist/extension/node/Link/index.js +461 -0
- package/dist/extension/node/ListKit.d.ts +2 -0
- package/dist/extension/node/ListKit.js +23 -0
- package/dist/extension/node/Mathematics.d.ts +27 -0
- package/dist/extension/node/Mathematics.js +97 -0
- package/dist/extension/node/Mention.d.ts +2 -0
- package/dist/extension/node/Mention.js +10 -0
- package/dist/extension/node/Table.d.ts +5 -0
- package/dist/extension/node/Table.js +174 -0
- package/dist/extension/node/TableOfContents/index.d.ts +9 -0
- package/dist/extension/node/TableOfContents/index.js +391 -0
- package/dist/extension/node/TableOfContents/plugin.d.ts +6 -0
- package/dist/extension/node/TableOfContents/plugin.js +58 -0
- package/dist/extension/node/TableOfContents/type.d.ts +45 -0
- package/dist/extension/node/TableOfContents/type.js +1 -0
- package/dist/extension/node/TableOfContents/utils.d.ts +6 -0
- package/dist/extension/node/TableOfContents/utils.js +70 -0
- package/dist/extension/node/UploadProgress.d.ts +21 -0
- package/dist/extension/node/UploadProgress.js +135 -0
- package/dist/extension/node/VerticalAlign.d.ts +49 -0
- package/dist/extension/node/VerticalAlign.js +88 -0
- package/dist/extension/node/Video.d.ts +23 -0
- package/dist/extension/node/Video.js +195 -0
- package/dist/extension/node/Youtube.d.ts +3 -0
- package/dist/extension/node/Youtube.js +14 -0
- package/dist/extension/node/index.d.ts +17 -0
- package/dist/extension/node/index.js +17 -0
- package/dist/extension/suggestion/emoji.d.ts +3 -0
- package/dist/extension/suggestion/emoji.js +57 -0
- package/dist/extension/suggestion/mention.d.ts +4 -0
- package/dist/extension/suggestion/mention.js +88 -0
- package/dist/extension/suggestion/slash.d.ts +34 -0
- package/dist/extension/suggestion/slash.js +63 -0
- package/dist/hook/fn.d.ts +13 -0
- package/dist/hook/fn.js +37 -0
- package/dist/hook/index.d.ts +4 -0
- package/dist/hook/index.js +110 -0
- package/dist/index.css +372 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +7 -0
- package/dist/themes/color.d.ts +5 -0
- package/dist/themes/color.js +4 -0
- package/dist/themes/componentStyleOverrides.d.ts +396 -0
- package/dist/themes/componentStyleOverrides.js +431 -0
- package/dist/themes/custom.d.ts +5 -0
- package/dist/themes/custom.js +4 -0
- package/dist/themes/dark.d.ts +86 -0
- package/dist/themes/dark.js +86 -0
- package/dist/themes/index.d.ts +19 -0
- package/dist/themes/index.js +37 -0
- package/dist/themes/light.d.ts +86 -0
- package/dist/themes/light.js +86 -0
- package/dist/themes/palette.d.ts +94 -0
- package/dist/themes/palette.js +24 -0
- package/dist/themes/shadows.d.ts +2 -0
- package/dist/themes/shadows.js +3 -0
- package/dist/themes/themeContext.d.ts +8 -0
- package/dist/themes/themeContext.js +3 -0
- package/dist/themes/typography.d.ts +6 -0
- package/dist/themes/typography.js +8 -0
- package/dist/type/index.d.ts +112 -0
- package/dist/type/index.js +1 -0
- package/dist/types/images.d.ts +19 -0
- package/dist/util/fileDownload.d.ts +16 -0
- package/dist/util/fileDownload.js +268 -0
- package/dist/util/fileHandler.d.ts +7 -0
- package/dist/util/fileHandler.js +79 -0
- package/dist/util/floating.d.ts +2 -0
- package/dist/util/floating.js +22 -0
- package/dist/util/index.d.ts +11 -0
- package/dist/util/index.js +39 -0
- package/dist/util/migrateMathStrings.d.ts +73 -0
- package/dist/util/migrateMathStrings.js +192 -0
- package/dist/util/resourceExtractor.d.ts +15 -0
- package/dist/util/resourceExtractor.js +62 -0
- package/dist/util/shortcutKey.d.ts +2 -0
- package/dist/util/shortcutKey.js +9 -0
- package/package.json +135 -0
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
export declare const MAC_SYMBOLS: {
|
|
2
|
+
ctrl: string;
|
|
3
|
+
alt: string;
|
|
4
|
+
shift: string;
|
|
5
|
+
enter: string;
|
|
6
|
+
};
|
|
7
|
+
export declare const SHORTCUT_KEYS: {
|
|
8
|
+
Essentials: {
|
|
9
|
+
label: string;
|
|
10
|
+
keys: {
|
|
11
|
+
label: string;
|
|
12
|
+
value: string;
|
|
13
|
+
keys: string[];
|
|
14
|
+
}[];
|
|
15
|
+
};
|
|
16
|
+
Insert: {
|
|
17
|
+
label: string;
|
|
18
|
+
keys: {
|
|
19
|
+
label: string;
|
|
20
|
+
value: string;
|
|
21
|
+
keys: string[];
|
|
22
|
+
}[];
|
|
23
|
+
};
|
|
24
|
+
'Text Formatting': {
|
|
25
|
+
label: string;
|
|
26
|
+
keys: {
|
|
27
|
+
label: string;
|
|
28
|
+
value: string;
|
|
29
|
+
keys: string[];
|
|
30
|
+
}[];
|
|
31
|
+
};
|
|
32
|
+
'Paragraph Formatting': {
|
|
33
|
+
label: string;
|
|
34
|
+
keys: {
|
|
35
|
+
label: string;
|
|
36
|
+
value: string;
|
|
37
|
+
keys: string[];
|
|
38
|
+
}[];
|
|
39
|
+
};
|
|
40
|
+
'Text Selection': {
|
|
41
|
+
label: string;
|
|
42
|
+
keys: {
|
|
43
|
+
label: string;
|
|
44
|
+
value: string;
|
|
45
|
+
keys: string[];
|
|
46
|
+
}[];
|
|
47
|
+
};
|
|
48
|
+
};
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
export var MAC_SYMBOLS = {
|
|
2
|
+
ctrl: "⌘",
|
|
3
|
+
alt: "⌥",
|
|
4
|
+
shift: "⇧",
|
|
5
|
+
enter: "↵"
|
|
6
|
+
};
|
|
7
|
+
export var SHORTCUT_KEYS = {
|
|
8
|
+
'Essentials': {
|
|
9
|
+
label: '基础',
|
|
10
|
+
keys: [{
|
|
11
|
+
label: '复制',
|
|
12
|
+
value: 'Copy',
|
|
13
|
+
keys: ['ctrl', 'C']
|
|
14
|
+
}, {
|
|
15
|
+
label: '剪切',
|
|
16
|
+
value: 'Cut',
|
|
17
|
+
keys: ['ctrl', 'X']
|
|
18
|
+
}, {
|
|
19
|
+
label: '粘贴',
|
|
20
|
+
value: 'Paste',
|
|
21
|
+
keys: ['ctrl', 'V']
|
|
22
|
+
}, {
|
|
23
|
+
label: '粘贴纯文本',
|
|
24
|
+
value: 'Paste without formatting',
|
|
25
|
+
keys: ['ctrl', 'shift', 'V']
|
|
26
|
+
}, {
|
|
27
|
+
label: '撤销',
|
|
28
|
+
value: 'Undo',
|
|
29
|
+
keys: ['ctrl', 'Z']
|
|
30
|
+
}, {
|
|
31
|
+
label: '重做',
|
|
32
|
+
value: 'Redo',
|
|
33
|
+
keys: ['ctrl', 'shift', 'Z']
|
|
34
|
+
}, {
|
|
35
|
+
label: '换行',
|
|
36
|
+
value: 'Add a line break',
|
|
37
|
+
keys: ['ctrl', 'enter']
|
|
38
|
+
}, {
|
|
39
|
+
label: '保存',
|
|
40
|
+
value: 'Save',
|
|
41
|
+
keys: ['ctrl', 'S']
|
|
42
|
+
}]
|
|
43
|
+
},
|
|
44
|
+
'Insert': {
|
|
45
|
+
label: '插入',
|
|
46
|
+
keys: [{
|
|
47
|
+
label: '链接',
|
|
48
|
+
value: 'Link',
|
|
49
|
+
keys: ['ctrl', '1']
|
|
50
|
+
}, {
|
|
51
|
+
label: '图片',
|
|
52
|
+
value: 'Image',
|
|
53
|
+
keys: ['ctrl', '2']
|
|
54
|
+
}, {
|
|
55
|
+
label: '视频',
|
|
56
|
+
value: 'Video',
|
|
57
|
+
keys: ['ctrl', '3']
|
|
58
|
+
}, {
|
|
59
|
+
label: '音频',
|
|
60
|
+
value: 'Audio',
|
|
61
|
+
keys: ['ctrl', '4']
|
|
62
|
+
}, {
|
|
63
|
+
label: '附件',
|
|
64
|
+
value: 'Attachment',
|
|
65
|
+
keys: ['ctrl', '5']
|
|
66
|
+
}, {
|
|
67
|
+
label: '行内数学公式',
|
|
68
|
+
value: 'Inline Math',
|
|
69
|
+
keys: ['ctrl', '6']
|
|
70
|
+
}, {
|
|
71
|
+
label: '块级数学公式',
|
|
72
|
+
value: 'Block Math',
|
|
73
|
+
keys: ['ctrl', '7']
|
|
74
|
+
}, {
|
|
75
|
+
label: '折叠块',
|
|
76
|
+
value: 'Details',
|
|
77
|
+
keys: ['ctrl', '8']
|
|
78
|
+
}, {
|
|
79
|
+
label: '表格',
|
|
80
|
+
value: 'Table',
|
|
81
|
+
keys: ['ctrl', '9']
|
|
82
|
+
}]
|
|
83
|
+
},
|
|
84
|
+
'Text Formatting': {
|
|
85
|
+
label: '文本格式',
|
|
86
|
+
keys: [{
|
|
87
|
+
label: '加粗',
|
|
88
|
+
value: 'Bold',
|
|
89
|
+
keys: ['ctrl', 'B']
|
|
90
|
+
}, {
|
|
91
|
+
label: '斜体',
|
|
92
|
+
value: 'Italic',
|
|
93
|
+
keys: ['ctrl', 'I']
|
|
94
|
+
}, {
|
|
95
|
+
label: '下划线',
|
|
96
|
+
value: 'Underline',
|
|
97
|
+
keys: ['ctrl', 'U']
|
|
98
|
+
}, {
|
|
99
|
+
label: '删除线',
|
|
100
|
+
value: 'Strikethrough',
|
|
101
|
+
keys: ['ctrl', 'shift', 'S']
|
|
102
|
+
}, {
|
|
103
|
+
label: '高亮',
|
|
104
|
+
value: 'Highlight',
|
|
105
|
+
keys: ['ctrl', 'shift', 'H']
|
|
106
|
+
}, {
|
|
107
|
+
label: '代码',
|
|
108
|
+
value: 'Code',
|
|
109
|
+
keys: ['ctrl', 'E']
|
|
110
|
+
}]
|
|
111
|
+
},
|
|
112
|
+
'Paragraph Formatting': {
|
|
113
|
+
label: '段落格式',
|
|
114
|
+
keys: [{
|
|
115
|
+
label: '文本',
|
|
116
|
+
value: 'Normal Text',
|
|
117
|
+
keys: ['ctrl', 'alt', '0']
|
|
118
|
+
}, {
|
|
119
|
+
label: '标题 1',
|
|
120
|
+
value: 'Heading 1',
|
|
121
|
+
keys: ['ctrl', 'alt', '1']
|
|
122
|
+
}, {
|
|
123
|
+
label: '标题 2',
|
|
124
|
+
value: 'Heading 2',
|
|
125
|
+
keys: ['ctrl', 'alt', '2']
|
|
126
|
+
}, {
|
|
127
|
+
label: '标题 3',
|
|
128
|
+
value: 'Heading 3',
|
|
129
|
+
keys: ['ctrl', 'alt', '3']
|
|
130
|
+
}, {
|
|
131
|
+
label: '标题 4',
|
|
132
|
+
value: 'Heading 4',
|
|
133
|
+
keys: ['ctrl', 'alt', '4']
|
|
134
|
+
}, {
|
|
135
|
+
label: '标题 5',
|
|
136
|
+
value: 'Heading 5',
|
|
137
|
+
keys: ['ctrl', 'alt', '5']
|
|
138
|
+
}, {
|
|
139
|
+
label: '标题 6',
|
|
140
|
+
value: 'Heading 6',
|
|
141
|
+
keys: ['ctrl', 'alt', '6']
|
|
142
|
+
}, {
|
|
143
|
+
label: '有序列表',
|
|
144
|
+
value: 'Ordered list',
|
|
145
|
+
keys: ['ctrl', 'shift', '7']
|
|
146
|
+
}, {
|
|
147
|
+
label: '无序列表',
|
|
148
|
+
value: 'Bullet list',
|
|
149
|
+
keys: ['ctrl', 'shift', '8']
|
|
150
|
+
}, {
|
|
151
|
+
label: '待办列表',
|
|
152
|
+
value: 'Task list',
|
|
153
|
+
keys: ['ctrl', 'shift', '9']
|
|
154
|
+
}, {
|
|
155
|
+
label: '引用块',
|
|
156
|
+
value: 'Blockquote',
|
|
157
|
+
keys: ['ctrl', 'shift', 'B']
|
|
158
|
+
}, {
|
|
159
|
+
label: '左对齐',
|
|
160
|
+
value: 'Left align',
|
|
161
|
+
keys: ['ctrl', 'shift', 'L']
|
|
162
|
+
}, {
|
|
163
|
+
label: '居中对齐',
|
|
164
|
+
value: 'Center align',
|
|
165
|
+
keys: ['ctrl', 'shift', 'E']
|
|
166
|
+
}, {
|
|
167
|
+
label: '右对齐',
|
|
168
|
+
value: 'Right align',
|
|
169
|
+
keys: ['ctrl', 'shift', 'R']
|
|
170
|
+
}, {
|
|
171
|
+
label: '两端对齐',
|
|
172
|
+
value: 'Justify',
|
|
173
|
+
keys: ['ctrl', 'shift', 'J']
|
|
174
|
+
}, {
|
|
175
|
+
label: '垂直顶部对齐',
|
|
176
|
+
value: 'Top align',
|
|
177
|
+
keys: ['ctrl', 'alt', 'T']
|
|
178
|
+
}, {
|
|
179
|
+
label: '垂直居中对齐',
|
|
180
|
+
value: 'Center align',
|
|
181
|
+
keys: ['ctrl', 'alt', 'M']
|
|
182
|
+
}, {
|
|
183
|
+
label: '垂直底部对齐',
|
|
184
|
+
value: 'Bottom align',
|
|
185
|
+
keys: ['ctrl', 'alt', 'B']
|
|
186
|
+
}, {
|
|
187
|
+
label: '代码块',
|
|
188
|
+
value: 'Code block',
|
|
189
|
+
keys: ['ctrl', 'alt', 'C']
|
|
190
|
+
}, {
|
|
191
|
+
label: '下标',
|
|
192
|
+
value: 'Subscript',
|
|
193
|
+
keys: ['ctrl', ',']
|
|
194
|
+
}, {
|
|
195
|
+
label: '上标',
|
|
196
|
+
value: 'Superscript',
|
|
197
|
+
keys: ['ctrl', '.']
|
|
198
|
+
}]
|
|
199
|
+
},
|
|
200
|
+
'Text Selection': {
|
|
201
|
+
label: '文本选择',
|
|
202
|
+
keys: [{
|
|
203
|
+
label: '全选',
|
|
204
|
+
value: 'Select all',
|
|
205
|
+
keys: ['ctrl', 'A']
|
|
206
|
+
}, {
|
|
207
|
+
label: '选择向左扩展一个字符',
|
|
208
|
+
value: 'Extend selection one character to left',
|
|
209
|
+
keys: ['shift', '←']
|
|
210
|
+
}, {
|
|
211
|
+
label: '选择向右扩展一个字符',
|
|
212
|
+
value: 'Extend selection one character to right',
|
|
213
|
+
keys: ['shift', '→']
|
|
214
|
+
}, {
|
|
215
|
+
label: '选择向上扩展一行',
|
|
216
|
+
value: 'Extend selection one line up',
|
|
217
|
+
keys: ['shift', '↑']
|
|
218
|
+
}, {
|
|
219
|
+
label: '选择向下扩展一行',
|
|
220
|
+
value: 'Extend selection one line down',
|
|
221
|
+
keys: ['shift', '↓']
|
|
222
|
+
}]
|
|
223
|
+
}
|
|
224
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Editor } from '@tiptap/react';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
export declare const slashCommands: {
|
|
4
|
+
title: string;
|
|
5
|
+
icon: React.JSX.Element;
|
|
6
|
+
command: ({ editor, range }: {
|
|
7
|
+
editor: Editor;
|
|
8
|
+
range: {
|
|
9
|
+
from: number;
|
|
10
|
+
to: number;
|
|
11
|
+
};
|
|
12
|
+
}) => void;
|
|
13
|
+
}[];
|
|
@@ -0,0 +1,313 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { AttachmentLineIcon, CodeBoxLineIcon, CodeLineIcon, DoubleQuotesLIcon, FunctionsIcon, H1Icon, H2Icon, H3Icon, H4Icon, H5Icon, H6Icon, ImageLineIcon, LinkIcon, ListCheck2Icon, ListOrdered2Icon, ListUnorderedIcon, MenuFold2FillIcon, MovieLineIcon, Music2LineIcon, SeparatorIcon, SquareRootIcon, Table2Icon, TextWrapIcon } from "../component/Icons";
|
|
3
|
+
export var slashCommands = [{
|
|
4
|
+
title: '标题 1',
|
|
5
|
+
icon: /*#__PURE__*/React.createElement(H1Icon, {
|
|
6
|
+
sx: {
|
|
7
|
+
fontSize: '1rem'
|
|
8
|
+
}
|
|
9
|
+
}),
|
|
10
|
+
command: function command(_ref) {
|
|
11
|
+
var editor = _ref.editor,
|
|
12
|
+
range = _ref.range;
|
|
13
|
+
editor.chain().focus().deleteRange(range).setNode('heading', {
|
|
14
|
+
level: 1
|
|
15
|
+
}).run();
|
|
16
|
+
}
|
|
17
|
+
}, {
|
|
18
|
+
title: '标题 2',
|
|
19
|
+
icon: /*#__PURE__*/React.createElement(H2Icon, {
|
|
20
|
+
sx: {
|
|
21
|
+
fontSize: '1rem'
|
|
22
|
+
}
|
|
23
|
+
}),
|
|
24
|
+
command: function command(_ref2) {
|
|
25
|
+
var editor = _ref2.editor,
|
|
26
|
+
range = _ref2.range;
|
|
27
|
+
editor.chain().focus().deleteRange(range).setNode('heading', {
|
|
28
|
+
level: 2
|
|
29
|
+
}).run();
|
|
30
|
+
}
|
|
31
|
+
}, {
|
|
32
|
+
title: '标题 3',
|
|
33
|
+
icon: /*#__PURE__*/React.createElement(H3Icon, {
|
|
34
|
+
sx: {
|
|
35
|
+
fontSize: '1rem'
|
|
36
|
+
}
|
|
37
|
+
}),
|
|
38
|
+
command: function command(_ref3) {
|
|
39
|
+
var editor = _ref3.editor,
|
|
40
|
+
range = _ref3.range;
|
|
41
|
+
editor.chain().focus().deleteRange(range).setNode('heading', {
|
|
42
|
+
level: 3
|
|
43
|
+
}).run();
|
|
44
|
+
}
|
|
45
|
+
}, {
|
|
46
|
+
title: '标题 4',
|
|
47
|
+
icon: /*#__PURE__*/React.createElement(H4Icon, {
|
|
48
|
+
sx: {
|
|
49
|
+
fontSize: '1rem'
|
|
50
|
+
}
|
|
51
|
+
}),
|
|
52
|
+
command: function command(_ref4) {
|
|
53
|
+
var editor = _ref4.editor,
|
|
54
|
+
range = _ref4.range;
|
|
55
|
+
editor.chain().focus().deleteRange(range).setNode('heading', {
|
|
56
|
+
level: 4
|
|
57
|
+
}).run();
|
|
58
|
+
}
|
|
59
|
+
}, {
|
|
60
|
+
title: '标题 5',
|
|
61
|
+
icon: /*#__PURE__*/React.createElement(H5Icon, {
|
|
62
|
+
sx: {
|
|
63
|
+
fontSize: '1rem'
|
|
64
|
+
}
|
|
65
|
+
}),
|
|
66
|
+
command: function command(_ref5) {
|
|
67
|
+
var editor = _ref5.editor,
|
|
68
|
+
range = _ref5.range;
|
|
69
|
+
editor.chain().focus().deleteRange(range).setNode('heading', {
|
|
70
|
+
level: 5
|
|
71
|
+
}).run();
|
|
72
|
+
}
|
|
73
|
+
}, {
|
|
74
|
+
title: '标题 6',
|
|
75
|
+
icon: /*#__PURE__*/React.createElement(H6Icon, {
|
|
76
|
+
sx: {
|
|
77
|
+
fontSize: '1rem'
|
|
78
|
+
}
|
|
79
|
+
}),
|
|
80
|
+
command: function command(_ref6) {
|
|
81
|
+
var editor = _ref6.editor,
|
|
82
|
+
range = _ref6.range;
|
|
83
|
+
editor.chain().focus().deleteRange(range).setNode('heading', {
|
|
84
|
+
level: 6
|
|
85
|
+
}).run();
|
|
86
|
+
}
|
|
87
|
+
}, {
|
|
88
|
+
title: '有序列表',
|
|
89
|
+
icon: /*#__PURE__*/React.createElement(ListOrdered2Icon, {
|
|
90
|
+
sx: {
|
|
91
|
+
fontSize: '1rem'
|
|
92
|
+
}
|
|
93
|
+
}),
|
|
94
|
+
command: function command(_ref7) {
|
|
95
|
+
var editor = _ref7.editor,
|
|
96
|
+
range = _ref7.range;
|
|
97
|
+
editor.chain().focus().deleteRange(range).toggleOrderedList().run();
|
|
98
|
+
}
|
|
99
|
+
}, {
|
|
100
|
+
title: '无序列表',
|
|
101
|
+
icon: /*#__PURE__*/React.createElement(ListUnorderedIcon, {
|
|
102
|
+
sx: {
|
|
103
|
+
fontSize: '1rem'
|
|
104
|
+
}
|
|
105
|
+
}),
|
|
106
|
+
command: function command(_ref8) {
|
|
107
|
+
var editor = _ref8.editor,
|
|
108
|
+
range = _ref8.range;
|
|
109
|
+
editor.chain().focus().deleteRange(range).toggleBulletList().run();
|
|
110
|
+
}
|
|
111
|
+
}, {
|
|
112
|
+
title: '任务列表',
|
|
113
|
+
icon: /*#__PURE__*/React.createElement(ListCheck2Icon, {
|
|
114
|
+
sx: {
|
|
115
|
+
fontSize: '1rem'
|
|
116
|
+
}
|
|
117
|
+
}),
|
|
118
|
+
command: function command(_ref9) {
|
|
119
|
+
var editor = _ref9.editor,
|
|
120
|
+
range = _ref9.range;
|
|
121
|
+
editor.chain().focus().deleteRange(range).toggleTaskList().run();
|
|
122
|
+
}
|
|
123
|
+
}, {
|
|
124
|
+
title: '换行',
|
|
125
|
+
icon: /*#__PURE__*/React.createElement(TextWrapIcon, {
|
|
126
|
+
sx: {
|
|
127
|
+
fontSize: '1rem'
|
|
128
|
+
}
|
|
129
|
+
}),
|
|
130
|
+
command: function command(_ref10) {
|
|
131
|
+
var editor = _ref10.editor,
|
|
132
|
+
range = _ref10.range;
|
|
133
|
+
editor.chain().focus().deleteRange(range).insertContent('<br />').run();
|
|
134
|
+
}
|
|
135
|
+
}, {
|
|
136
|
+
title: '分割线',
|
|
137
|
+
icon: /*#__PURE__*/React.createElement(SeparatorIcon, {
|
|
138
|
+
sx: {
|
|
139
|
+
fontSize: '1rem'
|
|
140
|
+
}
|
|
141
|
+
}),
|
|
142
|
+
command: function command(_ref11) {
|
|
143
|
+
var editor = _ref11.editor,
|
|
144
|
+
range = _ref11.range;
|
|
145
|
+
editor.chain().focus().deleteRange(range).setHorizontalRule().run();
|
|
146
|
+
}
|
|
147
|
+
}, {
|
|
148
|
+
title: '引用',
|
|
149
|
+
icon: /*#__PURE__*/React.createElement(DoubleQuotesLIcon, {
|
|
150
|
+
sx: {
|
|
151
|
+
fontSize: '1rem'
|
|
152
|
+
}
|
|
153
|
+
}),
|
|
154
|
+
command: function command(_ref12) {
|
|
155
|
+
var editor = _ref12.editor,
|
|
156
|
+
range = _ref12.range;
|
|
157
|
+
editor.chain().focus().deleteRange(range).toggleBlockquote().run();
|
|
158
|
+
}
|
|
159
|
+
}, {
|
|
160
|
+
title: '链接',
|
|
161
|
+
icon: /*#__PURE__*/React.createElement(LinkIcon, {
|
|
162
|
+
sx: {
|
|
163
|
+
fontSize: '1rem'
|
|
164
|
+
}
|
|
165
|
+
}),
|
|
166
|
+
command: function command(_ref13) {
|
|
167
|
+
var editor = _ref13.editor,
|
|
168
|
+
range = _ref13.range;
|
|
169
|
+
editor.chain().focus().deleteRange(range).setInlineLink({
|
|
170
|
+
href: ''
|
|
171
|
+
}).run();
|
|
172
|
+
}
|
|
173
|
+
}, {
|
|
174
|
+
title: '折叠块',
|
|
175
|
+
icon: /*#__PURE__*/React.createElement(MenuFold2FillIcon, {
|
|
176
|
+
sx: {
|
|
177
|
+
fontSize: '1rem'
|
|
178
|
+
}
|
|
179
|
+
}),
|
|
180
|
+
command: function command(_ref14) {
|
|
181
|
+
var editor = _ref14.editor,
|
|
182
|
+
range = _ref14.range;
|
|
183
|
+
editor.chain().focus().deleteRange(range).setDetails().run();
|
|
184
|
+
}
|
|
185
|
+
}, {
|
|
186
|
+
title: '行内代码',
|
|
187
|
+
icon: /*#__PURE__*/React.createElement(CodeLineIcon, {
|
|
188
|
+
sx: {
|
|
189
|
+
fontSize: '1rem'
|
|
190
|
+
}
|
|
191
|
+
}),
|
|
192
|
+
command: function command(_ref15) {
|
|
193
|
+
var editor = _ref15.editor,
|
|
194
|
+
range = _ref15.range;
|
|
195
|
+
editor.chain().focus().deleteRange(range).setMark('code').run();
|
|
196
|
+
}
|
|
197
|
+
}, {
|
|
198
|
+
title: '代码块',
|
|
199
|
+
icon: /*#__PURE__*/React.createElement(CodeBoxLineIcon, {
|
|
200
|
+
sx: {
|
|
201
|
+
fontSize: '1rem'
|
|
202
|
+
}
|
|
203
|
+
}),
|
|
204
|
+
command: function command(_ref16) {
|
|
205
|
+
var editor = _ref16.editor,
|
|
206
|
+
range = _ref16.range;
|
|
207
|
+
editor.chain().focus().deleteRange(range).toggleCodeBlock().run();
|
|
208
|
+
}
|
|
209
|
+
}, {
|
|
210
|
+
title: '行内数学公式',
|
|
211
|
+
icon: /*#__PURE__*/React.createElement(SquareRootIcon, {
|
|
212
|
+
sx: {
|
|
213
|
+
fontSize: '1rem'
|
|
214
|
+
}
|
|
215
|
+
}),
|
|
216
|
+
command: function command(_ref17) {
|
|
217
|
+
var editor = _ref17.editor,
|
|
218
|
+
range = _ref17.range;
|
|
219
|
+
editor.chain().focus().deleteRange(range).setInlineMath({
|
|
220
|
+
latex: ''
|
|
221
|
+
}).run();
|
|
222
|
+
}
|
|
223
|
+
}, {
|
|
224
|
+
title: '块级数学公式',
|
|
225
|
+
icon: /*#__PURE__*/React.createElement(FunctionsIcon, {
|
|
226
|
+
sx: {
|
|
227
|
+
fontSize: '1rem'
|
|
228
|
+
}
|
|
229
|
+
}),
|
|
230
|
+
command: function command(_ref18) {
|
|
231
|
+
var editor = _ref18.editor,
|
|
232
|
+
range = _ref18.range;
|
|
233
|
+
editor.chain().focus().deleteRange(range).setBlockMath({
|
|
234
|
+
latex: ''
|
|
235
|
+
}).run();
|
|
236
|
+
}
|
|
237
|
+
}, {
|
|
238
|
+
title: '表格',
|
|
239
|
+
icon: /*#__PURE__*/React.createElement(Table2Icon, {
|
|
240
|
+
sx: {
|
|
241
|
+
fontSize: '1rem'
|
|
242
|
+
}
|
|
243
|
+
}),
|
|
244
|
+
command: function command(_ref19) {
|
|
245
|
+
var editor = _ref19.editor,
|
|
246
|
+
range = _ref19.range;
|
|
247
|
+
editor.chain().focus().deleteRange(range).insertTable({
|
|
248
|
+
rows: 3,
|
|
249
|
+
cols: 4,
|
|
250
|
+
withHeaderRow: true
|
|
251
|
+
}).run();
|
|
252
|
+
}
|
|
253
|
+
}, {
|
|
254
|
+
title: '图片',
|
|
255
|
+
icon: /*#__PURE__*/React.createElement(ImageLineIcon, {
|
|
256
|
+
sx: {
|
|
257
|
+
fontSize: '1rem'
|
|
258
|
+
}
|
|
259
|
+
}),
|
|
260
|
+
command: function command(_ref20) {
|
|
261
|
+
var editor = _ref20.editor,
|
|
262
|
+
range = _ref20.range;
|
|
263
|
+
editor.chain().focus().deleteRange(range).setImage({
|
|
264
|
+
src: '',
|
|
265
|
+
width: 760
|
|
266
|
+
}).run();
|
|
267
|
+
}
|
|
268
|
+
}, {
|
|
269
|
+
title: '视频',
|
|
270
|
+
icon: /*#__PURE__*/React.createElement(MovieLineIcon, {
|
|
271
|
+
sx: {
|
|
272
|
+
fontSize: '1rem'
|
|
273
|
+
}
|
|
274
|
+
}),
|
|
275
|
+
command: function command(_ref21) {
|
|
276
|
+
var editor = _ref21.editor,
|
|
277
|
+
range = _ref21.range;
|
|
278
|
+
editor.chain().focus().deleteRange(range).setVideo({
|
|
279
|
+
src: '',
|
|
280
|
+
width: 760
|
|
281
|
+
}).run();
|
|
282
|
+
}
|
|
283
|
+
}, {
|
|
284
|
+
title: '音频',
|
|
285
|
+
icon: /*#__PURE__*/React.createElement(Music2LineIcon, {
|
|
286
|
+
sx: {
|
|
287
|
+
fontSize: '1rem'
|
|
288
|
+
}
|
|
289
|
+
}),
|
|
290
|
+
command: function command(_ref22) {
|
|
291
|
+
var editor = _ref22.editor,
|
|
292
|
+
range = _ref22.range;
|
|
293
|
+
editor.chain().focus().deleteRange(range).setAudio({
|
|
294
|
+
src: ''
|
|
295
|
+
}).run();
|
|
296
|
+
}
|
|
297
|
+
}, {
|
|
298
|
+
title: '附件',
|
|
299
|
+
icon: /*#__PURE__*/React.createElement(AttachmentLineIcon, {
|
|
300
|
+
sx: {
|
|
301
|
+
fontSize: '1rem'
|
|
302
|
+
}
|
|
303
|
+
}),
|
|
304
|
+
command: function command(_ref23) {
|
|
305
|
+
var editor = _ref23.editor,
|
|
306
|
+
range = _ref23.range;
|
|
307
|
+
editor.chain().focus().deleteRange(range).setInlineAttachment({
|
|
308
|
+
url: '',
|
|
309
|
+
title: '',
|
|
310
|
+
size: '0'
|
|
311
|
+
}).run();
|
|
312
|
+
}
|
|
313
|
+
}];
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Editor } from "@tiptap/core";
|
|
2
|
+
import { EditorFnProps } from "../../../type";
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { AttachmentAttributes } from ".";
|
|
5
|
+
type InsertAttachmentProps = {
|
|
6
|
+
editor: Editor;
|
|
7
|
+
selected: boolean;
|
|
8
|
+
attrs: AttachmentAttributes;
|
|
9
|
+
updateAttributes: (attrs: AttachmentAttributes) => void;
|
|
10
|
+
deleteNode?: () => void;
|
|
11
|
+
} & EditorFnProps;
|
|
12
|
+
declare const InsertAttachment: ({ editor, selected, deleteNode, onUpload, onError }: InsertAttachmentProps) => React.JSX.Element;
|
|
13
|
+
export default InsertAttachment;
|