@maketribe/ms-app 3.2.22 → 3.2.23
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/cjs/components/basic/doc-editor/editor.vue.js +25 -49
- package/dist/cjs/components/basic/doc-editor/editor.vue.js.map +1 -1
- package/dist/cjs/components/basic/doc-editor/plugins/AutoLinkPlugin.vue.js +2 -25
- package/dist/cjs/components/basic/doc-editor/plugins/AutoLinkPlugin.vue.js.map +1 -1
- package/dist/cjs/components/basic/doc-editor/plugins/HtmlBlockPlugin/DocHtmlBlockComponent.js +41 -61
- package/dist/cjs/components/basic/doc-editor/plugins/HtmlBlockPlugin/DocHtmlBlockComponent.js.map +1 -1
- package/dist/cjs/components/basic/doc-editor/plugins/HtmlBlockPlugin/HtmlBlockTools.vue.js +64 -0
- package/dist/cjs/components/basic/doc-editor/plugins/HtmlBlockPlugin/HtmlBlockTools.vue.js.map +1 -0
- package/dist/cjs/components/basic/doc-editor/plugins/HtmlBlockPlugin/HtmlBlockTools.vue2.js +4 -0
- package/dist/cjs/components/basic/doc-editor/plugins/HtmlBlockPlugin/HtmlBlockTools.vue2.js.map +1 -0
- package/dist/cjs/components/basic/doc-editor/plugins/HtmlBlockPlugin/HtmlEditDialog.js +49 -0
- package/dist/cjs/components/basic/doc-editor/plugins/HtmlBlockPlugin/HtmlEditDialog.js.map +1 -0
- package/dist/cjs/components/basic/doc-editor/plugins/HtmlBlockPlugin/index.js +49 -73
- package/dist/cjs/components/basic/doc-editor/plugins/HtmlBlockPlugin/index.js.map +1 -1
- package/dist/cjs/components/basic/doc-editor/plugins/HtmlBlockPlugin/index.vue.js +13 -23
- package/dist/cjs/components/basic/doc-editor/plugins/HtmlBlockPlugin/index.vue.js.map +1 -1
- package/dist/cjs/components/basic/doc-editor/plugins/ImagePlugin/DocImageComponent.js +4 -27
- package/dist/cjs/components/basic/doc-editor/plugins/ImagePlugin/DocImageComponent.js.map +1 -1
- package/dist/cjs/components/basic/doc-editor/plugins/ImagePlugin/ImageEditPanel.js +0 -1
- package/dist/cjs/components/basic/doc-editor/plugins/ImagePlugin/ImageEditPanel.js.map +1 -1
- package/dist/cjs/components/basic/doc-editor/plugins/ImagePlugin/ImageTools.vue.js +2 -23
- package/dist/cjs/components/basic/doc-editor/plugins/ImagePlugin/ImageTools.vue.js.map +1 -1
- package/dist/cjs/components/basic/doc-editor/plugins/ImagePlugin/index.js +5 -24
- package/dist/cjs/components/basic/doc-editor/plugins/ImagePlugin/index.js.map +1 -1
- package/dist/cjs/components/basic/doc-editor/plugins/ImagePlugin/index.vue.js +2 -22
- package/dist/cjs/components/basic/doc-editor/plugins/ImagePlugin/index.vue.js.map +1 -1
- package/dist/cjs/components/basic/doc-editor/plugins/ImageTextPlugin/index.vue.js +2 -23
- package/dist/cjs/components/basic/doc-editor/plugins/ImageTextPlugin/index.vue.js.map +1 -1
- package/dist/cjs/components/basic/doc-editor/{lexical-vue/components/LexicalContentEditable.vue.js → plugins/RichTextPlugin/ContentEditable.vue.js} +5 -18
- package/dist/{esm/components/basic/doc-editor/lexical-vue/components/LexicalContentEditable.vue.js.map → cjs/components/basic/doc-editor/plugins/RichTextPlugin/ContentEditable.vue.js.map} +1 -1
- package/dist/cjs/components/basic/doc-editor/plugins/RichTextPlugin/ContentEditable.vue2.js +4 -0
- package/dist/cjs/components/basic/doc-editor/plugins/RichTextPlugin/ContentEditable.vue2.js.map +1 -0
- package/dist/cjs/components/basic/doc-editor/plugins/RichTextPlugin/DecoratedTeleports.js +13 -0
- package/dist/cjs/components/basic/doc-editor/plugins/RichTextPlugin/DecoratedTeleports.js.map +1 -0
- package/dist/cjs/components/basic/doc-editor/{lexical-vue/components/LexicalRichTextPlugin.vue.js → plugins/RichTextPlugin/index.vue.js} +20 -26
- package/dist/cjs/components/basic/doc-editor/plugins/RichTextPlugin/index.vue.js.map +1 -0
- package/dist/cjs/components/basic/doc-editor/plugins/RichTextPlugin/nodes/RichTextNode.js +153 -0
- package/dist/cjs/components/basic/doc-editor/plugins/RichTextPlugin/nodes/RichTextNode.js.map +1 -0
- package/dist/cjs/components/basic/doc-editor/plugins/ToolbarPlugin/ContentStyleTool.vue.js +2 -22
- package/dist/cjs/components/basic/doc-editor/plugins/ToolbarPlugin/ContentStyleTool.vue.js.map +1 -1
- package/dist/cjs/components/basic/doc-editor/plugins/ToolbarPlugin/FontStyleTool.vue.js +2 -23
- package/dist/cjs/components/basic/doc-editor/plugins/ToolbarPlugin/FontStyleTool.vue.js.map +1 -1
- package/dist/cjs/components/basic/doc-editor/plugins/ToolbarPlugin/InlineToolsPlugin.vue.js +2 -24
- package/dist/cjs/components/basic/doc-editor/plugins/ToolbarPlugin/InlineToolsPlugin.vue.js.map +1 -1
- package/dist/cjs/components/basic/doc-editor/plugins/ToolbarPlugin/PreviewToolbar.vue.js +16 -26
- package/dist/cjs/components/basic/doc-editor/plugins/ToolbarPlugin/PreviewToolbar.vue.js.map +1 -1
- package/dist/cjs/components/basic/doc-editor/plugins/ToolbarPlugin/index.vue.js +10 -24
- package/dist/cjs/components/basic/doc-editor/plugins/ToolbarPlugin/index.vue.js.map +1 -1
- package/dist/cjs/components/basic/doc-editor/plugins/nodes.js +12 -7
- package/dist/cjs/components/basic/doc-editor/plugins/nodes.js.map +1 -1
- package/dist/cjs/components/basic/doc-editor/themes/doc-editor.css.js +1 -1
- package/dist/cjs/components/basic/doc-editor/themes/doc-editor.css.js.map +1 -1
- package/dist/cjs/components/basic/doc-editor/themes/doc-theme.css.js +4 -8
- package/dist/cjs/components/basic/doc-editor/themes/doc-theme.css.js.map +1 -1
- package/dist/cjs/components/data-model/data-filter-form/components/condition-date/condition-date-options.js +1 -1
- package/dist/cjs/components/data-model/data-filter-form/components/condition-date/condition-date-options.js.map +1 -1
- package/dist/cjs/modules/cms/dataviews/cms-articles/CmsArticlesTable.js +3 -3
- package/dist/cjs/modules/cms/dataviews/cms-articles/CmsArticlesTable.js.map +1 -1
- package/dist/cjs/modules/cms/pages/cms-contents/article-edit-add-page.vue2.js +2 -2
- package/dist/cjs/modules/cms/pages/cms-contents/article-edit-add-page.vue2.js.map +1 -1
- package/dist/cjs/modules/ms/dataviews/ms-material/ms-material-group/MsMaterialGroupForm.js +4 -0
- package/dist/cjs/modules/ms/dataviews/ms-material/ms-material-group/MsMaterialGroupForm.js.map +1 -1
- package/dist/cjs/modules/ms/dataviews/ms-member/MsMemberTable.js +1 -1
- package/dist/cjs/modules/ms/dataviews/ms-member/MsMemberTable.js.map +1 -1
- package/dist/esm/components/basic/doc-editor/editor.vue.js +27 -51
- package/dist/esm/components/basic/doc-editor/editor.vue.js.map +1 -1
- package/dist/esm/components/basic/doc-editor/plugins/AutoLinkPlugin.vue.js +2 -25
- package/dist/esm/components/basic/doc-editor/plugins/AutoLinkPlugin.vue.js.map +1 -1
- package/dist/esm/components/basic/doc-editor/plugins/HtmlBlockPlugin/DocHtmlBlockComponent.js +40 -60
- package/dist/esm/components/basic/doc-editor/plugins/HtmlBlockPlugin/DocHtmlBlockComponent.js.map +1 -1
- package/dist/esm/components/basic/doc-editor/plugins/HtmlBlockPlugin/HtmlBlockTools.vue.js +65 -0
- package/dist/esm/components/basic/doc-editor/plugins/HtmlBlockPlugin/HtmlBlockTools.vue.js.map +1 -0
- package/dist/esm/components/basic/doc-editor/plugins/HtmlBlockPlugin/HtmlBlockTools.vue2.js +5 -0
- package/dist/esm/components/basic/doc-editor/plugins/HtmlBlockPlugin/HtmlBlockTools.vue2.js.map +1 -0
- package/dist/esm/components/basic/doc-editor/plugins/HtmlBlockPlugin/HtmlEditDialog.js +49 -0
- package/dist/esm/components/basic/doc-editor/plugins/HtmlBlockPlugin/HtmlEditDialog.js.map +1 -0
- package/dist/esm/components/basic/doc-editor/plugins/HtmlBlockPlugin/index.js +51 -75
- package/dist/esm/components/basic/doc-editor/plugins/HtmlBlockPlugin/index.js.map +1 -1
- package/dist/esm/components/basic/doc-editor/plugins/HtmlBlockPlugin/index.vue.js +12 -22
- package/dist/esm/components/basic/doc-editor/plugins/HtmlBlockPlugin/index.vue.js.map +1 -1
- package/dist/esm/components/basic/doc-editor/plugins/ImagePlugin/DocImageComponent.js +1 -24
- package/dist/esm/components/basic/doc-editor/plugins/ImagePlugin/DocImageComponent.js.map +1 -1
- package/dist/esm/components/basic/doc-editor/plugins/ImagePlugin/ImageEditPanel.js +0 -1
- package/dist/esm/components/basic/doc-editor/plugins/ImagePlugin/ImageEditPanel.js.map +1 -1
- package/dist/esm/components/basic/doc-editor/plugins/ImagePlugin/ImageTools.vue.js +1 -22
- package/dist/esm/components/basic/doc-editor/plugins/ImagePlugin/ImageTools.vue.js.map +1 -1
- package/dist/esm/components/basic/doc-editor/plugins/ImagePlugin/index.js +4 -23
- package/dist/esm/components/basic/doc-editor/plugins/ImagePlugin/index.js.map +1 -1
- package/dist/esm/components/basic/doc-editor/plugins/ImagePlugin/index.vue.js +1 -21
- package/dist/esm/components/basic/doc-editor/plugins/ImagePlugin/index.vue.js.map +1 -1
- package/dist/esm/components/basic/doc-editor/plugins/ImageTextPlugin/index.vue.js +1 -22
- package/dist/esm/components/basic/doc-editor/plugins/ImageTextPlugin/index.vue.js.map +1 -1
- package/dist/esm/components/basic/doc-editor/{lexical-vue/components/LexicalContentEditable.vue.js → plugins/RichTextPlugin/ContentEditable.vue.js} +3 -16
- package/dist/{cjs/components/basic/doc-editor/lexical-vue/components/LexicalContentEditable.vue.js.map → esm/components/basic/doc-editor/plugins/RichTextPlugin/ContentEditable.vue.js.map} +1 -1
- package/dist/esm/components/basic/doc-editor/plugins/RichTextPlugin/ContentEditable.vue2.js +5 -0
- package/dist/esm/components/basic/doc-editor/plugins/RichTextPlugin/ContentEditable.vue2.js.map +1 -0
- package/dist/esm/components/basic/doc-editor/plugins/RichTextPlugin/DecoratedTeleports.js +14 -0
- package/dist/esm/components/basic/doc-editor/plugins/RichTextPlugin/DecoratedTeleports.js.map +1 -0
- package/dist/esm/components/basic/doc-editor/{lexical-vue/components/LexicalRichTextPlugin.vue.js → plugins/RichTextPlugin/index.vue.js} +18 -24
- package/dist/esm/components/basic/doc-editor/plugins/RichTextPlugin/index.vue.js.map +1 -0
- package/dist/esm/components/basic/doc-editor/plugins/RichTextPlugin/nodes/RichTextNode.js +153 -0
- package/dist/esm/components/basic/doc-editor/plugins/RichTextPlugin/nodes/RichTextNode.js.map +1 -0
- package/dist/esm/components/basic/doc-editor/plugins/ToolbarPlugin/ContentStyleTool.vue.js +1 -21
- package/dist/esm/components/basic/doc-editor/plugins/ToolbarPlugin/ContentStyleTool.vue.js.map +1 -1
- package/dist/esm/components/basic/doc-editor/plugins/ToolbarPlugin/FontStyleTool.vue.js +1 -22
- package/dist/esm/components/basic/doc-editor/plugins/ToolbarPlugin/FontStyleTool.vue.js.map +1 -1
- package/dist/esm/components/basic/doc-editor/plugins/ToolbarPlugin/InlineToolsPlugin.vue.js +1 -23
- package/dist/esm/components/basic/doc-editor/plugins/ToolbarPlugin/InlineToolsPlugin.vue.js.map +1 -1
- package/dist/esm/components/basic/doc-editor/plugins/ToolbarPlugin/PreviewToolbar.vue.js +15 -25
- package/dist/esm/components/basic/doc-editor/plugins/ToolbarPlugin/PreviewToolbar.vue.js.map +1 -1
- package/dist/esm/components/basic/doc-editor/plugins/ToolbarPlugin/index.vue.js +9 -23
- package/dist/esm/components/basic/doc-editor/plugins/ToolbarPlugin/index.vue.js.map +1 -1
- package/dist/esm/components/basic/doc-editor/plugins/nodes.js +13 -8
- package/dist/esm/components/basic/doc-editor/plugins/nodes.js.map +1 -1
- package/dist/esm/components/basic/doc-editor/themes/doc-editor.css.js +1 -1
- package/dist/esm/components/basic/doc-editor/themes/doc-editor.css.js.map +1 -1
- package/dist/esm/components/basic/doc-editor/themes/doc-theme.css.js +4 -8
- package/dist/esm/components/basic/doc-editor/themes/doc-theme.css.js.map +1 -1
- package/dist/esm/components/data-model/data-filter-form/components/condition-date/condition-date-options.js +1 -1
- package/dist/esm/components/data-model/data-filter-form/components/condition-date/condition-date-options.js.map +1 -1
- package/dist/esm/modules/cms/dataviews/cms-articles/CmsArticlesTable.js +3 -3
- package/dist/esm/modules/cms/dataviews/cms-articles/CmsArticlesTable.js.map +1 -1
- package/dist/esm/modules/cms/pages/cms-contents/article-edit-add-page.vue2.js +2 -2
- package/dist/esm/modules/cms/pages/cms-contents/article-edit-add-page.vue2.js.map +1 -1
- package/dist/esm/modules/ms/dataviews/ms-material/ms-material-group/MsMaterialGroupForm.js +4 -0
- package/dist/esm/modules/ms/dataviews/ms-material/ms-material-group/MsMaterialGroupForm.js.map +1 -1
- package/dist/esm/modules/ms/dataviews/ms-member/MsMemberTable.js +1 -1
- package/dist/esm/modules/ms/dataviews/ms-member/MsMemberTable.js.map +1 -1
- package/dist/types/components/basic/doc-editor/plugins/HtmlBlockPlugin/DocHtmlBlockComponent.d.ts +6 -3
- package/dist/types/components/basic/doc-editor/plugins/HtmlBlockPlugin/HtmlEditDialog.d.ts +6 -0
- package/dist/types/components/basic/doc-editor/plugins/HtmlBlockPlugin/index.d.ts +18 -19
- package/dist/types/components/basic/doc-editor/plugins/ImagePlugin/index.d.ts +2 -1
- package/dist/types/components/basic/doc-editor/{lexical-vue/components/LexicalRichTextPlugin.vue.d.ts → plugins/RichTextPlugin/index.vue.d.ts} +12 -11
- package/dist/types/components/basic/doc-editor/plugins/RichTextPlugin/nodes/RichTextNode.d.ts +12 -0
- package/dist/types/components/basic/doc-editor/plugins/ToolbarPlugin/PreviewToolbar.vue.d.ts +22 -1
- package/dist/types/components/basic/doc-editor/plugins/ToolbarPlugin/index.vue.d.ts +22 -1
- package/dist/types/components/basic/doc-editor/plugins/VideoPlugin/VideoNode.d.ts +2 -2
- package/dist/types/components/basic/doc-editor/plugins/index.d.ts +9 -0
- package/dist/types/components/basic/doc-editor/plugins/nodes.d.ts +1 -1
- package/dist/types/components/data-model/data-filter-form/components/condition-date/condition-date-options.d.ts +1 -1
- package/dist/types/components/data-model/data-filter-form/components/condition-date/condition-date.d.ts +2 -2
- package/dist/types/components/data-model/data-filter-form/components/condition-date/index.d.ts +2 -2
- package/dist/types/components/data-model/data-table/views/table/index.d.ts +1 -1
- package/dist/types/components/data-model/data-table/views/table/table.d.ts +1 -1
- package/dist/types/components/data-model/data-table/views/tree/index.d.ts +1 -1
- package/dist/types/components/data-model/data-table/views/tree/tree.d.ts +1 -1
- package/dist/types/modules/ms/components/material-list/material-item.vue.d.ts +1 -1
- package/dist/types/modules/ms/dataviews/ms-material/ms-material-group/MsMaterialGroupForm.d.ts +1 -0
- package/package.json +25 -25
- package/dist/cjs/components/basic/doc-editor/lexical-vue/components/LexicalAutoEmbedPlugin/shared.js +0 -5
- package/dist/cjs/components/basic/doc-editor/lexical-vue/components/LexicalAutoEmbedPlugin/shared.js.map +0 -1
- package/dist/cjs/components/basic/doc-editor/lexical-vue/components/LexicalAutoLinkPlugin/index.vue.js +0 -4
- package/dist/cjs/components/basic/doc-editor/lexical-vue/components/LexicalAutoLinkPlugin/index.vue.js.map +0 -1
- package/dist/cjs/components/basic/doc-editor/lexical-vue/components/LexicalAutoLinkPlugin/index.vue2.js +0 -39
- package/dist/cjs/components/basic/doc-editor/lexical-vue/components/LexicalAutoLinkPlugin/index.vue2.js.map +0 -1
- package/dist/cjs/components/basic/doc-editor/lexical-vue/components/LexicalAutoLinkPlugin/shared.js +0 -176
- package/dist/cjs/components/basic/doc-editor/lexical-vue/components/LexicalAutoLinkPlugin/shared.js.map +0 -1
- package/dist/cjs/components/basic/doc-editor/lexical-vue/components/LexicalBlockWithAlignableContents.vue.js +0 -4
- package/dist/cjs/components/basic/doc-editor/lexical-vue/components/LexicalBlockWithAlignableContents.vue.js.map +0 -1
- package/dist/cjs/components/basic/doc-editor/lexical-vue/components/LexicalBlockWithAlignableContents.vue2.js +0 -108
- package/dist/cjs/components/basic/doc-editor/lexical-vue/components/LexicalBlockWithAlignableContents.vue2.js.map +0 -1
- package/dist/cjs/components/basic/doc-editor/lexical-vue/components/LexicalComposer.vue.js +0 -74
- package/dist/cjs/components/basic/doc-editor/lexical-vue/components/LexicalComposer.vue.js.map +0 -1
- package/dist/cjs/components/basic/doc-editor/lexical-vue/components/LexicalComposer.vue2.js +0 -4
- package/dist/cjs/components/basic/doc-editor/lexical-vue/components/LexicalComposer.vue2.js.map +0 -1
- package/dist/cjs/components/basic/doc-editor/lexical-vue/components/LexicalContentEditable.vue2.js +0 -4
- package/dist/cjs/components/basic/doc-editor/lexical-vue/components/LexicalContentEditable.vue2.js.map +0 -1
- package/dist/cjs/components/basic/doc-editor/lexical-vue/components/LexicalDecoratedTeleports.js +0 -26
- package/dist/cjs/components/basic/doc-editor/lexical-vue/components/LexicalDecoratedTeleports.js.map +0 -1
- package/dist/cjs/components/basic/doc-editor/lexical-vue/components/LexicalDecoratorBlockNode.js +0 -36
- package/dist/cjs/components/basic/doc-editor/lexical-vue/components/LexicalDecoratorBlockNode.js.map +0 -1
- package/dist/cjs/components/basic/doc-editor/lexical-vue/components/LexicalHistoryPlugin.vue.js +0 -31
- package/dist/cjs/components/basic/doc-editor/lexical-vue/components/LexicalHistoryPlugin.vue.js.map +0 -1
- package/dist/cjs/components/basic/doc-editor/lexical-vue/components/LexicalHistoryPlugin.vue2.js +0 -4
- package/dist/cjs/components/basic/doc-editor/lexical-vue/components/LexicalHistoryPlugin.vue2.js.map +0 -1
- package/dist/cjs/components/basic/doc-editor/lexical-vue/components/LexicalMenu/shared.js +0 -16
- package/dist/cjs/components/basic/doc-editor/lexical-vue/components/LexicalMenu/shared.js.map +0 -1
- package/dist/cjs/components/basic/doc-editor/lexical-vue/components/LexicalRichTextPlugin.vue.js.map +0 -1
- package/dist/cjs/components/basic/doc-editor/lexical-vue/components/LexicalRichTextPlugin.vue2.js +0 -4
- package/dist/cjs/components/basic/doc-editor/lexical-vue/components/LexicalRichTextPlugin.vue2.js.map +0 -1
- package/dist/cjs/components/basic/doc-editor/lexical-vue/components/LexicalTypeaheadMenuPlugin/shared.js +0 -5
- package/dist/cjs/components/basic/doc-editor/lexical-vue/components/LexicalTypeaheadMenuPlugin/shared.js.map +0 -1
- package/dist/cjs/components/basic/doc-editor/lexical-vue/composables/inject.js +0 -5
- package/dist/cjs/components/basic/doc-editor/lexical-vue/composables/inject.js.map +0 -1
- package/dist/cjs/components/basic/doc-editor/lexical-vue/composables/useCanShowPlaceholder.js +0 -31
- package/dist/cjs/components/basic/doc-editor/lexical-vue/composables/useCanShowPlaceholder.js.map +0 -1
- package/dist/cjs/components/basic/doc-editor/lexical-vue/composables/useCollaborationContext.js +0 -29
- package/dist/cjs/components/basic/doc-editor/lexical-vue/composables/useCollaborationContext.js.map +0 -1
- package/dist/cjs/components/basic/doc-editor/lexical-vue/composables/useDecorators.js +0 -31
- package/dist/cjs/components/basic/doc-editor/lexical-vue/composables/useDecorators.js.map +0 -1
- package/dist/cjs/components/basic/doc-editor/lexical-vue/composables/useHistory.js +0 -15
- package/dist/cjs/components/basic/doc-editor/lexical-vue/composables/useHistory.js.map +0 -1
- package/dist/cjs/components/basic/doc-editor/lexical-vue/composables/useLexicalComposer.js +0 -17
- package/dist/cjs/components/basic/doc-editor/lexical-vue/composables/useLexicalComposer.js.map +0 -1
- package/dist/cjs/components/basic/doc-editor/lexical-vue/composables/useLexicalNodeSelection.js +0 -54
- package/dist/cjs/components/basic/doc-editor/lexical-vue/composables/useLexicalNodeSelection.js.map +0 -1
- package/dist/cjs/components/basic/doc-editor/lexical-vue/composables/useMounted.js +0 -14
- package/dist/cjs/components/basic/doc-editor/lexical-vue/composables/useMounted.js.map +0 -1
- package/dist/cjs/components/basic/doc-editor/lexical-vue/composables/useRichTextSetup.js +0 -16
- package/dist/cjs/components/basic/doc-editor/lexical-vue/composables/useRichTextSetup.js.map +0 -1
- package/dist/cjs/components/basic/doc-editor/plugins/index.vue.js +0 -23
- package/dist/cjs/components/basic/doc-editor/plugins/index.vue.js.map +0 -1
- package/dist/esm/components/basic/doc-editor/lexical-vue/components/LexicalAutoEmbedPlugin/shared.js +0 -4
- package/dist/esm/components/basic/doc-editor/lexical-vue/components/LexicalAutoEmbedPlugin/shared.js.map +0 -1
- package/dist/esm/components/basic/doc-editor/lexical-vue/components/LexicalAutoLinkPlugin/index.vue.js +0 -5
- package/dist/esm/components/basic/doc-editor/lexical-vue/components/LexicalAutoLinkPlugin/index.vue.js.map +0 -1
- package/dist/esm/components/basic/doc-editor/lexical-vue/components/LexicalAutoLinkPlugin/index.vue2.js +0 -40
- package/dist/esm/components/basic/doc-editor/lexical-vue/components/LexicalAutoLinkPlugin/index.vue2.js.map +0 -1
- package/dist/esm/components/basic/doc-editor/lexical-vue/components/LexicalAutoLinkPlugin/shared.js +0 -176
- package/dist/esm/components/basic/doc-editor/lexical-vue/components/LexicalAutoLinkPlugin/shared.js.map +0 -1
- package/dist/esm/components/basic/doc-editor/lexical-vue/components/LexicalBlockWithAlignableContents.vue.js +0 -5
- package/dist/esm/components/basic/doc-editor/lexical-vue/components/LexicalBlockWithAlignableContents.vue.js.map +0 -1
- package/dist/esm/components/basic/doc-editor/lexical-vue/components/LexicalBlockWithAlignableContents.vue2.js +0 -109
- package/dist/esm/components/basic/doc-editor/lexical-vue/components/LexicalBlockWithAlignableContents.vue2.js.map +0 -1
- package/dist/esm/components/basic/doc-editor/lexical-vue/components/LexicalComposer.vue.js +0 -75
- package/dist/esm/components/basic/doc-editor/lexical-vue/components/LexicalComposer.vue.js.map +0 -1
- package/dist/esm/components/basic/doc-editor/lexical-vue/components/LexicalComposer.vue2.js +0 -5
- package/dist/esm/components/basic/doc-editor/lexical-vue/components/LexicalComposer.vue2.js.map +0 -1
- package/dist/esm/components/basic/doc-editor/lexical-vue/components/LexicalContentEditable.vue2.js +0 -5
- package/dist/esm/components/basic/doc-editor/lexical-vue/components/LexicalContentEditable.vue2.js.map +0 -1
- package/dist/esm/components/basic/doc-editor/lexical-vue/components/LexicalDecoratedTeleports.js +0 -27
- package/dist/esm/components/basic/doc-editor/lexical-vue/components/LexicalDecoratedTeleports.js.map +0 -1
- package/dist/esm/components/basic/doc-editor/lexical-vue/components/LexicalDecoratorBlockNode.js +0 -36
- package/dist/esm/components/basic/doc-editor/lexical-vue/components/LexicalDecoratorBlockNode.js.map +0 -1
- package/dist/esm/components/basic/doc-editor/lexical-vue/components/LexicalHistoryPlugin.vue.js +0 -32
- package/dist/esm/components/basic/doc-editor/lexical-vue/components/LexicalHistoryPlugin.vue.js.map +0 -1
- package/dist/esm/components/basic/doc-editor/lexical-vue/components/LexicalHistoryPlugin.vue2.js +0 -5
- package/dist/esm/components/basic/doc-editor/lexical-vue/components/LexicalHistoryPlugin.vue2.js.map +0 -1
- package/dist/esm/components/basic/doc-editor/lexical-vue/components/LexicalMenu/shared.js +0 -15
- package/dist/esm/components/basic/doc-editor/lexical-vue/components/LexicalMenu/shared.js.map +0 -1
- package/dist/esm/components/basic/doc-editor/lexical-vue/components/LexicalRichTextPlugin.vue.js.map +0 -1
- package/dist/esm/components/basic/doc-editor/lexical-vue/components/LexicalRichTextPlugin.vue2.js +0 -5
- package/dist/esm/components/basic/doc-editor/lexical-vue/components/LexicalRichTextPlugin.vue2.js.map +0 -1
- package/dist/esm/components/basic/doc-editor/lexical-vue/components/LexicalTypeaheadMenuPlugin/shared.js +0 -4
- package/dist/esm/components/basic/doc-editor/lexical-vue/components/LexicalTypeaheadMenuPlugin/shared.js.map +0 -1
- package/dist/esm/components/basic/doc-editor/lexical-vue/composables/inject.js +0 -5
- package/dist/esm/components/basic/doc-editor/lexical-vue/composables/inject.js.map +0 -1
- package/dist/esm/components/basic/doc-editor/lexical-vue/composables/useCanShowPlaceholder.js +0 -31
- package/dist/esm/components/basic/doc-editor/lexical-vue/composables/useCanShowPlaceholder.js.map +0 -1
- package/dist/esm/components/basic/doc-editor/lexical-vue/composables/useCollaborationContext.js +0 -28
- package/dist/esm/components/basic/doc-editor/lexical-vue/composables/useCollaborationContext.js.map +0 -1
- package/dist/esm/components/basic/doc-editor/lexical-vue/composables/useDecorators.js +0 -31
- package/dist/esm/components/basic/doc-editor/lexical-vue/composables/useDecorators.js.map +0 -1
- package/dist/esm/components/basic/doc-editor/lexical-vue/composables/useHistory.js +0 -15
- package/dist/esm/components/basic/doc-editor/lexical-vue/composables/useHistory.js.map +0 -1
- package/dist/esm/components/basic/doc-editor/lexical-vue/composables/useLexicalComposer.js +0 -17
- package/dist/esm/components/basic/doc-editor/lexical-vue/composables/useLexicalComposer.js.map +0 -1
- package/dist/esm/components/basic/doc-editor/lexical-vue/composables/useLexicalNodeSelection.js +0 -54
- package/dist/esm/components/basic/doc-editor/lexical-vue/composables/useLexicalNodeSelection.js.map +0 -1
- package/dist/esm/components/basic/doc-editor/lexical-vue/composables/useMounted.js +0 -14
- package/dist/esm/components/basic/doc-editor/lexical-vue/composables/useMounted.js.map +0 -1
- package/dist/esm/components/basic/doc-editor/lexical-vue/composables/useRichTextSetup.js +0 -16
- package/dist/esm/components/basic/doc-editor/lexical-vue/composables/useRichTextSetup.js.map +0 -1
- package/dist/esm/components/basic/doc-editor/plugins/index.vue.js +0 -24
- package/dist/esm/components/basic/doc-editor/plugins/index.vue.js.map +0 -1
- package/dist/types/components/basic/doc-editor/lexical-vue/components/LexicalAutoEmbedPlugin/index.vue.d.ts +0 -36
- package/dist/types/components/basic/doc-editor/lexical-vue/components/LexicalAutoEmbedPlugin/shared.d.ts +0 -21
- package/dist/types/components/basic/doc-editor/lexical-vue/components/LexicalAutoFocusPlugin.vue.d.ts +0 -15
- package/dist/types/components/basic/doc-editor/lexical-vue/components/LexicalAutoLinkPlugin/index.vue.d.ts +0 -26
- package/dist/types/components/basic/doc-editor/lexical-vue/components/LexicalAutoLinkPlugin/shared.d.ts +0 -14
- package/dist/types/components/basic/doc-editor/lexical-vue/components/LexicalAutoScrollPlugin.vue.d.ts +0 -15
- package/dist/types/components/basic/doc-editor/lexical-vue/components/LexicalBlockWithAlignableContents.vue.d.ts +0 -31
- package/dist/types/components/basic/doc-editor/lexical-vue/components/LexicalCharacterLimitPlugin.vue.d.ts +0 -29
- package/dist/types/components/basic/doc-editor/lexical-vue/components/LexicalClearEditorPlugin.vue.d.ts +0 -6
- package/dist/types/components/basic/doc-editor/lexical-vue/components/LexicalClickableLinkPlugin.vue.d.ts +0 -29
- package/dist/types/components/basic/doc-editor/lexical-vue/components/LexicalCollaborationPlugin.vue.d.ts +0 -34
- package/dist/types/components/basic/doc-editor/lexical-vue/components/LexicalComposer.vue.d.ts +0 -31
- package/dist/types/components/basic/doc-editor/lexical-vue/components/LexicalContextMenuPlugin.vue.d.ts +0 -62
- package/dist/types/components/basic/doc-editor/lexical-vue/components/LexicalDecoratorBlockNode.d.ts +0 -16
- package/dist/types/components/basic/doc-editor/lexical-vue/components/LexicalHashtagPlugin.vue.d.ts +0 -2
- package/dist/types/components/basic/doc-editor/lexical-vue/components/LexicalHistoryPlugin.vue.d.ts +0 -16
- package/dist/types/components/basic/doc-editor/lexical-vue/components/LexicalLinkPlugin.vue.d.ts +0 -15
- package/dist/types/components/basic/doc-editor/lexical-vue/components/LexicalListPlugin.vue.d.ts +0 -2
- package/dist/types/components/basic/doc-editor/lexical-vue/components/LexicalMarkdownShortcutPlugin.vue.d.ts +0 -30
- package/dist/types/components/basic/doc-editor/lexical-vue/components/LexicalMenu/index.vue.d.ts +0 -55
- package/dist/types/components/basic/doc-editor/lexical-vue/components/LexicalMenu/shared.d.ts +0 -32
- package/dist/types/components/basic/doc-editor/lexical-vue/components/LexicalNodeMenuPlugin.vue.d.ts +0 -61
- package/dist/types/components/basic/doc-editor/lexical-vue/components/LexicalOnChangePlugin.vue.d.ts +0 -39
- package/dist/types/components/basic/doc-editor/lexical-vue/components/LexicalPlainTextPlugin.vue.d.ts +0 -12
- package/dist/types/components/basic/doc-editor/lexical-vue/components/LexicalTabIndentationPlugin.vue.d.ts +0 -2
- package/dist/types/components/basic/doc-editor/lexical-vue/components/LexicalTablePlugin.vue.d.ts +0 -39
- package/dist/types/components/basic/doc-editor/lexical-vue/components/LexicalTreeViewPlugin.vue.d.ts +0 -25
- package/dist/types/components/basic/doc-editor/lexical-vue/components/LexicalTypeaheadMenuPlugin/index.vue.d.ts +0 -59
- package/dist/types/components/basic/doc-editor/lexical-vue/components/LexicalTypeaheadMenuPlugin/shared.d.ts +0 -21
- package/dist/types/components/basic/doc-editor/lexical-vue/components/index.d.ts +0 -32
- package/dist/types/components/basic/doc-editor/lexical-vue/composables/index.d.ts +0 -16
- package/dist/types/components/basic/doc-editor/lexical-vue/composables/inject.d.ts +0 -1
- package/dist/types/components/basic/doc-editor/lexical-vue/composables/listenerManager.d.ts +0 -1
- package/dist/types/components/basic/doc-editor/lexical-vue/composables/useCanShowPlaceholder.d.ts +0 -2
- package/dist/types/components/basic/doc-editor/lexical-vue/composables/useCharacterLimit.d.ts +0 -9
- package/dist/types/components/basic/doc-editor/lexical-vue/composables/useCollaborationContext.d.ts +0 -1388
- package/dist/types/components/basic/doc-editor/lexical-vue/composables/useDecorators.d.ts +0 -4
- package/dist/types/components/basic/doc-editor/lexical-vue/composables/useEffect.d.ts +0 -5
- package/dist/types/components/basic/doc-editor/lexical-vue/composables/useHistory.d.ts +0 -4
- package/dist/types/components/basic/doc-editor/lexical-vue/composables/useLexicalCommandsLog.d.ts +0 -5
- package/dist/types/components/basic/doc-editor/lexical-vue/composables/useLexicalComposer.d.ts +0 -6
- package/dist/types/components/basic/doc-editor/lexical-vue/composables/useLexicalIsTextContentEmpty.d.ts +0 -2
- package/dist/types/components/basic/doc-editor/lexical-vue/composables/useLexicalNodeSelection.d.ts +0 -7
- package/dist/types/components/basic/doc-editor/lexical-vue/composables/useLexicalTextEntity.d.ts +0 -3
- package/dist/types/components/basic/doc-editor/lexical-vue/composables/useList.d.ts +0 -2
- package/dist/types/components/basic/doc-editor/lexical-vue/composables/useMounted.d.ts +0 -4
- package/dist/types/components/basic/doc-editor/lexical-vue/composables/usePlainTextSetup.d.ts +0 -2
- package/dist/types/components/basic/doc-editor/lexical-vue/composables/useReactiveEditor.d.ts +0 -2
- package/dist/types/components/basic/doc-editor/lexical-vue/composables/useRichTextSetup.d.ts +0 -2
- package/dist/types/components/basic/doc-editor/lexical-vue/composables/useTableOfContents.d.ts +0 -8
- package/dist/types/components/basic/doc-editor/lexical-vue/composables/useYjsCollaboration.d.ts +0 -8
- package/dist/types/components/basic/doc-editor/lexical-vue/index.d.ts +0 -2
- package/dist/types/components/basic/doc-editor/lexical-vue/types.d.ts +0 -2
- package/dist/types/components/basic/doc-editor/plugins/ToolbarPlugin/PreviewToolba-back.vue.d.ts +0 -2
- package/dist/types/components/basic/doc-editor/plugins/index.vue.d.ts +0 -2
- /package/dist/cjs/components/basic/doc-editor/plugins/{index.vue2.js → RichTextPlugin/index.vue2.js} +0 -0
- /package/dist/cjs/components/basic/doc-editor/plugins/{index.vue2.js.map → RichTextPlugin/index.vue2.js.map} +0 -0
- /package/dist/esm/components/basic/doc-editor/plugins/{index.vue2.js → RichTextPlugin/index.vue2.js} +0 -0
- /package/dist/esm/components/basic/doc-editor/plugins/{index.vue2.js.map → RichTextPlugin/index.vue2.js.map} +0 -0
- /package/dist/types/components/basic/doc-editor/{lexical-vue/components/LexicalCheckListPlugin.vue.d.ts → plugins/HtmlBlockPlugin/HtmlBlockTools.vue.d.ts} +0 -0
- /package/dist/types/components/basic/doc-editor/{lexical-vue/components/LexicalContentEditable.vue.d.ts → plugins/RichTextPlugin/ContentEditable.vue.d.ts} +0 -0
- /package/dist/types/components/basic/doc-editor/{lexical-vue/components/LexicalDecoratedTeleports.d.ts → plugins/RichTextPlugin/DecoratedTeleports.d.ts} +0 -0
|
@@ -1,42 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const vue = require("vue");
|
|
3
|
-
require("
|
|
4
|
-
require("
|
|
5
|
-
require("
|
|
6
|
-
require("
|
|
7
|
-
require("
|
|
8
|
-
require("
|
|
9
|
-
require("@lexical/list");
|
|
10
|
-
require("@lexical/dragon");
|
|
11
|
-
require("@lexical/plain-text");
|
|
12
|
-
require("@lexical/rich-text");
|
|
13
|
-
require("@lexical/yjs");
|
|
14
|
-
require("yjs");
|
|
15
|
-
require("./lexical-vue/components/LexicalDecoratedTeleports.js");
|
|
16
|
-
const LexicalContentEditable_vue_vue_type_script_setup_true_lang = require("./lexical-vue/components/LexicalContentEditable.vue.js");
|
|
17
|
-
const LexicalComposer_vue_vue_type_script_setup_true_lang = require("./lexical-vue/components/LexicalComposer.vue.js");
|
|
18
|
-
const LexicalHistoryPlugin_vue_vue_type_script_setup_true_lang = require("./lexical-vue/components/LexicalHistoryPlugin.vue.js");
|
|
19
|
-
require("@lexical/html");
|
|
20
|
-
require("@lexical/link");
|
|
21
|
-
require("@lexical/mark");
|
|
22
|
-
require("@lexical/table");
|
|
23
|
-
const LexicalRichTextPlugin_vue_vue_type_script_setup_true_lang = require("./lexical-vue/components/LexicalRichTextPlugin.vue.js");
|
|
24
|
-
require("@lexical/hashtag");
|
|
25
|
-
require("@lexical/markdown");
|
|
26
|
-
require("./lexical-vue/composables/useCollaborationContext.js");
|
|
27
|
-
require("./lexical-vue/components/LexicalMenu/shared.js");
|
|
28
|
-
require("./lexical-vue/components/LexicalAutoEmbedPlugin/shared.js");
|
|
29
|
-
require("./lexical-vue/components/LexicalTypeaheadMenuPlugin/shared.js");
|
|
3
|
+
const lexicalVue = require("lexical-vue");
|
|
4
|
+
const AutoLinkPlugin_vue_vue_type_script_setup_true_lang = require("./plugins/AutoLinkPlugin.vue.js");
|
|
5
|
+
const index_vue_vue_type_script_setup_true_lang$2 = require("./plugins/ImagePlugin/index.vue.js");
|
|
6
|
+
const index_vue_vue_type_script_setup_true_lang$3 = require("./plugins/ImageTextPlugin/index.vue.js");
|
|
7
|
+
const InlineToolsPlugin_vue_vue_type_script_setup_true_lang = require("./plugins/ToolbarPlugin/InlineToolsPlugin.vue.js");
|
|
8
|
+
const index_vue_vue_type_script_setup_true_lang$4 = require("./plugins/HtmlBlockPlugin/index.vue.js");
|
|
30
9
|
const index_vue_vue_type_script_setup_true_lang = require("./plugins/ToolbarPlugin/index.vue.js");
|
|
10
|
+
const index_vue_vue_type_script_setup_true_lang$1 = require("./plugins/RichTextPlugin/index.vue.js");
|
|
11
|
+
const nodes = require("./plugins/nodes.js");
|
|
31
12
|
const commands = require("./plugins/commands.js");
|
|
32
|
-
const index_vue_vue_type_script_setup_true_lang$1 = require("./plugins/index.vue.js");
|
|
33
13
|
const DocTheme = require("./themes/DocTheme.js");
|
|
34
|
-
const nodes = require("./plugins/nodes.js");
|
|
35
14
|
const docEditor = require("./themes/doc-editor.css.js");
|
|
36
15
|
const docTheme = require("./themes/doc-theme.css.js");
|
|
37
16
|
const _hoisted_1 = { class: "mk-doc-editor__stage_warp" };
|
|
38
17
|
const _hoisted_2 = { class: "mk-doc-editor__stage_body" };
|
|
39
|
-
const _hoisted_3 = { class: "mk-doc-editor__stage__placeholder mk-doc__paragraph" };
|
|
40
18
|
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
41
19
|
...{ name: "MKDocEditor" },
|
|
42
20
|
__name: "editor",
|
|
@@ -78,7 +56,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
78
56
|
emit("change", content);
|
|
79
57
|
updateStage();
|
|
80
58
|
};
|
|
81
|
-
const
|
|
59
|
+
const editorInitHandler = (editor) => {
|
|
82
60
|
editor.registerCommand(commands.DEVICE_VIEW_MODE, (payload) => {
|
|
83
61
|
viewDevice.value = payload;
|
|
84
62
|
return false;
|
|
@@ -112,15 +90,15 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
112
90
|
}, { immediate: true });
|
|
113
91
|
});
|
|
114
92
|
return (_ctx, _cache) => {
|
|
115
|
-
return vue.openBlock(), vue.createBlock(vue.unref(
|
|
116
|
-
"initial-config": config,
|
|
117
|
-
onInit: lexicalInitHandler
|
|
118
|
-
}, {
|
|
93
|
+
return vue.openBlock(), vue.createBlock(vue.unref(lexicalVue.LexicalComposer), { "initial-config": config }, {
|
|
119
94
|
default: vue.withCtx(() => [
|
|
120
95
|
vue.createElementVNode("div", {
|
|
121
96
|
class: vue.normalizeClass(["mk-doc-editor", viewDevice.value])
|
|
122
97
|
}, [
|
|
123
|
-
vue.createVNode(index_vue_vue_type_script_setup_true_lang),
|
|
98
|
+
vue.createVNode(vue.unref(index_vue_vue_type_script_setup_true_lang), {
|
|
99
|
+
js: __props.js,
|
|
100
|
+
css: __props.css
|
|
101
|
+
}, null, 8, ["js", "css"]),
|
|
124
102
|
vue.createElementVNode("div", _hoisted_1, [
|
|
125
103
|
vue.renderSlot(_ctx.$slots, "before-extentions"),
|
|
126
104
|
vue.createElementVNode("div", _hoisted_2, [
|
|
@@ -135,26 +113,24 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
135
113
|
key: 0,
|
|
136
114
|
to: iframeBody.value
|
|
137
115
|
}, [
|
|
138
|
-
vue.createVNode(vue.unref(
|
|
116
|
+
vue.createVNode(vue.unref(index_vue_vue_type_script_setup_true_lang$1), {
|
|
117
|
+
onInit: editorInitHandler,
|
|
139
118
|
content: props.content,
|
|
140
|
-
onChange: contentChangeHandle
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
vue.createVNode(vue.unref(LexicalContentEditable_vue_vue_type_script_setup_true_lang))
|
|
144
|
-
]),
|
|
145
|
-
placeholder: vue.withCtx(() => [
|
|
146
|
-
vue.createElementVNode("div", _hoisted_3, vue.toDisplayString(props.placeholder), 1)
|
|
147
|
-
]),
|
|
148
|
-
_: 1
|
|
149
|
-
}, 8, ["content"])
|
|
119
|
+
onChange: contentChangeHandle,
|
|
120
|
+
placeholder: __props.placeholder
|
|
121
|
+
}, null, 8, ["content", "placeholder"])
|
|
150
122
|
], 8, ["to"])) : vue.createCommentVNode("", true),
|
|
151
123
|
vue.renderSlot(_ctx.$slots, "footer"),
|
|
152
|
-
vue.createVNode(
|
|
124
|
+
vue.createVNode(vue.unref(InlineToolsPlugin_vue_vue_type_script_setup_true_lang)),
|
|
125
|
+
vue.createVNode(vue.unref(AutoLinkPlugin_vue_vue_type_script_setup_true_lang)),
|
|
126
|
+
vue.createVNode(vue.unref(index_vue_vue_type_script_setup_true_lang$2)),
|
|
127
|
+
vue.createVNode(vue.unref(index_vue_vue_type_script_setup_true_lang$3)),
|
|
128
|
+
vue.createVNode(vue.unref(index_vue_vue_type_script_setup_true_lang$4))
|
|
153
129
|
]),
|
|
154
130
|
vue.renderSlot(_ctx.$slots, "after-extentions")
|
|
155
131
|
])
|
|
156
132
|
], 2),
|
|
157
|
-
vue.createVNode(vue.unref(
|
|
133
|
+
vue.createVNode(vue.unref(lexicalVue.LexicalHistoryPlugin))
|
|
158
134
|
]),
|
|
159
135
|
_: 3
|
|
160
136
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editor.vue.js","sources":["../../../../../src/components/basic/doc-editor/editor.vue"],"sourcesContent":["<template>\r\n <LexicalComposer :initial-config=\"config\"
|
|
1
|
+
{"version":3,"file":"editor.vue.js","sources":["../../../../../src/components/basic/doc-editor/editor.vue"],"sourcesContent":["<template>\r\n <LexicalComposer :initial-config=\"config\">\r\n <div class=\"mk-doc-editor\" :class=\"viewDevice\">\r\n <ToolbarPlugin :js=\"js\" :css=\"css\" />\r\n <div class=\"mk-doc-editor__stage_warp\">\r\n <slot name=\"before-extentions\"></slot>\r\n <div class=\"mk-doc-editor__stage_body\">\r\n <slot name=\"header\"></slot>\r\n <iframe title=\"iframe\" class=\"mk-doc-editor__stage_iframe\" ref=\"iframeContentRef\"></iframe>\r\n <Teleport v-if=\"iframeBody\" :to=\"iframeBody\">\r\n <RichTextPlugin @init=\"editorInitHandler\" :content=\"props.content\" @change=\"contentChangeHandle\" :placeholder=\"placeholder\">\r\n </RichTextPlugin>\r\n </Teleport>\r\n <slot name=\"footer\"></slot>\r\n <InlineToolsPlugin />\r\n <AutoLinkPlugin />\r\n <ImagePlugin />\r\n <ImageTextPlugin />\r\n <HtmlBlockPlugin />\r\n </div>\r\n <slot name=\"after-extentions\"></slot>\r\n </div>\r\n \r\n </div>\r\n <LexicalHistoryPlugin />\r\n </LexicalComposer>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { defineOptions,defineProps,defineEmits,computed,ref,onMounted,watch } from \"vue\"\r\nimport { type LexicalEditor } from 'lexical'\r\nimport { LexicalComposer, LexicalHistoryPlugin } from 'lexical-vue'\r\nimport { \r\n ToolbarPlugin,\r\n RichTextPlugin,\r\n AutoLinkPlugin,\r\n ImagePlugin,\r\n ImageTextPlugin,\r\n InlineToolsPlugin,\r\n HtmlBlockPlugin,\r\n \r\n} from \"./plugins\"\r\nimport { DEVICE_VIEW_MODE } from \"./plugins/commands\"\r\n\r\nimport DocTheme from \"./themes/DocTheme\";\r\nimport DocNodes from \"./plugins/nodes\"\r\nimport DocEditorCss from \"./themes/doc-editor.css?raw\";\r\nimport DocThemeCss from \"./themes/doc-theme.css?raw\";\r\n\r\n// 定义组件\r\ndefineOptions({ name: \"MKDocEditor\" })\r\n\r\n// 事件\r\nconst emit = defineEmits(['change']);\r\n\r\n// 参数\r\nconst props = defineProps({\r\n placeholder:{type:String,default:\"这里输入正文...\"},\r\n content:{ type:String,default:`` },\r\n js:{ type:String,default:`` },\r\n css:{ type:String,default:`` }\r\n})\r\n\r\n// pc | mobile\r\nconst viewDevice = ref('pc')\r\n\r\n// 配置\r\nconst config = {\r\n namespace: 'MyEditor',\r\n theme: DocTheme,\r\n nodes: [\r\n ...DocNodes,\r\n ],\r\n onError(error:Error) {\r\n // Catch any errors that occur during Lexical updates and log them\r\n // or throw them as needed. If you don't throw them, Lexical will\r\n // try to recover gracefully without losing user data.\r\n console.error(error)\r\n },\r\n}\r\n\r\n// iframe 编辑器\r\nconst iframeContentRef = ref(null as any);\r\nconst iframeBody = computed(()=>iframeContentRef.value?.contentWindow?.document?.body)\r\n\r\n//内容改变时\r\nconst updateStage = ()=>{\r\n setTimeout(() => {\r\n if(iframeBody.value?.scrollHeight > iframeBody.value?.offsetHeight){\r\n iframeContentRef.value.style.height = (iframeBody.value?.scrollHeight + 10)+\"px\";\r\n }\r\n }, 10);\r\n}\r\nconst contentChangeHandle = (content:any)=>{\r\n emit('change',content);\r\n updateStage();\r\n}\r\n\r\n// 初始化\r\nconst editorInitHandler = (editor:LexicalEditor)=>{\r\n editor.registerCommand(DEVICE_VIEW_MODE,(payload: string) => {\r\n viewDevice.value = payload;\r\n return false\r\n },1)\r\n}\r\n\r\nonMounted(()=>{\r\n\r\n const doc = iframeContentRef.value?.contentWindow?.document;\r\n // 编辑器外观\r\n const editorStyle = document.createElement(\"style\");\r\n editorStyle.innerHTML = DocEditorCss;\r\n doc.head.append(editorStyle);\r\n\r\n // 皮肤样式\r\n const docThemeStyle = document.createElement(\"style\");\r\n docThemeStyle.innerHTML = DocThemeCss;\r\n doc.head.append(docThemeStyle);\r\n\r\n // 扩展的js和css\r\n props.js.split(\",\").forEach(path=>{\r\n const script = document.createElement(\"script\");\r\n script.src = path;\r\n script.setAttribute(\"crossorigin\",\"true\")\r\n doc.head.append(script);\r\n })\r\n props.css.split(\",\").forEach(path=>{\r\n const link = document.createElement(\"link\");\r\n link.href = path;\r\n link.setAttribute(\"crossorigin\",\"true\")\r\n doc.head.append(link);\r\n })\r\n\r\n watch(viewDevice,(payload: string) => {\r\n doc.body.style.fontSize = payload == \"pc\" ? \"14px\" : \"18px\";\r\n updateStage();\r\n return false\r\n },{ immediate :true})\r\n});\r\n\r\n</script>\r\n"],"names":["ref","DocNodes","computed","DEVICE_VIEW_MODE","onMounted","DocEditorCss","DocThemeCss","watch"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqDA,UAAM,OAAO;AAGb,UAAM,QAAQ;AAQR,UAAA,aAAaA,QAAI,IAAI;AAG3B,UAAM,SAAS;AAAA,MACb,WAAW;AAAA,MACX,OAAO;AAAA,MACP,OAAO;AAAA,QACL,GAAGC;AAAAA,MACL;AAAA,MACA,QAAQ,OAAa;AAInB,gBAAQ,MAAM,KAAK;AAAA,MACrB;AAAA,IAAA;AAII,UAAA,mBAAmBD,QAAI,IAAW;AACxC,UAAM,aAAaE,IAAS,SAAA;;AAAI,gDAAiB,UAAjB,mBAAwB,kBAAxB,mBAAuC,aAAvC,mBAAiD;AAAA,KAAI;AAGrF,UAAM,cAAc,MAAI;AACtB,iBAAW,MAAM;;AACf,cAAG,gBAAW,UAAX,mBAAkB,kBAAe,gBAAW,UAAX,mBAAkB,eAAa;AACjE,2BAAiB,MAAM,MAAM,WAAU,gBAAW,UAAX,mBAAkB,gBAAe,KAAI;AAAA,QAC9E;AAAA,SACC,EAAE;AAAA,IAAA;AAED,UAAA,sBAAsB,CAAC,YAAc;AACzC,WAAK,UAAS,OAAO;AACT;IAAA;AAIR,UAAA,oBAAoB,CAAC,WAAuB;AACzC,aAAA,gBAAgBC,2BAAiB,CAAC,YAAoB;AAC3D,mBAAW,QAAQ;AACZ,eAAA;AAAA,SACP,CAAC;AAAA,IAAA;AAGLC,QAAAA,UAAU,MAAI;;AAEN,YAAA,OAAM,4BAAiB,UAAjB,mBAAwB,kBAAxB,mBAAuC;AAE7C,YAAA,cAAc,SAAS,cAAc,OAAO;AAClD,kBAAY,YAAYC;AACpB,UAAA,KAAK,OAAO,WAAW;AAGrB,YAAA,gBAAgB,SAAS,cAAc,OAAO;AACpD,oBAAc,YAAYC;AACtB,UAAA,KAAK,OAAO,aAAa;AAG7B,YAAM,GAAG,MAAM,GAAG,EAAE,QAAQ,CAAM,SAAA;AAC1B,cAAA,SAAS,SAAS,cAAc,QAAQ;AAC9C,eAAO,MAAM;AACN,eAAA,aAAa,eAAc,MAAM;AACpC,YAAA,KAAK,OAAO,MAAM;AAAA,MAAA,CACvB;AACD,YAAM,IAAI,MAAM,GAAG,EAAE,QAAQ,CAAM,SAAA;AAC3B,cAAA,OAAO,SAAS,cAAc,MAAM;AAC1C,aAAK,OAAO;AACP,aAAA,aAAa,eAAc,MAAM;AAClC,YAAA,KAAK,OAAO,IAAI;AAAA,MAAA,CACrB;AAEKC,gBAAA,YAAW,CAAC,YAAoB;AACpC,YAAI,KAAK,MAAM,WAAW,WAAW,OAAO,SAAS;AACzC;AACL,eAAA;AAAA,MAAA,GACP,EAAE,WAAW,KAAA,CAAK;AAAA,IAAA,CACrB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,29 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const vue = require("vue");
|
|
3
|
-
require("
|
|
4
|
-
require("@lexical/utils");
|
|
5
|
-
require("@lexical/overflow");
|
|
6
|
-
require("lexical");
|
|
7
|
-
require("tiny-invariant");
|
|
8
|
-
require("@lexical/history");
|
|
9
|
-
require("@lexical/list");
|
|
10
|
-
require("@lexical/dragon");
|
|
11
|
-
require("@lexical/plain-text");
|
|
12
|
-
require("@lexical/rich-text");
|
|
13
|
-
require("@lexical/yjs");
|
|
14
|
-
require("yjs");
|
|
15
|
-
require("../lexical-vue/components/LexicalDecoratedTeleports.js");
|
|
16
|
-
require("@lexical/html");
|
|
17
|
-
require("@lexical/link");
|
|
18
|
-
require("@lexical/mark");
|
|
19
|
-
require("@lexical/table");
|
|
20
|
-
require("@lexical/hashtag");
|
|
21
|
-
require("@lexical/markdown");
|
|
22
|
-
require("../lexical-vue/composables/useCollaborationContext.js");
|
|
23
|
-
require("../lexical-vue/components/LexicalMenu/shared.js");
|
|
24
|
-
require("../lexical-vue/components/LexicalAutoEmbedPlugin/shared.js");
|
|
25
|
-
const index_vue_vue_type_script_setup_true_lang = require("../lexical-vue/components/LexicalAutoLinkPlugin/index.vue2.js");
|
|
26
|
-
require("../lexical-vue/components/LexicalTypeaheadMenuPlugin/shared.js");
|
|
3
|
+
const lexicalVue = require("lexical-vue");
|
|
27
4
|
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
28
5
|
__name: "AutoLinkPlugin",
|
|
29
6
|
setup(__props) {
|
|
@@ -50,7 +27,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
50
27
|
}
|
|
51
28
|
];
|
|
52
29
|
return (_ctx, _cache) => {
|
|
53
|
-
return vue.openBlock(), vue.createBlock(vue.unref(
|
|
30
|
+
return vue.openBlock(), vue.createBlock(vue.unref(lexicalVue.LexicalAutoLinkPlugin), { matchers: MATCHERS });
|
|
54
31
|
};
|
|
55
32
|
}
|
|
56
33
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AutoLinkPlugin.vue.js","sources":["../../../../../../src/components/basic/doc-editor/plugins/AutoLinkPlugin.vue"],"sourcesContent":["<script setup lang=\"ts\">\r\nimport { LexicalAutoLinkPlugin } from '
|
|
1
|
+
{"version":3,"file":"AutoLinkPlugin.vue.js","sources":["../../../../../../src/components/basic/doc-editor/plugins/AutoLinkPlugin.vue"],"sourcesContent":["<script setup lang=\"ts\">\r\nimport { LexicalAutoLinkPlugin } from 'lexical-vue'\r\n\r\nconst URL_MATCHER = /((https?:\\/\\/(www\\.)?)|(www\\.))[-a-zA-Z0-9@:%._+~#=]{1,256}\\.[a-zA-Z0-9()]{1,6}\\b([-a-zA-Z0-9()@:%_+.~#?&//=]*)/\r\n\r\nconst EMAIL_MATCHER = /(([^<>()[\\]\\\\.,;:\\s@\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))/\r\n\r\nconst MATCHERS = [\r\n (text: string) => {\r\n const match = URL_MATCHER.exec(text)\r\n return (\r\n match && {\r\n index: match.index,\r\n length: match[0].length,\r\n text: match[0],\r\n url: match[0],\r\n }\r\n )\r\n },\r\n (text: string) => {\r\n const match = EMAIL_MATCHER.exec(text)\r\n return (\r\n match && {\r\n index: match.index,\r\n length: match[0].length,\r\n text: match[0],\r\n url: `mailto:${match[0]}`,\r\n }\r\n )\r\n },\r\n]\r\n</script>\r\n\r\n<template>\r\n <LexicalAutoLinkPlugin :matchers=\"MATCHERS\" />\r\n</template>\r\n"],"names":[],"mappings":";;;;;;AAGA,UAAM,cAAc;AAEpB,UAAM,gBAAgB;AAEtB,UAAM,WAAW;AAAA,MACf,CAAC,SAAiB;AACV,cAAA,QAAQ,YAAY,KAAK,IAAI;AACnC,eACE,SAAS;AAAA,UACP,OAAO,MAAM;AAAA,UACb,QAAQ,MAAM,CAAC,EAAE;AAAA,UACjB,MAAM,MAAM,CAAC;AAAA,UACb,KAAK,MAAM,CAAC;AAAA,QAAA;AAAA,MAGlB;AAAA,MACA,CAAC,SAAiB;AACV,cAAA,QAAQ,cAAc,KAAK,IAAI;AACrC,eACE,SAAS;AAAA,UACP,OAAO,MAAM;AAAA,UACb,QAAQ,MAAM,CAAC,EAAE;AAAA,UACjB,MAAM,MAAM,CAAC;AAAA,UACb,KAAK,UAAU,MAAM,CAAC,CAAC;AAAA,QAAA;AAAA,MAG7B;AAAA,IAAA;;;;;;;"}
|
package/dist/cjs/components/basic/doc-editor/plugins/HtmlBlockPlugin/DocHtmlBlockComponent.js
CHANGED
|
@@ -2,90 +2,70 @@
|
|
|
2
2
|
const vue = require("vue");
|
|
3
3
|
const lexical = require("lexical");
|
|
4
4
|
const utils = require("@lexical/utils");
|
|
5
|
-
require("
|
|
6
|
-
const
|
|
7
|
-
require("
|
|
8
|
-
require("
|
|
9
|
-
require("@lexical/history");
|
|
10
|
-
const useLexicalComposer = require("../../lexical-vue/composables/useLexicalComposer.js");
|
|
11
|
-
const useLexicalNodeSelection = require("../../lexical-vue/composables/useLexicalNodeSelection.js");
|
|
12
|
-
require("@lexical/list");
|
|
13
|
-
require("@lexical/dragon");
|
|
14
|
-
require("@lexical/plain-text");
|
|
15
|
-
require("@lexical/rich-text");
|
|
16
|
-
require("@lexical/yjs");
|
|
17
|
-
require("yjs");
|
|
18
|
-
require("../../lexical-vue/components/LexicalDecoratedTeleports.js");
|
|
19
|
-
require("@lexical/html");
|
|
20
|
-
require("@lexical/link");
|
|
21
|
-
require("@lexical/mark");
|
|
22
|
-
require("@lexical/table");
|
|
23
|
-
require("@lexical/hashtag");
|
|
24
|
-
const LexicalBlockWithAlignableContents_vue_vue_type_script_setup_true_lang = require("../../lexical-vue/components/LexicalBlockWithAlignableContents.vue2.js");
|
|
25
|
-
require("@lexical/markdown");
|
|
26
|
-
require("../../lexical-vue/composables/useCollaborationContext.js");
|
|
27
|
-
require("../../lexical-vue/components/LexicalMenu/shared.js");
|
|
28
|
-
require("../../lexical-vue/components/LexicalAutoEmbedPlugin/shared.js");
|
|
29
|
-
require("../../lexical-vue/components/LexicalTypeaheadMenuPlugin/shared.js");
|
|
5
|
+
const lexicalVue = require("lexical-vue");
|
|
6
|
+
const index = require("./index.js");
|
|
7
|
+
const commands = require("../commands.js");
|
|
8
|
+
const HtmlBlockTools_vue_vue_type_script_setup_true_lang = require("./HtmlBlockTools.vue.js");
|
|
30
9
|
const DocHtmlBlockComponent = /* @__PURE__ */ vue.defineComponent({
|
|
31
10
|
name: "DocHtmlBlockComponent",
|
|
32
|
-
props: ["baseClass", "focusClass", "nodeKey", "
|
|
11
|
+
props: ["baseClass", "focusClass", "class", "nodeKey", "html"],
|
|
33
12
|
setup(props) {
|
|
34
|
-
const editor =
|
|
13
|
+
const editor = lexicalVue.useLexicalComposer();
|
|
35
14
|
const {
|
|
36
15
|
isSelected,
|
|
37
16
|
setSelected,
|
|
38
17
|
clearSelection
|
|
39
|
-
} =
|
|
18
|
+
} = lexicalVue.useLexicalNodeSelection(props.nodeKey);
|
|
40
19
|
const selfElRef = vue.ref(null);
|
|
41
|
-
|
|
20
|
+
const htmlContent = vue.ref(props.html);
|
|
21
|
+
lexicalVue.useMounted(() => {
|
|
42
22
|
return utils.mergeRegister(
|
|
43
|
-
//
|
|
23
|
+
// 选中
|
|
44
24
|
editor.registerCommand(lexical.CLICK_COMMAND, (event) => {
|
|
45
|
-
console.log(event.target);
|
|
46
25
|
if (event.target === selfElRef.value) {
|
|
47
26
|
event.preventDefault();
|
|
48
27
|
if (!event.shiftKey) {
|
|
49
28
|
clearSelection();
|
|
50
29
|
}
|
|
51
30
|
setSelected(true);
|
|
31
|
+
editor.dispatchCommand(commands.SELECTED_COMPONENT_COMMAND, {
|
|
32
|
+
el: selfElRef.value,
|
|
33
|
+
component: HtmlBlockTools_vue_vue_type_script_setup_true_lang
|
|
34
|
+
});
|
|
52
35
|
return true;
|
|
53
36
|
}
|
|
37
|
+
editor.dispatchCommand(commands.SELECTED_COMPONENT_COMMAND, null);
|
|
38
|
+
return false;
|
|
39
|
+
}, lexical.COMMAND_PRIORITY_LOW),
|
|
40
|
+
// 删除
|
|
41
|
+
editor.registerCommand(index.REMOVE_HTML_BLOCK_COMMAND, () => {
|
|
42
|
+
const selection = lexical.$getSelection();
|
|
43
|
+
if (lexical.$isNodeSelection(selection)) {
|
|
44
|
+
selection.getNodes().forEach((node) => node.remove());
|
|
45
|
+
editor.dispatchCommand(commands.SELECTED_COMPONENT_COMMAND, null);
|
|
46
|
+
}
|
|
47
|
+
return false;
|
|
48
|
+
}, lexical.COMMAND_PRIORITY_LOW),
|
|
49
|
+
// 修改
|
|
50
|
+
editor.registerCommand(index.HTML_BLOCK_CHANGE, (payload) => {
|
|
51
|
+
const selection = lexical.$getSelection();
|
|
52
|
+
if (lexical.$isNodeSelection(selection)) {
|
|
53
|
+
const node = selection.getNodes()[0];
|
|
54
|
+
if (node.getKey() == props.nodeKey) {
|
|
55
|
+
htmlContent.value = payload;
|
|
56
|
+
node.setHtml(payload);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
54
59
|
return false;
|
|
55
60
|
}, lexical.COMMAND_PRIORITY_LOW)
|
|
56
61
|
);
|
|
57
62
|
});
|
|
58
63
|
return () => {
|
|
59
|
-
return vue.createVNode(
|
|
60
|
-
"
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
"srcdoc": `
|
|
65
|
-
<html>
|
|
66
|
-
<head>
|
|
67
|
-
<style type="text/css">
|
|
68
|
-
${props.attrs.css}
|
|
69
|
-
</style>
|
|
70
|
-
<script>
|
|
71
|
-
${props.attrs.js}
|
|
72
|
-
<\/script>
|
|
73
|
-
</head>
|
|
74
|
-
<body>${props.attrs.content}</body>
|
|
75
|
-
</html>
|
|
76
|
-
`,
|
|
77
|
-
"style": {
|
|
78
|
-
width: "100%",
|
|
79
|
-
padding: 0,
|
|
80
|
-
margin: 0
|
|
81
|
-
}
|
|
82
|
-
}, {
|
|
83
|
-
frameborder: 0,
|
|
84
|
-
allowFullScreen: true
|
|
85
|
-
}, {
|
|
86
|
-
"allow": "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
|
|
87
|
-
}), null)]
|
|
88
|
-
});
|
|
64
|
+
return vue.createVNode("div", {
|
|
65
|
+
"class": `${props.baseClass} ${props.class} ${isSelected.value ? props.focusClass : ""}`,
|
|
66
|
+
"ref": (el) => selfElRef.value = el,
|
|
67
|
+
"innerHTML": htmlContent.value
|
|
68
|
+
}, null);
|
|
89
69
|
};
|
|
90
70
|
}
|
|
91
71
|
});
|
package/dist/cjs/components/basic/doc-editor/plugins/HtmlBlockPlugin/DocHtmlBlockComponent.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DocHtmlBlockComponent.js","sources":["../../../../../../../src/components/basic/doc-editor/plugins/HtmlBlockPlugin/DocHtmlBlockComponent.tsx"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"DocHtmlBlockComponent.js","sources":["../../../../../../../src/components/basic/doc-editor/plugins/HtmlBlockPlugin/DocHtmlBlockComponent.tsx"],"sourcesContent":["import {\r\n $getSelection,\r\n $isNodeSelection,\r\n CLICK_COMMAND,\r\n COMMAND_PRIORITY_LOW,\r\n} from \"lexical\";\r\nimport { mergeRegister } from \"@lexical/utils\";\r\nimport {\r\n useLexicalComposer,\r\n useLexicalNodeSelection,\r\n useMounted,\r\n} from \"lexical-vue\";\r\nimport { defineComponent, ref } from \"vue\";\r\nimport { REMOVE_HTML_BLOCK_COMMAND,HTML_BLOCK_CHANGE, HtmlBlockNode } from './index'\r\nimport { SELECTED_COMPONENT_COMMAND,ComponentSelectEvent } from \"../commands\"\r\nimport HtmlBlockTools from \"./HtmlBlockTools.vue\";\r\n\r\n/**\r\n * 图片渲染组件\r\n */\r\nexport default defineComponent({\r\n name: \"DocHtmlBlockComponent\",\r\n props: [\"baseClass\", \"focusClass\", \"class\",\"nodeKey\", \"html\"],\r\n setup(props) {\r\n const editor = useLexicalComposer();\r\n const { isSelected, setSelected, clearSelection } = useLexicalNodeSelection(props.nodeKey);\r\n\r\n const selfElRef = ref<any>(null);\r\n const htmlContent = ref(props.html);\r\n\r\n // 编辑器挂载的时候\r\n useMounted(() => {\r\n return mergeRegister(\r\n // 选中\r\n editor.registerCommand<MouseEvent>(CLICK_COMMAND,(event) => {\r\n if (event.target === selfElRef.value) {\r\n\r\n event.preventDefault();\r\n\r\n if (!event.shiftKey) { clearSelection(); }\r\n\r\n setSelected(true);\r\n\r\n // 选中后显示工具条\r\n editor.dispatchCommand(SELECTED_COMPONENT_COMMAND,{ \r\n el:selfElRef.value,\r\n component:HtmlBlockTools\r\n } as ComponentSelectEvent);\r\n\r\n return true;\r\n }\r\n // 没选中\r\n editor.dispatchCommand(SELECTED_COMPONENT_COMMAND,null);\r\n return false;\r\n }, COMMAND_PRIORITY_LOW),\r\n // 删除\r\n editor.registerCommand(REMOVE_HTML_BLOCK_COMMAND, () => {\r\n \r\n const selection = $getSelection();\r\n \r\n if($isNodeSelection(selection)){\r\n\r\n selection.getNodes().forEach(node=>node.remove());\r\n // 没选中\r\n editor.dispatchCommand(SELECTED_COMPONENT_COMMAND,null);\r\n }\r\n return false;\r\n },COMMAND_PRIORITY_LOW),\r\n // 修改\r\n editor.registerCommand(HTML_BLOCK_CHANGE,(payload:string) => {\r\n\r\n const selection = $getSelection();\r\n\r\n if($isNodeSelection(selection)){\r\n \r\n const node = selection.getNodes()[0] as HtmlBlockNode;\r\n\r\n if(node.getKey() == props.nodeKey){\r\n htmlContent.value = payload;\r\n node.setHtml(payload)\r\n }\r\n \r\n }\r\n \r\n return false\r\n },COMMAND_PRIORITY_LOW),\r\n );\r\n });\r\n\r\n return () => {\r\n return <div class={`${props.baseClass} ${props.class} ${isSelected.value ? props.focusClass : ''}`} \r\n ref={el=>selfElRef.value=el} v-html={htmlContent.value}>\r\n </div>\r\n };\r\n },\r\n});\r\n"],"names":["defineComponent","name","props","setup","editor","useLexicalComposer","isSelected","setSelected","clearSelection","useLexicalNodeSelection","nodeKey","selfElRef","ref","htmlContent","html","useMounted","mergeRegister","registerCommand","CLICK_COMMAND","event","target","value","preventDefault","shiftKey","dispatchCommand","SELECTED_COMPONENT_COMMAND","el","component","HtmlBlockTools","COMMAND_PRIORITY_LOW","REMOVE_HTML_BLOCK_COMMAND","selection","$getSelection","$isNodeSelection","getNodes","forEach","node","remove","HTML_BLOCK_CHANGE","payload","getKey","setHtml","_createVNode","baseClass","class","focusClass"],"mappings":";;;;;;;;AAoBA,MAAeA,4DAAgB;AAAA,EAC7BC,MAAM;AAAA,EACNC,OAAO,CAAC,aAAa,cAAc,SAAQ,WAAW,MAAM;AAAA,EAC5DC,MAAMD,OAAO;AACX,UAAME,SAASC,WAAAA;AACf,UAAM;AAAA,MAAEC;AAAAA,MAAYC;AAAAA,MAAaC;AAAAA,IAAe,IAAIC,WAAuB,wBAACP,MAAMQ,OAAO;AAEzF,UAAMC,YAAYC,QAAS,IAAI;AAC/B,UAAMC,cAAcD,IAAAA,IAAIV,MAAMY,IAAI;AAGlCC,eAAAA,WAAW,MAAM;AACf,aAAOC,MAAa;AAAA;AAAA,QAElBZ,OAAOa,gBAA4BC,QAAa,eAAEC,WAAU;AAC1D,cAAIA,MAAMC,WAAWT,UAAUU,OAAO;AAEpCF,kBAAMG,eAAc;AAEpB,gBAAI,CAACH,MAAMI,UAAU;AAAEf;YAAmB;AAE1CD,wBAAY,IAAI;AAGhBH,mBAAOoB,gBAAgBC,qCAA2B;AAAA,cAChDC,IAAGf,UAAUU;AAAAA,cACbM,WAAUC;AAAAA,YACZ,CAAyB;AAEzB,mBAAO;AAAA,UACT;AAEAxB,iBAAOoB,gBAAgBC,qCAA2B,IAAI;AACtD,iBAAO;AAAA,QACR,GAAEI,4BAAoB;AAAA;AAAA,QAEvBzB,OAAOa,gBAAgBa,MAAAA,2BAA2B,MAAM;AAEtD,gBAAMC,YAAYC,QAAAA;AAElB,cAAGC,QAAAA,iBAAiBF,SAAS,GAAE;AAE7BA,sBAAUG,SAAQ,EAAGC,QAAQC,UAAMA,KAAKC,OAAM,CAAE;AAEhDjC,mBAAOoB,gBAAgBC,qCAA2B,IAAI;AAAA,UACxD;AACA,iBAAO;AAAA,QACR,GAACI,4BAAoB;AAAA;AAAA,QAEtBzB,OAAOa,gBAAgBqB,MAAiB,mBAAEC,aAAmB;AAE3D,gBAAMR,YAAYC,QAAAA;AAElB,cAAGC,QAAAA,iBAAiBF,SAAS,GAAE;AAE7B,kBAAMK,OAAOL,UAAUG,SAAU,EAAC,CAAC;AAEnC,gBAAGE,KAAKI,YAAYtC,MAAMQ,SAAQ;AAChCG,0BAAYQ,QAAQkB;AACpBH,mBAAKK,QAAQF,OAAO;AAAA,YACtB;AAAA,UAEF;AAEA,iBAAO;AAAA,WACPV,QAAAA,oBAAoB;AAAA,MACxB;AAAA,IACF,CAAC;AAED,WAAO,MAAM;AACX,aAAAa,IAAAA,YAAA,OAAA;AAAA,QAAA,SAAmB,GAAGxC,MAAMyC,SAAS,IAAIzC,MAAM0C,KAAK,IAAItC,WAAWe,QAAQnB,MAAM2C,aAAa,EAAE;AAAA,QAAE,OAC7FnB,QAAIf,UAAUU,QAAMK;AAAAA,QAAE,aAAUb,YAAYQ;AAAAA,MAAK,GAAA,IAAA;AAAA;EAG1D;AACF,CAAC;;"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const vue = require("vue");
|
|
3
|
+
const lexical = require("lexical");
|
|
4
|
+
const utils = require("@lexical/utils");
|
|
5
|
+
const lexicalVue = require("lexical-vue");
|
|
6
|
+
const index = require("./index.js");
|
|
7
|
+
const HtmlEditDialog = require("./HtmlEditDialog.js");
|
|
8
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
9
|
+
__name: "HtmlBlockTools",
|
|
10
|
+
setup(__props) {
|
|
11
|
+
const editor = lexicalVue.useLexicalComposer();
|
|
12
|
+
const htmlContent = vue.ref("");
|
|
13
|
+
const editHandle = async () => {
|
|
14
|
+
var result = await HtmlEditDialog.ShowHtmlEditPanel(htmlContent.value);
|
|
15
|
+
editor.dispatchCommand(index.HTML_BLOCK_CHANGE, result);
|
|
16
|
+
};
|
|
17
|
+
vue.onMounted(() => {
|
|
18
|
+
const unregisterMergeListener = utils.mergeRegister(
|
|
19
|
+
editor.registerCommand(lexical.SELECTION_CHANGE_COMMAND, (payload, newEditor) => {
|
|
20
|
+
const selection = lexical.$getSelection();
|
|
21
|
+
if (lexical.$isNodeSelection(selection)) {
|
|
22
|
+
const node = selection.getNodes()[0];
|
|
23
|
+
if (node.__type == index.HtmlBlockNode.getType()) {
|
|
24
|
+
htmlContent.value = node == null ? void 0 : node.__html;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
return false;
|
|
28
|
+
}, 1)
|
|
29
|
+
);
|
|
30
|
+
vue.onUnmounted(() => unregisterMergeListener());
|
|
31
|
+
});
|
|
32
|
+
return (_ctx, _cache) => {
|
|
33
|
+
const _component_MKSvgIcon = vue.resolveComponent("MKSvgIcon");
|
|
34
|
+
const _component_el_button = vue.resolveComponent("el-button");
|
|
35
|
+
const _component_el_button_group = vue.resolveComponent("el-button-group");
|
|
36
|
+
return vue.openBlock(), vue.createBlock(_component_el_button_group, null, {
|
|
37
|
+
default: vue.withCtx(() => [
|
|
38
|
+
vue.createVNode(_component_el_button, {
|
|
39
|
+
text: "",
|
|
40
|
+
onClick: editHandle
|
|
41
|
+
}, {
|
|
42
|
+
default: vue.withCtx(() => [
|
|
43
|
+
vue.createVNode(_component_MKSvgIcon, { iconClass: `Edit` })
|
|
44
|
+
]),
|
|
45
|
+
_: 1
|
|
46
|
+
}),
|
|
47
|
+
vue.createVNode(_component_el_button, {
|
|
48
|
+
text: "",
|
|
49
|
+
type: "danger",
|
|
50
|
+
onClick: _cache[0] || (_cache[0] = ($event) => vue.unref(editor).dispatchCommand(vue.unref(index.REMOVE_HTML_BLOCK_COMMAND), null))
|
|
51
|
+
}, {
|
|
52
|
+
default: vue.withCtx(() => [
|
|
53
|
+
vue.createVNode(_component_MKSvgIcon, { iconClass: `Delete` })
|
|
54
|
+
]),
|
|
55
|
+
_: 1
|
|
56
|
+
})
|
|
57
|
+
]),
|
|
58
|
+
_: 1
|
|
59
|
+
});
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
module.exports = _sfc_main;
|
|
64
|
+
//# sourceMappingURL=HtmlBlockTools.vue.js.map
|
package/dist/cjs/components/basic/doc-editor/plugins/HtmlBlockPlugin/HtmlBlockTools.vue.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HtmlBlockTools.vue.js","sources":["../../../../../../../src/components/basic/doc-editor/plugins/HtmlBlockPlugin/HtmlBlockTools.vue"],"sourcesContent":["<script setup lang=\"ts\">\r\nimport { \r\n SELECTION_CHANGE_COMMAND,$getSelection,$isNodeSelection \r\n} from 'lexical'\r\nimport { mergeRegister } from '@lexical/utils'\r\nimport { onMounted, onUnmounted,ref } from 'vue'\r\nimport { useLexicalComposer } from 'lexical-vue'\r\nimport { REMOVE_HTML_BLOCK_COMMAND,HTML_BLOCK_CHANGE, HtmlBlockNode } from './index'\r\nimport { ShowHtmlEditPanel } from \"./HtmlEditDialog\"\r\n\r\n \r\nconst editor = useLexicalComposer()\r\nconst htmlContent = ref(\"\")\r\n\r\n// 编辑\r\nconst editHandle = async ()=>{\r\n var result = await ShowHtmlEditPanel(htmlContent.value);\r\n editor.dispatchCommand(HTML_BLOCK_CHANGE,result as string)\r\n}\r\n\r\nonMounted(()=>{\r\n\r\n const unregisterMergeListener = mergeRegister(\r\n editor.registerCommand(SELECTION_CHANGE_COMMAND, (payload, newEditor) => {\r\n \r\n const selection = $getSelection();\r\n\r\n if($isNodeSelection(selection)){\r\n\r\n const node = selection.getNodes()[0] as HtmlBlockNode;\r\n \r\n if(node.__type == HtmlBlockNode.getType()){\r\n htmlContent.value = node?.__html\r\n }\r\n \r\n }\r\n return false;\r\n },1)\r\n )\r\n\r\n // 卸载\r\n onUnmounted(() => unregisterMergeListener())\r\n\r\n})\r\n\r\n</script>\r\n\r\n<template>\r\n <el-button-group>\r\n <el-button text @click=\"editHandle\">\r\n <MKSvgIcon :iconClass=\"`Edit`\" /> \r\n </el-button>\r\n <el-button text type=\"danger\" @click=\"editor.dispatchCommand(REMOVE_HTML_BLOCK_COMMAND,null)\">\r\n <MKSvgIcon :iconClass=\"`Delete`\" /> \r\n </el-button>\r\n </el-button-group>\r\n</template>\r\n"],"names":["useLexicalComposer","ref","ShowHtmlEditPanel","HTML_BLOCK_CHANGE","onMounted","mergeRegister","SELECTION_CHANGE_COMMAND","$getSelection","$isNodeSelection","HtmlBlockNode","onUnmounted"],"mappings":";;;;;;;;;;AAWA,UAAM,SAASA,WAAAA;AACT,UAAA,cAAcC,QAAI,EAAE;AAG1B,UAAM,aAAa,YAAW;AAC5B,UAAI,SAAS,MAAMC,eAAAA,kBAAkB,YAAY,KAAK;AAC/C,aAAA,gBAAgBC,yBAAkB,MAAgB;AAAA,IAAA;AAG3DC,QAAAA,UAAU,MAAI;AAEZ,YAAM,0BAA0BC,MAAA;AAAA,QAC9B,OAAO,gBAAgBC,QAAAA,0BAA0B,CAAC,SAAS,cAAc;AAEvE,gBAAM,YAAYC,QAAAA;AAEf,cAAAC,QAAAA,iBAAiB,SAAS,GAAE;AAE7B,kBAAM,OAAO,UAAU,SAAS,EAAE,CAAC;AAEnC,gBAAG,KAAK,UAAUC,MAAc,cAAA,QAAA,GAAU;AACxC,0BAAY,QAAQ,6BAAM;AAAA,YAC5B;AAAA,UAEF;AACO,iBAAA;AAAA,WACP,CAAC;AAAA,MAAA;AAIOC,sBAAA,MAAM,yBAAyB;AAAA,IAAA,CAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/cjs/components/basic/doc-editor/plugins/HtmlBlockPlugin/HtmlBlockTools.vue2.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HtmlBlockTools.vue2.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const vue = require("vue");
|
|
4
|
+
const dm = require("@maketribe/dm");
|
|
5
|
+
const elementPlus = require("element-plus");
|
|
6
|
+
const index = require("../../../code-editor/index.js");
|
|
7
|
+
const langHtml = require("@codemirror/lang-html");
|
|
8
|
+
const ShowHtmlEditPanel = async (content) => {
|
|
9
|
+
return new Promise((resolve, reject) => {
|
|
10
|
+
const htmlValue = vue.ref(content);
|
|
11
|
+
const extensions = [langHtml.html()];
|
|
12
|
+
const handleCancelClick = () => {
|
|
13
|
+
dialogInstance.destroy();
|
|
14
|
+
};
|
|
15
|
+
const handleConfirmClick = () => {
|
|
16
|
+
dialogInstance.destroy();
|
|
17
|
+
resolve(htmlValue.value);
|
|
18
|
+
};
|
|
19
|
+
const dialogInstance = dm.Dialoger.customRender({
|
|
20
|
+
title: "自定义HTML代码块",
|
|
21
|
+
class: "mk-html-editor-dialog",
|
|
22
|
+
width: "70%",
|
|
23
|
+
onClose: () => {
|
|
24
|
+
dialogInstance.destroy();
|
|
25
|
+
},
|
|
26
|
+
body: () => {
|
|
27
|
+
return vue.createVNode(index.MKCodeEditor, {
|
|
28
|
+
"modelValue": htmlValue.value,
|
|
29
|
+
"onUpdate:modelValue": ($event) => htmlValue.value = $event,
|
|
30
|
+
"extensions": extensions
|
|
31
|
+
}, null);
|
|
32
|
+
},
|
|
33
|
+
footer: () => {
|
|
34
|
+
return vue.createVNode(vue.Fragment, null, [vue.createVNode(elementPlus.ElButton, {
|
|
35
|
+
"onClick": handleCancelClick
|
|
36
|
+
}, {
|
|
37
|
+
default: () => [vue.createTextVNode("取消")]
|
|
38
|
+
}), vue.createVNode(elementPlus.ElButton, {
|
|
39
|
+
"type": "primary",
|
|
40
|
+
"onClick": handleConfirmClick
|
|
41
|
+
}, {
|
|
42
|
+
default: () => [vue.createTextVNode("确定")]
|
|
43
|
+
})]);
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
};
|
|
48
|
+
exports.ShowHtmlEditPanel = ShowHtmlEditPanel;
|
|
49
|
+
//# sourceMappingURL=HtmlEditDialog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HtmlEditDialog.js","sources":["../../../../../../../src/components/basic/doc-editor/plugins/HtmlBlockPlugin/HtmlEditDialog.tsx"],"sourcesContent":["\r\nimport { Fragment,ref,unref } from 'vue'\r\nimport { Dialoger } from '@maketribe/dm'\r\nimport { ElButton} from \"element-plus\";\r\nimport { MKCodeEditor } from \"../../../code-editor\"\r\nimport { html } from \"@codemirror/lang-html\"\r\n/**\r\n * \r\n * @param html \r\n * @returns \r\n */\r\nexport const ShowHtmlEditPanel = async (content:any) => {\r\n return new Promise((resolve,reject) => {\r\n\r\n const htmlValue = ref(content)\r\n\r\n const extensions = [html()]\r\n\r\n // 取消编辑\r\n const handleCancelClick = () => {\r\n dialogInstance.destroy();\r\n };\r\n\r\n // 确认编辑\r\n const handleConfirmClick = () => {\r\n dialogInstance.destroy();\r\n resolve(htmlValue.value);\r\n };\r\n\r\n const dialogInstance = Dialoger.customRender({\r\n title: \"自定义HTML代码块\",\r\n class: \"mk-html-editor-dialog\",\r\n width: \"70%\",\r\n onClose: () => {\r\n dialogInstance.destroy();\r\n },\r\n body: () => {\r\n return <MKCodeEditor v-model={htmlValue.value} extensions={extensions} ></MKCodeEditor>\r\n },\r\n footer: () => {\r\n return <Fragment>\r\n <ElButton onClick={handleCancelClick}>取消</ElButton>\r\n <ElButton type=\"primary\" onClick={handleConfirmClick}>\r\n 确定\r\n </ElButton>\r\n </Fragment>\r\n },\r\n });\r\n });\r\n}\r\n"],"names":["ShowHtmlEditPanel","content","Promise","resolve","reject","htmlValue","ref","extensions","html","handleCancelClick","dialogInstance","destroy","handleConfirmClick","value","Dialoger","customRender","title","class","width","onClose","body","_createVNode","MKCodeEditor","$event","footer","_Fragment","ElButton","default","_createTextVNode"],"mappings":";;;;;;;AAWaA,MAAAA,oBAAoB,OAAQC,YAAgB;AACvD,SAAO,IAAIC,QAAQ,CAACC,SAAQC,WAAW;AAErC,UAAMC,YAAYC,QAAIL,OAAO;AAE7B,UAAMM,aAAa,CAACC,SAAI,KAAA,CAAE;AAG1B,UAAMC,oBAAoBA,MAAM;AAC9BC,qBAAeC,QAAO;AAAA;AAIxB,UAAMC,qBAAqBA,MAAM;AAC/BF,qBAAeC,QAAO;AACtBR,cAAQE,UAAUQ,KAAK;AAAA;AAGzB,UAAMH,iBAAiBI,GAAQ,SAACC,aAAa;AAAA,MAC3CC,OAAO;AAAA,MACPC,OAAO;AAAA,MACPC,OAAO;AAAA,MACPC,SAASA,MAAM;AACbT,uBAAeC,QAAO;AAAA,MACvB;AAAA,MACDS,MAAMA,MAAM;AACV,eAAAC,IAAAA,YAAAC,MAAAA,cAAA;AAAA,UAAA,cAA8BjB,UAAUQ;AAAAA,UAAK,uBAAAU,YAAflB,UAAUQ,QAAKU;AAAAA,UAAA,cAAchB;AAAAA,QAAU,GAAA,IAAA;AAAA,MACtE;AAAA,MACDiB,QAAQA,MAAM;AACZ,eAAAH,IAAA,YAAAI,IAAA,UAAAJ,MAAAA,CAAAA,IAAAA,YAAAK,YAAAA,UAAA;AAAA,UAAA,WACqBjB;AAAAA,QAAiB,GAAA;AAAA,UAAAkB,SAAAA,MAAA,CAAAC,oBAAA,IAAA,CAAA;AAAA,SAAAP,GAAAA,IAAA,YAAAK,sBAAA;AAAA,UAAA,QAAA;AAAA,UAAA,WACFd;AAAAA,QAAkB,GAAA;AAAA,UAAAe,SAAAA,MAAA,CAAAC,oBAAA,IAAA,CAAA;AAAA,QAAA,CAAA,CAAA,CAAA;AAAA,MAIxD;AAAA,IACF,CAAC;AAAA,EACH,CAAC;AACH;;"}
|