@opentiny/fluent-editor 4.0.0-alpha.1 → 4.0.0-alpha.3
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/README.md +7 -24
- package/es/config/editor.utils.es.js +0 -2
- package/es/config/editor.utils.es.js.map +1 -1
- package/es/config/index.es.js +2 -2
- package/es/config/index.es.js.map +1 -1
- package/es/config/types/index.es.js +0 -20
- package/es/config/types/index.es.js.map +1 -1
- package/es/core/fluent-editor.es.js +4 -1
- package/es/core/fluent-editor.es.js.map +1 -1
- package/es/fluent-editor.es.js +26 -19
- package/es/fluent-editor.es.js.map +1 -1
- package/es/formats/emoji.es.js +14 -0
- package/es/formats/emoji.es.js.map +1 -0
- package/es/formats/index.es.js +11 -0
- package/es/formats/index.es.js.map +1 -0
- package/es/formats/soft-break.es.js +12 -5
- package/es/formats/soft-break.es.js.map +1 -1
- package/es/formats/strike.es.js +8 -5
- package/es/formats/strike.es.js.map +1 -1
- package/es/formats/video.es.js +14 -10
- package/es/formats/video.es.js.map +1 -1
- package/es/index.es.js +90 -31
- package/es/index.es.js.map +1 -1
- package/es/modules/ai/index.es.js +238 -0
- package/es/modules/ai/index.es.js.map +1 -0
- package/es/modules/counter.es.js +8 -3
- package/es/modules/counter.es.js.map +1 -1
- package/es/modules/custom-clipboard.es.js +20 -22
- package/es/modules/custom-clipboard.es.js.map +1 -1
- package/es/modules/custom-image/actions/action.es.js +19 -0
- package/es/modules/custom-image/actions/action.es.js.map +1 -0
- package/es/modules/custom-image/actions/{CustomResizeAction.es.js → custom-resize-action.es.js} +24 -11
- package/es/modules/custom-image/actions/{CustomResizeAction.es.js.map → custom-resize-action.es.js.map} +1 -1
- package/es/modules/custom-image/actions/{DeleteAction.es.js → delete-action.es.js} +8 -5
- package/es/modules/custom-image/actions/delete-action.es.js.map +1 -0
- package/es/modules/custom-image/actions/image-toolbar-buttons.es.js +137 -0
- package/es/modules/custom-image/actions/image-toolbar-buttons.es.js.map +1 -0
- package/es/modules/custom-image/actions/index.es.js +18 -0
- package/es/modules/custom-image/actions/index.es.js.map +1 -0
- package/es/modules/custom-image/actions/toolbar-action.es.js +33 -0
- package/es/modules/custom-image/actions/toolbar-action.es.js.map +1 -0
- package/es/modules/custom-image/actions/toolbar.es.js +110 -0
- package/es/modules/custom-image/actions/toolbar.es.js.map +1 -0
- package/es/modules/custom-image/{BlotFormatter.es.js → blot-formatter.es.js} +23 -49
- package/es/modules/custom-image/blot-formatter.es.js.map +1 -0
- package/es/modules/custom-image/image.es.js +31 -6
- package/es/modules/custom-image/image.es.js.map +1 -1
- package/es/modules/custom-image/index.es.js +9 -0
- package/es/modules/custom-image/index.es.js.map +1 -0
- package/es/modules/custom-image/options.es.js +85 -0
- package/es/modules/custom-image/options.es.js.map +1 -0
- package/es/modules/custom-image/specs/blot-spec.es.js +33 -0
- package/es/modules/custom-image/specs/blot-spec.es.js.map +1 -0
- package/es/modules/custom-image/specs/{CustomImageSpec.es.js → custom-image-spec.es.js} +13 -14
- package/es/modules/custom-image/specs/custom-image-spec.es.js.map +1 -0
- package/es/modules/custom-image/specs/image-spec.es.js +32 -0
- package/es/modules/custom-image/specs/image-spec.es.js.map +1 -0
- package/es/modules/custom-image/specs/index.es.js +9 -0
- package/es/modules/custom-image/specs/index.es.js.map +1 -0
- package/es/modules/custom-uploader.es.js +6 -4
- package/es/modules/custom-uploader.es.js.map +1 -1
- package/es/modules/divider.es.js +8 -7
- package/es/modules/divider.es.js.map +1 -1
- package/es/modules/emoji.es.js +175 -0
- package/es/modules/emoji.es.js.map +1 -0
- package/es/modules/file/formats/file.es.js +10 -8
- package/es/modules/file/formats/file.es.js.map +1 -1
- package/es/modules/file/index.es.js +6 -28
- package/es/modules/file/index.es.js.map +1 -1
- package/es/modules/file/modules/file-bar.es.js +11 -3
- package/es/modules/file/modules/file-bar.es.js.map +1 -1
- package/es/modules/file/modules/file-module.es.js +35 -0
- package/es/modules/file/modules/file-module.es.js.map +1 -0
- package/es/modules/i18n.es.js +6 -3
- package/es/modules/i18n.es.js.map +1 -1
- package/es/modules/index.es.js +26 -0
- package/es/modules/index.es.js.map +1 -0
- package/es/modules/link/formats/link.es.js +14 -10
- package/es/modules/link/formats/link.es.js.map +1 -1
- package/es/modules/link/index.es.js +4 -12
- package/es/modules/link/index.es.js.map +1 -1
- package/es/modules/link/modules/tooltip.es.js +28 -19
- package/es/modules/link/modules/tooltip.es.js.map +1 -1
- package/es/modules/mathlive/formats.es.js +10 -7
- package/es/modules/mathlive/formats.es.js.map +1 -1
- package/es/modules/mathlive/index.es.js +6 -30
- package/es/modules/mathlive/index.es.js.map +1 -1
- package/es/modules/mathlive/module.es.js +40 -0
- package/es/modules/mathlive/module.es.js.map +1 -0
- package/es/modules/mathlive/tooltip.es.js +9 -5
- package/es/modules/mathlive/tooltip.es.js.map +1 -1
- package/es/modules/mention/index.es.js +7 -0
- package/es/modules/{emoji/emoji-list → mention}/index.es.js.map +1 -1
- package/es/modules/mention/{MentionLink.es.js → mention-link.es.js} +14 -6
- package/es/modules/mention/mention-link.es.js.map +1 -0
- package/es/modules/mention/{Mention.es.js → mention.es.js} +28 -20
- package/es/modules/mention/mention.es.js.map +1 -0
- package/es/modules/shortcut-key/index.es.js.map +1 -1
- package/es/modules/syntax.es.js +4 -0
- package/es/modules/syntax.es.js.map +1 -1
- package/es/modules/table-up/index.es.js +4 -0
- package/es/modules/table-up/index.es.js.map +1 -1
- package/es/modules/toolbar/better-picker.es.js +5 -0
- package/es/modules/toolbar/better-picker.es.js.map +1 -1
- package/es/modules/toolbar/better-toolbar.es.js +138 -0
- package/es/modules/toolbar/better-toolbar.es.js.map +1 -0
- package/es/modules/toolbar/index.es.js +5 -135
- package/es/modules/toolbar/index.es.js.map +1 -1
- package/es/node_modules/.pnpm/@emoji-mart_data@1.2.1/node_modules/@emoji-mart/data/sets/15/native.json.es.js +40145 -0
- package/es/node_modules/.pnpm/@emoji-mart_data@1.2.1/node_modules/@emoji-mart/data/sets/15/native.json.es.js.map +1 -0
- package/es/node_modules/.pnpm/@floating-ui_core@1.7.2/node_modules/@floating-ui/core/dist/floating-ui.core.es.js +938 -0
- package/es/node_modules/.pnpm/@floating-ui_core@1.7.2/node_modules/@floating-ui/core/dist/floating-ui.core.es.js.map +1 -0
- package/es/node_modules/.pnpm/@floating-ui_dom@1.7.2/node_modules/@floating-ui/dom/dist/floating-ui.dom.es.js +624 -0
- package/es/node_modules/.pnpm/@floating-ui_dom@1.7.2/node_modules/@floating-ui/dom/dist/floating-ui.dom.es.js.map +1 -0
- package/es/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.es.js +174 -0
- package/es/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.es.js.map +1 -0
- package/es/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.es.js +159 -0
- package/es/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.es.js.map +1 -0
- package/es/node_modules/.pnpm/emoji-mart@5.6.0/node_modules/emoji-mart/dist/module.es.js +2849 -0
- package/es/node_modules/.pnpm/emoji-mart@5.6.0/node_modules/emoji-mart/dist/module.es.js.map +1 -0
- package/es/themes/snow.es.js +6 -10
- package/es/themes/snow.es.js.map +1 -1
- package/es/tools/fullscreen.es.js.map +1 -1
- package/es/ui/icons.config.es.js +23 -0
- package/es/ui/icons.config.es.js.map +1 -1
- package/es/ui/icons.es.js +2 -1
- package/es/ui/icons.es.js.map +1 -1
- package/es/utils/is.es.js.map +1 -1
- package/lib/config/editor.utils.cjs.js +0 -2
- package/lib/config/editor.utils.cjs.js.map +1 -1
- package/lib/config/index.cjs.js +1 -1
- package/lib/config/index.cjs.js.map +1 -1
- package/lib/config/types/index.cjs.js +0 -20
- package/lib/config/types/index.cjs.js.map +1 -1
- package/lib/core/fluent-editor.cjs.js +4 -1
- package/lib/core/fluent-editor.cjs.js.map +1 -1
- package/lib/fluent-editor.cjs.js +35 -28
- package/lib/fluent-editor.cjs.js.map +1 -1
- package/lib/formats/emoji.cjs.js +14 -0
- package/lib/formats/emoji.cjs.js.map +1 -0
- package/lib/formats/index.cjs.js +11 -0
- package/lib/formats/index.cjs.js.map +1 -0
- package/lib/formats/soft-break.cjs.js +13 -6
- package/lib/formats/soft-break.cjs.js.map +1 -1
- package/lib/formats/strike.cjs.js +9 -6
- package/lib/formats/strike.cjs.js.map +1 -1
- package/lib/formats/video.cjs.js +15 -11
- package/lib/formats/video.cjs.js.map +1 -1
- package/lib/index.cjs.js +111 -34
- package/lib/index.cjs.js.map +1 -1
- package/lib/modules/ai/index.cjs.js +238 -0
- package/lib/modules/ai/index.cjs.js.map +1 -0
- package/lib/modules/counter.cjs.js +8 -3
- package/lib/modules/counter.cjs.js.map +1 -1
- package/lib/modules/custom-clipboard.cjs.js +21 -23
- package/lib/modules/custom-clipboard.cjs.js.map +1 -1
- package/lib/modules/custom-image/actions/action.cjs.js +19 -0
- package/lib/modules/custom-image/actions/action.cjs.js.map +1 -0
- package/lib/modules/custom-image/actions/{CustomResizeAction.cjs.js → custom-resize-action.cjs.js} +26 -13
- package/lib/modules/custom-image/actions/{CustomResizeAction.cjs.js.map → custom-resize-action.cjs.js.map} +1 -1
- package/lib/modules/custom-image/actions/{DeleteAction.cjs.js → delete-action.cjs.js} +10 -7
- package/lib/modules/custom-image/actions/delete-action.cjs.js.map +1 -0
- package/lib/modules/custom-image/actions/image-toolbar-buttons.cjs.js +137 -0
- package/lib/modules/custom-image/actions/image-toolbar-buttons.cjs.js.map +1 -0
- package/lib/modules/custom-image/actions/index.cjs.js +18 -0
- package/lib/modules/custom-image/actions/index.cjs.js.map +1 -0
- package/lib/modules/custom-image/actions/toolbar-action.cjs.js +33 -0
- package/lib/modules/custom-image/actions/toolbar-action.cjs.js.map +1 -0
- package/lib/modules/custom-image/actions/toolbar.cjs.js +110 -0
- package/lib/modules/custom-image/actions/toolbar.cjs.js.map +1 -0
- package/lib/modules/custom-image/{BlotFormatter.cjs.js → blot-formatter.cjs.js} +24 -50
- package/lib/modules/custom-image/blot-formatter.cjs.js.map +1 -0
- package/lib/modules/custom-image/image.cjs.js +32 -7
- package/lib/modules/custom-image/image.cjs.js.map +1 -1
- package/lib/modules/custom-image/index.cjs.js +9 -0
- package/lib/modules/custom-image/index.cjs.js.map +1 -0
- package/lib/modules/custom-image/options.cjs.js +85 -0
- package/lib/modules/custom-image/options.cjs.js.map +1 -0
- package/lib/modules/custom-image/specs/blot-spec.cjs.js +33 -0
- package/lib/modules/custom-image/specs/blot-spec.cjs.js.map +1 -0
- package/lib/modules/custom-image/specs/{CustomImageSpec.cjs.js → custom-image-spec.cjs.js} +14 -15
- package/lib/modules/custom-image/specs/custom-image-spec.cjs.js.map +1 -0
- package/lib/modules/custom-image/specs/image-spec.cjs.js +32 -0
- package/lib/modules/custom-image/specs/image-spec.cjs.js.map +1 -0
- package/lib/modules/custom-image/specs/index.cjs.js +9 -0
- package/lib/modules/custom-image/specs/index.cjs.js.map +1 -0
- package/lib/modules/custom-uploader.cjs.js +6 -4
- package/lib/modules/custom-uploader.cjs.js.map +1 -1
- package/lib/modules/divider.cjs.js +9 -8
- package/lib/modules/divider.cjs.js.map +1 -1
- package/lib/modules/emoji.cjs.js +175 -0
- package/lib/modules/emoji.cjs.js.map +1 -0
- package/lib/modules/file/formats/file.cjs.js +11 -9
- package/lib/modules/file/formats/file.cjs.js.map +1 -1
- package/lib/modules/file/index.cjs.js +5 -27
- package/lib/modules/file/index.cjs.js.map +1 -1
- package/lib/modules/file/modules/file-bar.cjs.js +12 -4
- package/lib/modules/file/modules/file-bar.cjs.js.map +1 -1
- package/lib/modules/file/modules/file-module.cjs.js +35 -0
- package/lib/modules/file/modules/file-module.cjs.js.map +1 -0
- package/lib/modules/i18n.cjs.js +6 -3
- package/lib/modules/i18n.cjs.js.map +1 -1
- package/lib/modules/index.cjs.js +26 -0
- package/lib/modules/index.cjs.js.map +1 -0
- package/lib/modules/link/formats/link.cjs.js +15 -11
- package/lib/modules/link/formats/link.cjs.js.map +1 -1
- package/lib/modules/link/index.cjs.js +4 -12
- package/lib/modules/link/index.cjs.js.map +1 -1
- package/lib/modules/link/modules/tooltip.cjs.js +28 -19
- package/lib/modules/link/modules/tooltip.cjs.js.map +1 -1
- package/lib/modules/mathlive/formats.cjs.js +11 -8
- package/lib/modules/mathlive/formats.cjs.js.map +1 -1
- package/lib/modules/mathlive/index.cjs.js +5 -29
- package/lib/modules/mathlive/index.cjs.js.map +1 -1
- package/lib/modules/mathlive/module.cjs.js +40 -0
- package/lib/modules/mathlive/module.cjs.js.map +1 -0
- package/lib/modules/mathlive/tooltip.cjs.js +10 -6
- package/lib/modules/mathlive/tooltip.cjs.js.map +1 -1
- package/lib/modules/mention/index.cjs.js +7 -0
- package/lib/modules/{emoji/emoji-list → mention}/index.cjs.js.map +1 -1
- package/lib/modules/mention/{MentionLink.cjs.js → mention-link.cjs.js} +15 -7
- package/lib/modules/mention/mention-link.cjs.js.map +1 -0
- package/lib/modules/mention/{Mention.cjs.js → mention.cjs.js} +30 -22
- package/lib/modules/mention/mention.cjs.js.map +1 -0
- package/lib/modules/shortcut-key/index.cjs.js.map +1 -1
- package/lib/modules/syntax.cjs.js +4 -0
- package/lib/modules/syntax.cjs.js.map +1 -1
- package/lib/modules/table-up/index.cjs.js +4 -0
- package/lib/modules/table-up/index.cjs.js.map +1 -1
- package/lib/modules/toolbar/better-picker.cjs.js +5 -0
- package/lib/modules/toolbar/better-picker.cjs.js.map +1 -1
- package/lib/modules/toolbar/better-toolbar.cjs.js +138 -0
- package/lib/modules/toolbar/better-toolbar.cjs.js.map +1 -0
- package/lib/modules/toolbar/index.cjs.js +6 -136
- package/lib/modules/toolbar/index.cjs.js.map +1 -1
- package/lib/node_modules/.pnpm/@emoji-mart_data@1.2.1/node_modules/@emoji-mart/data/sets/15/native.json.cjs.js +40145 -0
- package/lib/node_modules/.pnpm/@emoji-mart_data@1.2.1/node_modules/@emoji-mart/data/sets/15/native.json.cjs.js.map +1 -0
- package/lib/node_modules/.pnpm/@floating-ui_core@1.7.2/node_modules/@floating-ui/core/dist/floating-ui.core.cjs.js +938 -0
- package/lib/node_modules/.pnpm/@floating-ui_core@1.7.2/node_modules/@floating-ui/core/dist/floating-ui.core.cjs.js.map +1 -0
- package/lib/node_modules/.pnpm/@floating-ui_dom@1.7.2/node_modules/@floating-ui/dom/dist/floating-ui.dom.cjs.js +624 -0
- package/lib/node_modules/.pnpm/@floating-ui_dom@1.7.2/node_modules/@floating-ui/dom/dist/floating-ui.dom.cjs.js.map +1 -0
- package/lib/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.cjs.js +159 -0
- package/lib/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.cjs.js.map +1 -0
- package/lib/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.cjs.js +174 -0
- package/lib/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.cjs.js.map +1 -0
- package/lib/node_modules/.pnpm/emoji-mart@5.6.0/node_modules/emoji-mart/dist/module.cjs.js +2847 -0
- package/lib/node_modules/.pnpm/emoji-mart@5.6.0/node_modules/emoji-mart/dist/module.cjs.js.map +1 -0
- package/lib/themes/snow.cjs.js +7 -11
- package/lib/themes/snow.cjs.js.map +1 -1
- package/lib/tools/fullscreen.cjs.js.map +1 -1
- package/lib/ui/icons.cjs.js +1 -0
- package/lib/ui/icons.cjs.js.map +1 -1
- package/lib/ui/icons.config.cjs.js +23 -0
- package/lib/ui/icons.config.cjs.js.map +1 -1
- package/lib/utils/is.cjs.js.map +1 -1
- package/package.json +8 -7
- package/style.css +92 -933
- package/types/config/editor.utils.d.ts +0 -1
- package/types/config/index.d.ts +1 -0
- package/types/config/types/editor-config.interface.d.ts +0 -7
- package/types/config/types/editor-modules.interface.d.ts +21 -12
- package/types/config/types/index.d.ts +0 -20
- package/types/config/types/type.d.ts +0 -4
- package/types/core/fluent-editor.d.ts +0 -1
- package/types/formats/emoji.d.ts +9 -0
- package/types/formats/index.d.ts +4 -0
- package/types/formats/soft-break.d.ts +6 -7
- package/types/formats/strike.d.ts +6 -4
- package/types/formats/video.d.ts +4 -6
- package/types/index.d.ts +6 -5
- package/types/modules/ai/index.d.ts +39 -0
- package/types/modules/counter.d.ts +8 -1
- package/types/modules/custom-clipboard.d.ts +3 -6
- package/types/modules/custom-image/Options.d.ts +34 -23
- package/types/modules/custom-image/actions/Action.d.ts +5 -3
- package/types/modules/custom-image/actions/custom-resize-action.d.ts +24 -0
- package/types/modules/custom-image/actions/delete-action.d.ts +7 -0
- package/types/modules/custom-image/actions/image-toolbar-buttons.d.ts +17 -0
- package/types/modules/custom-image/actions/index.d.ts +6 -0
- package/types/modules/custom-image/actions/toolbar-action.d.ts +12 -0
- package/types/modules/custom-image/actions/toolbar.d.ts +20 -0
- package/types/modules/custom-image/blot-formatter.d.ts +24 -0
- package/types/modules/custom-image/image-bar.d.ts +9 -7
- package/types/modules/custom-image/image.d.ts +15 -13
- package/types/modules/custom-image/index.d.ts +4 -0
- package/types/modules/custom-image/specs/blot-spec.d.ts +13 -0
- package/types/modules/custom-image/specs/custom-image-spec.d.ts +18 -0
- package/types/modules/custom-image/specs/image-spec.d.ts +9 -0
- package/types/modules/custom-image/specs/index.d.ts +3 -0
- package/types/modules/custom-uploader.d.ts +41 -0
- package/types/modules/divider.d.ts +6 -4
- package/types/modules/emoji/formats/emoji-blot.d.ts +9 -7
- package/types/modules/emoji/index.d.ts +3 -10
- package/types/modules/emoji/modules/emoji.d.ts +6 -6
- package/types/modules/emoji/modules/toolbar-emoji.d.ts +7 -6
- package/types/modules/emoji.d.ts +35 -0
- package/types/modules/file/formats/file.d.ts +2 -2
- package/types/modules/file/index.d.ts +3 -11
- package/types/modules/file/modules/file-bar.d.ts +1 -1
- package/types/modules/file/modules/file-module.d.ts +10 -0
- package/types/modules/i18n.d.ts +1 -2
- package/types/modules/index.d.ts +15 -0
- package/types/modules/link/formats/link.d.ts +5 -5
- package/types/modules/link/index.d.ts +2 -6
- package/types/modules/link/modules/tooltip.d.ts +5 -10
- package/types/modules/mathlive/formats.d.ts +2 -2
- package/types/modules/mathlive/index.d.ts +3 -9
- package/types/modules/mathlive/module.d.ts +10 -0
- package/types/modules/mathlive/tooltip.d.ts +1 -1
- package/types/modules/mention/Mention.d.ts +3 -4
- package/types/modules/mention/index.d.ts +2 -0
- package/types/modules/mention/mention-link.d.ts +17 -0
- package/types/modules/shortcut-key/index.d.ts +12 -8
- package/types/modules/table-up/index.d.ts +3 -3
- package/types/modules/toolbar/better-toolbar.d.ts +8 -0
- package/types/modules/toolbar/index.d.ts +2 -8
- package/types/tools/fullscreen.d.ts +5 -1
- package/types/ui/icons.config.d.ts +2 -0
- package/types/utils/is.d.ts +1 -1
- package/es/config/types/additional-toolbar-item.interface.es.js +0 -2
- package/es/config/types/additional-toolbar-item.interface.es.js.map +0 -1
- package/es/config/types/content-change.interface.es.js +0 -2
- package/es/config/types/content-change.interface.es.js.map +0 -1
- package/es/config/types/content-save.interface.es.js +0 -2
- package/es/config/types/content-save.interface.es.js.map +0 -1
- package/es/config/types/counter-option.interface.es.js +0 -2
- package/es/config/types/counter-option.interface.es.js.map +0 -1
- package/es/config/types/editor-toolbar.interface.es.js +0 -2
- package/es/config/types/editor-toolbar.interface.es.js.map +0 -1
- package/es/config/types/file-operation.interface.es.js +0 -2
- package/es/config/types/file-operation.interface.es.js.map +0 -1
- package/es/config/types/focus-change.interface.es.js +0 -2
- package/es/config/types/focus-change.interface.es.js.map +0 -1
- package/es/config/types/fullscreen-module.interface.es.js +0 -2
- package/es/config/types/fullscreen-module.interface.es.js.map +0 -1
- package/es/config/types/help-panel-item.interface.es.js +0 -2
- package/es/config/types/help-panel-item.interface.es.js.map +0 -1
- package/es/config/types/help-panel-option.interface.es.js +0 -2
- package/es/config/types/help-panel-option.interface.es.js.map +0 -1
- package/es/config/types/image-module.interface.es.js +0 -2
- package/es/config/types/image-module.interface.es.js.map +0 -1
- package/es/config/types/image-upload.interface.es.js +0 -2
- package/es/config/types/image-upload.interface.es.js.map +0 -1
- package/es/config/types/load-on-demand-module.interface.es.js +0 -2
- package/es/config/types/load-on-demand-module.interface.es.js.map +0 -1
- package/es/config/types/mention-module.interface.es.js +0 -2
- package/es/config/types/mention-module.interface.es.js.map +0 -1
- package/es/config/types/paste-change.interface.es.js +0 -2
- package/es/config/types/paste-change.interface.es.js.map +0 -1
- package/es/config/types/quick-menu-module.interface.es.js +0 -2
- package/es/config/types/quick-menu-module.interface.es.js.map +0 -1
- package/es/config/types/range.interface.es.js +0 -2
- package/es/config/types/range.interface.es.js.map +0 -1
- package/es/config/types/registry-options.interface.es.js +0 -2
- package/es/config/types/registry-options.interface.es.js.map +0 -1
- package/es/config/types/selection-change.interface.es.js +0 -2
- package/es/config/types/selection-change.interface.es.js.map +0 -1
- package/es/config/types/toolbar-item.interface.es.js +0 -2
- package/es/config/types/toolbar-item.interface.es.js.map +0 -1
- package/es/config/types/validate-error.interface.es.js +0 -2
- package/es/config/types/validate-error.interface.es.js.map +0 -1
- package/es/modules/custom-image/BlotFormatter.es.js.map +0 -1
- package/es/modules/custom-image/Options.es.js +0 -95
- package/es/modules/custom-image/Options.es.js.map +0 -1
- package/es/modules/custom-image/actions/Action.es.js +0 -15
- package/es/modules/custom-image/actions/Action.es.js.map +0 -1
- package/es/modules/custom-image/actions/DeleteAction.es.js.map +0 -1
- package/es/modules/custom-image/image-bar.es.js +0 -127
- package/es/modules/custom-image/image-bar.es.js.map +0 -1
- package/es/modules/custom-image/specs/BlotSpec.es.js +0 -27
- package/es/modules/custom-image/specs/BlotSpec.es.js.map +0 -1
- package/es/modules/custom-image/specs/CustomImageSpec.es.js.map +0 -1
- package/es/modules/custom-image/specs/ImageSpec.es.js +0 -29
- package/es/modules/custom-image/specs/ImageSpec.es.js.map +0 -1
- package/es/modules/emoji/emoji-list/index.es.js +0 -5
- package/es/modules/emoji/emoji-list/people.es.js +0 -114
- package/es/modules/emoji/emoji-list/people.es.js.map +0 -1
- package/es/modules/emoji/emoji-list.es.js +0 -9
- package/es/modules/emoji/emoji-list.es.js.map +0 -1
- package/es/modules/emoji/emoji-map.es.js +0 -9
- package/es/modules/emoji/emoji-map.es.js.map +0 -1
- package/es/modules/emoji/emoji-sprite.es.js +0 -5
- package/es/modules/emoji/emoji-sprite.es.js.map +0 -1
- package/es/modules/emoji/formats/emoji-blot.es.js +0 -41
- package/es/modules/emoji/formats/emoji-blot.es.js.map +0 -1
- package/es/modules/emoji/index.es.js +0 -8
- package/es/modules/emoji/index.es.js.map +0 -1
- package/es/modules/emoji/modules/emoji.es.js +0 -248
- package/es/modules/emoji/modules/emoji.es.js.map +0 -1
- package/es/modules/emoji/modules/toolbar-emoji.es.js +0 -153
- package/es/modules/emoji/modules/toolbar-emoji.es.js.map +0 -1
- package/es/modules/emoji/utils.es.js +0 -19
- package/es/modules/emoji/utils.es.js.map +0 -1
- package/es/modules/mention/Mention.es.js.map +0 -1
- package/es/modules/mention/MentionLink.es.js.map +0 -1
- package/lib/config/types/additional-toolbar-item.interface.cjs.js +0 -2
- package/lib/config/types/additional-toolbar-item.interface.cjs.js.map +0 -1
- package/lib/config/types/content-change.interface.cjs.js +0 -2
- package/lib/config/types/content-change.interface.cjs.js.map +0 -1
- package/lib/config/types/content-save.interface.cjs.js +0 -2
- package/lib/config/types/content-save.interface.cjs.js.map +0 -1
- package/lib/config/types/counter-option.interface.cjs.js +0 -2
- package/lib/config/types/counter-option.interface.cjs.js.map +0 -1
- package/lib/config/types/editor-toolbar.interface.cjs.js +0 -2
- package/lib/config/types/editor-toolbar.interface.cjs.js.map +0 -1
- package/lib/config/types/file-operation.interface.cjs.js +0 -2
- package/lib/config/types/file-operation.interface.cjs.js.map +0 -1
- package/lib/config/types/focus-change.interface.cjs.js +0 -2
- package/lib/config/types/focus-change.interface.cjs.js.map +0 -1
- package/lib/config/types/fullscreen-module.interface.cjs.js +0 -2
- package/lib/config/types/fullscreen-module.interface.cjs.js.map +0 -1
- package/lib/config/types/help-panel-item.interface.cjs.js +0 -2
- package/lib/config/types/help-panel-item.interface.cjs.js.map +0 -1
- package/lib/config/types/help-panel-option.interface.cjs.js +0 -2
- package/lib/config/types/help-panel-option.interface.cjs.js.map +0 -1
- package/lib/config/types/image-module.interface.cjs.js +0 -2
- package/lib/config/types/image-module.interface.cjs.js.map +0 -1
- package/lib/config/types/image-upload.interface.cjs.js +0 -2
- package/lib/config/types/image-upload.interface.cjs.js.map +0 -1
- package/lib/config/types/load-on-demand-module.interface.cjs.js +0 -2
- package/lib/config/types/load-on-demand-module.interface.cjs.js.map +0 -1
- package/lib/config/types/mention-module.interface.cjs.js +0 -2
- package/lib/config/types/mention-module.interface.cjs.js.map +0 -1
- package/lib/config/types/paste-change.interface.cjs.js +0 -2
- package/lib/config/types/paste-change.interface.cjs.js.map +0 -1
- package/lib/config/types/quick-menu-module.interface.cjs.js +0 -2
- package/lib/config/types/quick-menu-module.interface.cjs.js.map +0 -1
- package/lib/config/types/range.interface.cjs.js +0 -2
- package/lib/config/types/range.interface.cjs.js.map +0 -1
- package/lib/config/types/registry-options.interface.cjs.js +0 -2
- package/lib/config/types/registry-options.interface.cjs.js.map +0 -1
- package/lib/config/types/selection-change.interface.cjs.js +0 -2
- package/lib/config/types/selection-change.interface.cjs.js.map +0 -1
- package/lib/config/types/toolbar-item.interface.cjs.js +0 -2
- package/lib/config/types/toolbar-item.interface.cjs.js.map +0 -1
- package/lib/config/types/validate-error.interface.cjs.js +0 -2
- package/lib/config/types/validate-error.interface.cjs.js.map +0 -1
- package/lib/modules/custom-image/BlotFormatter.cjs.js.map +0 -1
- package/lib/modules/custom-image/Options.cjs.js +0 -95
- package/lib/modules/custom-image/Options.cjs.js.map +0 -1
- package/lib/modules/custom-image/actions/Action.cjs.js +0 -15
- package/lib/modules/custom-image/actions/Action.cjs.js.map +0 -1
- package/lib/modules/custom-image/actions/DeleteAction.cjs.js.map +0 -1
- package/lib/modules/custom-image/image-bar.cjs.js +0 -127
- package/lib/modules/custom-image/image-bar.cjs.js.map +0 -1
- package/lib/modules/custom-image/specs/BlotSpec.cjs.js +0 -27
- package/lib/modules/custom-image/specs/BlotSpec.cjs.js.map +0 -1
- package/lib/modules/custom-image/specs/CustomImageSpec.cjs.js.map +0 -1
- package/lib/modules/custom-image/specs/ImageSpec.cjs.js +0 -29
- package/lib/modules/custom-image/specs/ImageSpec.cjs.js.map +0 -1
- package/lib/modules/emoji/emoji-list/index.cjs.js +0 -5
- package/lib/modules/emoji/emoji-list/people.cjs.js +0 -114
- package/lib/modules/emoji/emoji-list/people.cjs.js.map +0 -1
- package/lib/modules/emoji/emoji-list.cjs.js +0 -9
- package/lib/modules/emoji/emoji-list.cjs.js.map +0 -1
- package/lib/modules/emoji/emoji-map.cjs.js +0 -9
- package/lib/modules/emoji/emoji-map.cjs.js.map +0 -1
- package/lib/modules/emoji/emoji-sprite.cjs.js +0 -5
- package/lib/modules/emoji/emoji-sprite.cjs.js.map +0 -1
- package/lib/modules/emoji/formats/emoji-blot.cjs.js +0 -41
- package/lib/modules/emoji/formats/emoji-blot.cjs.js.map +0 -1
- package/lib/modules/emoji/index.cjs.js +0 -8
- package/lib/modules/emoji/index.cjs.js.map +0 -1
- package/lib/modules/emoji/modules/emoji.cjs.js +0 -248
- package/lib/modules/emoji/modules/emoji.cjs.js.map +0 -1
- package/lib/modules/emoji/modules/toolbar-emoji.cjs.js +0 -153
- package/lib/modules/emoji/modules/toolbar-emoji.cjs.js.map +0 -1
- package/lib/modules/emoji/utils.cjs.js +0 -19
- package/lib/modules/emoji/utils.cjs.js.map +0 -1
- package/lib/modules/mention/Mention.cjs.js.map +0 -1
- package/lib/modules/mention/MentionLink.cjs.js.map +0 -1
package/README.md
CHANGED
|
@@ -6,6 +6,8 @@
|
|
|
6
6
|
|
|
7
7
|
<!-- ALL-CONTRIBUTORS-BADGE:END -->
|
|
8
8
|
|
|
9
|
+
[](https://deepwiki.com/opentiny/tiny-editor)
|
|
10
|
+
|
|
9
11
|
TinyEditor is a rich text editor based on Quill 2.0, which extends Quill with rich modules and formats such as table, image, link, clipboard, emoji, file, mention, and quick menu. It is framework-independent, compatible with Quill API, and compatible with Quill module ecosystem.
|
|
10
12
|
|
|
11
13
|
English | [简体中文](README.zh-CN.md)
|
|
@@ -66,30 +68,11 @@ Open your browser and visit: [http://localhost:5173/tiny-editor/](http://localho
|
|
|
66
68
|
|
|
67
69
|
## Contributors ✨
|
|
68
70
|
|
|
69
|
-
Contributors are community members who have
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
<!-- prettier-ignore-start -->
|
|
75
|
-
<!-- markdownlint-disable -->
|
|
76
|
-
<table>
|
|
77
|
-
<tbody>
|
|
78
|
-
<tr>
|
|
79
|
-
<td align="center" valign="top" width="14.28%"><a href="https://github.com/zzxming"><img src="https://avatars.githubusercontent.com/u/74341337?v=4?s=100" width="100px;" alt="zzxming"/><br /><sub><b>zzxming</b></sub></a><br /><a href="https://github.com/opentiny/tiny-editor/commits?author=zzxming" title="Code">💻</a></td>
|
|
80
|
-
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Janson1012"><img src="https://avatars.githubusercontent.com/u/60996238?v=4?s=100" width="100px;" alt="Janson1012"/><br /><sub><b>Janson1012</b></sub></a><br /><a href="https://github.com/opentiny/tiny-editor/commits?author=Janson1012" title="Code">💻</a></td>
|
|
81
|
-
<td align="center" valign="top" width="14.28%"><a href="https://kagol.github.io/blogs"><img src="https://avatars.githubusercontent.com/u/9566362?v=4?s=100" width="100px;" alt="Kagol"/><br /><sub><b>Kagol</b></sub></a><br /><a href="https://github.com/opentiny/tiny-editor/commits?author=kagol" title="Code">💻</a></td>
|
|
82
|
-
<td align="center" valign="top" width="14.28%"><a href="https://github.com/kiss-keray"><img src="https://avatars.githubusercontent.com/u/24504763?v=4?s=100" width="100px;" alt="keray"/><br /><sub><b>keray</b></sub></a><br /><a href="https://github.com/opentiny/tiny-editor/commits?author=kiss-keray" title="Code">💻</a></td>
|
|
83
|
-
<td align="center" valign="top" width="14.28%"><a href="https://github.com/qwangry"><img src="https://avatars.githubusercontent.com/u/58112936?v=4?s=100" width="100px;" alt="qwangry"/><br /><sub><b>qwangry</b></sub></a><br /><a href="https://github.com/opentiny/tiny-editor/commits?author=qwangry" title="Code">💻</a></td>
|
|
84
|
-
<td align="center" valign="top" width="14.28%"><a href="https://github.com/jany55555"><img src="https://avatars.githubusercontent.com/u/173228510?v=4?s=100" width="100px;" alt="jany55555"/><br /><sub><b>jany55555</b></sub></a><br /><a href="https://github.com/opentiny/tiny-editor/commits?author=jany55555" title="Code">💻</a></td>
|
|
85
|
-
</tr>
|
|
86
|
-
</tbody>
|
|
87
|
-
</table>
|
|
88
|
-
|
|
89
|
-
<!-- markdownlint-restore -->
|
|
90
|
-
<!-- prettier-ignore-end -->
|
|
91
|
-
|
|
92
|
-
<!-- ALL-CONTRIBUTORS-LIST:END -->
|
|
71
|
+
Contributors are community members who have made contributions in OpenTiny.
|
|
72
|
+
|
|
73
|
+
<a href="https://www.openomy.com/github/opentiny/tiny-editor" target="_blank" style="display: block; width: 100%;" align="center">
|
|
74
|
+
<img src="https://www.openomy.com/svg?repo=opentiny/tiny-editor&chart=bubble&latestMonth=99" target="_blank" alt="Contribution Leaderboard" style="display: block; width: 100%;" />
|
|
75
|
+
</a>
|
|
93
76
|
|
|
94
77
|
## Credits ❤️
|
|
95
78
|
|
|
@@ -121,7 +121,6 @@ function isInside(position, dom) {
|
|
|
121
121
|
const inside = left > areaLeft && left < areaLeft + areaWidth && top > areaTop && top < areaTop + areaHeight;
|
|
122
122
|
return inside;
|
|
123
123
|
}
|
|
124
|
-
const isPureIE = !!document.documentMode;
|
|
125
124
|
export {
|
|
126
125
|
getEventComposedPath,
|
|
127
126
|
hadProtocol,
|
|
@@ -130,7 +129,6 @@ export {
|
|
|
130
129
|
imageUrlToFile,
|
|
131
130
|
isInside,
|
|
132
131
|
isNullOrUndefined,
|
|
133
|
-
isPureIE,
|
|
134
132
|
omit,
|
|
135
133
|
replaceDeltaImage,
|
|
136
134
|
sanitize,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editor.utils.es.js","sources":["../../../src/config/editor.utils.ts"],"sourcesContent":["import Quill from 'quill'\r\n\r\nconst Delta = Quill.import('delta')\r\n\r\n// color hex to rgba\r\nexport function hexToRgbA(hex: string) {\r\n let color\r\n if (/^#([A-Fa-f0-9]{3}){1,2}$/.test(hex)) {\r\n color = hex.substring(1).split('')\r\n if (color.length === 3) {\r\n color = [color[0], color[0], color[1], color[1], color[2], color[2]]\r\n }\r\n color = `0x${color.join('')}`\r\n return (\r\n `rgba(${\r\n [(color >> 16) & 255, (color >> 8) & 255, color & 255].join(',')\r\n },1)`\r\n )\r\n }\r\n}\r\n\r\n/**\r\n * 将File格式的图片转换成Url格式\r\n * @param imageFile File格式的图片\r\n */\r\nexport function imageFileToUrl(imageFile) {\r\n return new Promise((resolve, reject) => {\r\n const reader = new FileReader()\r\n reader.readAsDataURL(imageFile)\r\n reader.onload = function (e) {\r\n resolve(e.target.result)\r\n }\r\n reader.onerror = reject\r\n }).catch((error) => {\r\n console.error('Error reading file:', error)\r\n })\r\n}\r\n\r\n/**\r\n * 将Url格式的图片转换成File格式\r\n * @param imageUrl 图片的URL\r\n */\r\nexport function imageUrlToFile(imageUrl, isErrorImage?: boolean) {\r\n return new Promise((resolve, reject) => {\r\n fetch(imageUrl, {\r\n method: 'get',\r\n mode: 'no-cors',\r\n })\r\n .then(res => res.blob())\r\n .then((blob) => {\r\n if (!blob.type.includes('image') || !blob.type) {\r\n return reject()\r\n }\r\n const fileType = blob.type.replace(/^.*\\//, '')\r\n const fileName = isErrorImage\r\n ? 'editorx-error-image.png'\r\n : `image-${new Date().getTime()}.${fileType}`\r\n const file = new File([blob], fileName, blob)\r\n resolve(file)\r\n })\r\n .catch(reject)\r\n })\r\n}\r\n\r\nexport function isNullOrUndefined(param) {\r\n return param === null || param === undefined\r\n}\r\n\r\n/**\r\n * omit\r\n * @param obj target Object\r\n * @param uselessKeys keys of removed properties\r\n * @return new Object without useless properties\r\n */\r\nexport function omit(obj, uselessKeys) {\r\n return (\r\n obj\r\n && Object.keys(obj).reduce((acc, key) => {\r\n return uselessKeys.includes(key) ? acc : { ...acc, [key]: obj[key] }\r\n }, {})\r\n )\r\n}\r\n\r\n/**\r\n * 将delta中的图片替换成制定的图片数组,用于图片上传到服务器的场景\r\n * @param delta 原始delta\r\n * @param imageUrls 图片数组\r\n * @param imagePlaceholder 标识是否是占位图的数组,与图片数组一一对应\r\n * @return 替换之后的delta\r\n */\r\nexport function replaceDeltaImage(delta, imageUrls, imagePlaceholder) {\r\n let imageIndex = 0\r\n return delta.reduce((newDelta, op) => {\r\n if (op.insert.image && !op.insert.image.hasExisted) {\r\n const attributes = imagePlaceholder[imageIndex]\r\n ? { ...op.attributes, width: 'auto', height: 225 } // 占位图片应该固定大小\r\n : op.attributes\r\n newDelta.insert({ image: imageUrls[imageIndex] }, attributes)\r\n imageIndex++\r\n }\r\n else {\r\n newDelta.insert(op.insert, op.attributes)\r\n }\r\n return newDelta\r\n }, new Delta())\r\n}\r\n\r\nexport function splitWithBreak(insertContent: string) {\r\n const lines = []\r\n const insertStr = insertContent\r\n let start = 0\r\n for (let i = 0; i < insertContent.length; i++) {\r\n if (insertStr.charAt(i) === '\\n') {\r\n if (i === 0) {\r\n lines.push('\\n')\r\n }\r\n else {\r\n lines.push(insertStr.substring(start, i))\r\n lines.push('\\n')\r\n }\r\n start = i + 1\r\n }\r\n }\r\n\r\n const tailStr = insertStr.substring(start)\r\n if (tailStr) {\r\n lines.push(tailStr)\r\n }\r\n\r\n return lines\r\n}\r\n\r\n/**\r\n * getEventComposedPath\r\n * compatibility fixed for Event.path/Event.composedPath\r\n * Event.path is only for chrome/opera\r\n * Event.composedPath is for Safari, FF\r\n * Neither for Micro Edge\r\n * @return an array of event.path\r\n */\r\nexport function getEventComposedPath(evt) {\r\n let path\r\n // chrome, opera, safari, firefox\r\n path = evt.path || (evt.composedPath && evt.composedPath())\r\n\r\n // other: edge\r\n if (path === undefined && evt.target) {\r\n path = []\r\n let target = evt.target\r\n path.push(target)\r\n\r\n while (target && target.parentNode) {\r\n target = target.parentNode\r\n path.push(target)\r\n }\r\n }\r\n\r\n return path\r\n}\r\n\r\nexport function sanitize(url, protocols) {\r\n const anchor = document.createElement('a')\r\n anchor.href = url\r\n const protocol = anchor.href.slice(0, anchor.href.indexOf(':'))\r\n return protocols.includes(protocol)\r\n}\r\n\r\nexport function hadProtocol(url: string) {\r\n if (!url || !/^(?:f|ht)tps?\\:\\/\\//.test(url)) {\r\n return false\r\n }\r\n return true\r\n}\r\n\r\nexport function isInside(position, dom) {\r\n const areaPosition = dom.getBoundingClientRect()\r\n const { pageX, pageY } = position\r\n // getBoundingClientRect是不考虑窗口滚动的\r\n const left = pageX - window.scrollX\r\n const top = pageY - window.scrollY\r\n const {\r\n left: areaLeft,\r\n top: areaTop,\r\n width: areaWidth,\r\n height: areaHeight,\r\n } = areaPosition\r\n const inside\r\n = left > areaLeft\r\n && left < areaLeft + areaWidth\r\n && top > areaTop\r\n && top < areaTop + areaHeight\r\n return inside\r\n}\r\n
|
|
1
|
+
{"version":3,"file":"editor.utils.es.js","sources":["../../../src/config/editor.utils.ts"],"sourcesContent":["import Quill from 'quill'\r\n\r\nconst Delta = Quill.import('delta')\r\n\r\n// color hex to rgba\r\nexport function hexToRgbA(hex: string) {\r\n let color\r\n if (/^#([A-Fa-f0-9]{3}){1,2}$/.test(hex)) {\r\n color = hex.substring(1).split('')\r\n if (color.length === 3) {\r\n color = [color[0], color[0], color[1], color[1], color[2], color[2]]\r\n }\r\n color = `0x${color.join('')}`\r\n return (\r\n `rgba(${\r\n [(color >> 16) & 255, (color >> 8) & 255, color & 255].join(',')\r\n },1)`\r\n )\r\n }\r\n}\r\n\r\n/**\r\n * 将File格式的图片转换成Url格式\r\n * @param imageFile File格式的图片\r\n */\r\nexport function imageFileToUrl(imageFile) {\r\n return new Promise((resolve, reject) => {\r\n const reader = new FileReader()\r\n reader.readAsDataURL(imageFile)\r\n reader.onload = function (e) {\r\n resolve(e.target.result)\r\n }\r\n reader.onerror = reject\r\n }).catch((error) => {\r\n console.error('Error reading file:', error)\r\n })\r\n}\r\n\r\n/**\r\n * 将Url格式的图片转换成File格式\r\n * @param imageUrl 图片的URL\r\n */\r\nexport function imageUrlToFile(imageUrl, isErrorImage?: boolean) {\r\n return new Promise((resolve, reject) => {\r\n fetch(imageUrl, {\r\n method: 'get',\r\n mode: 'no-cors',\r\n })\r\n .then(res => res.blob())\r\n .then((blob) => {\r\n if (!blob.type.includes('image') || !blob.type) {\r\n return reject()\r\n }\r\n const fileType = blob.type.replace(/^.*\\//, '')\r\n const fileName = isErrorImage\r\n ? 'editorx-error-image.png'\r\n : `image-${new Date().getTime()}.${fileType}`\r\n const file = new File([blob], fileName, blob)\r\n resolve(file)\r\n })\r\n .catch(reject)\r\n })\r\n}\r\n\r\nexport function isNullOrUndefined(param) {\r\n return param === null || param === undefined\r\n}\r\n\r\n/**\r\n * omit\r\n * @param obj target Object\r\n * @param uselessKeys keys of removed properties\r\n * @return new Object without useless properties\r\n */\r\nexport function omit(obj, uselessKeys) {\r\n return (\r\n obj\r\n && Object.keys(obj).reduce((acc, key) => {\r\n return uselessKeys.includes(key) ? acc : { ...acc, [key]: obj[key] }\r\n }, {})\r\n )\r\n}\r\n\r\n/**\r\n * 将delta中的图片替换成制定的图片数组,用于图片上传到服务器的场景\r\n * @param delta 原始delta\r\n * @param imageUrls 图片数组\r\n * @param imagePlaceholder 标识是否是占位图的数组,与图片数组一一对应\r\n * @return 替换之后的delta\r\n */\r\nexport function replaceDeltaImage(delta, imageUrls, imagePlaceholder) {\r\n let imageIndex = 0\r\n return delta.reduce((newDelta, op) => {\r\n if (op.insert.image && !op.insert.image.hasExisted) {\r\n const attributes = imagePlaceholder[imageIndex]\r\n ? { ...op.attributes, width: 'auto', height: 225 } // 占位图片应该固定大小\r\n : op.attributes\r\n newDelta.insert({ image: imageUrls[imageIndex] }, attributes)\r\n imageIndex++\r\n }\r\n else {\r\n newDelta.insert(op.insert, op.attributes)\r\n }\r\n return newDelta\r\n }, new Delta())\r\n}\r\n\r\nexport function splitWithBreak(insertContent: string) {\r\n const lines = []\r\n const insertStr = insertContent\r\n let start = 0\r\n for (let i = 0; i < insertContent.length; i++) {\r\n if (insertStr.charAt(i) === '\\n') {\r\n if (i === 0) {\r\n lines.push('\\n')\r\n }\r\n else {\r\n lines.push(insertStr.substring(start, i))\r\n lines.push('\\n')\r\n }\r\n start = i + 1\r\n }\r\n }\r\n\r\n const tailStr = insertStr.substring(start)\r\n if (tailStr) {\r\n lines.push(tailStr)\r\n }\r\n\r\n return lines\r\n}\r\n\r\n/**\r\n * getEventComposedPath\r\n * compatibility fixed for Event.path/Event.composedPath\r\n * Event.path is only for chrome/opera\r\n * Event.composedPath is for Safari, FF\r\n * Neither for Micro Edge\r\n * @return an array of event.path\r\n */\r\nexport function getEventComposedPath(evt) {\r\n let path\r\n // chrome, opera, safari, firefox\r\n path = evt.path || (evt.composedPath && evt.composedPath())\r\n\r\n // other: edge\r\n if (path === undefined && evt.target) {\r\n path = []\r\n let target = evt.target\r\n path.push(target)\r\n\r\n while (target && target.parentNode) {\r\n target = target.parentNode\r\n path.push(target)\r\n }\r\n }\r\n\r\n return path\r\n}\r\n\r\nexport function sanitize(url, protocols) {\r\n const anchor = document.createElement('a')\r\n anchor.href = url\r\n const protocol = anchor.href.slice(0, anchor.href.indexOf(':'))\r\n return protocols.includes(protocol)\r\n}\r\n\r\nexport function hadProtocol(url: string) {\r\n if (!url || !/^(?:f|ht)tps?\\:\\/\\//.test(url)) {\r\n return false\r\n }\r\n return true\r\n}\r\n\r\nexport function isInside(position, dom) {\r\n const areaPosition = dom.getBoundingClientRect()\r\n const { pageX, pageY } = position\r\n // getBoundingClientRect是不考虑窗口滚动的\r\n const left = pageX - window.scrollX\r\n const top = pageY - window.scrollY\r\n const {\r\n left: areaLeft,\r\n top: areaTop,\r\n width: areaWidth,\r\n height: areaHeight,\r\n } = areaPosition\r\n const inside\r\n = left > areaLeft\r\n && left < areaLeft + areaWidth\r\n && top > areaTop\r\n && top < areaTop + areaHeight\r\n return inside\r\n}\r\n"],"names":[],"mappings":";AAEA,MAAM,QAAQ,MAAM,OAAO,OAAO;AAG3B,SAAS,UAAU,KAAa;AACjC,MAAA;AACA,MAAA,2BAA2B,KAAK,GAAG,GAAG;AACxC,YAAQ,IAAI,UAAU,CAAC,EAAE,MAAM,EAAE;AAC7B,QAAA,MAAM,WAAW,GAAG;AACtB,cAAQ,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,GAAG,MAAM,CAAC,GAAG,MAAM,CAAC,GAAG,MAAM,CAAC,GAAG,MAAM,CAAC,CAAC;AAAA,IAAA;AAErE,YAAQ,KAAK,MAAM,KAAK,EAAE,CAAC;AAC3B,WACE,QACE,CAAE,SAAS,KAAM,KAAM,SAAS,IAAK,KAAK,QAAQ,GAAG,EAAE,KAAK,GAAG,CACjE;AAAA,EAAA;AAGN;AAMO,SAAS,eAAe,WAAW;AACxC,SAAO,IAAI,QAAQ,CAAC,SAAS,WAAW;AAChC,UAAA,SAAS,IAAI,WAAW;AAC9B,WAAO,cAAc,SAAS;AACvB,WAAA,SAAS,SAAU,GAAG;AACnB,cAAA,EAAE,OAAO,MAAM;AAAA,IACzB;AACA,WAAO,UAAU;AAAA,EAAA,CAClB,EAAE,MAAM,CAAC,UAAU;AACV,YAAA,MAAM,uBAAuB,KAAK;AAAA,EAAA,CAC3C;AACH;AAMgB,SAAA,eAAe,UAAU,cAAwB;AAC/D,SAAO,IAAI,QAAQ,CAAC,SAAS,WAAW;AACtC,UAAM,UAAU;AAAA,MACd,QAAQ;AAAA,MACR,MAAM;AAAA,IAAA,CACP,EACE,KAAK,CAAO,QAAA,IAAI,MAAM,EACtB,KAAK,CAAC,SAAS;AACV,UAAA,CAAC,KAAK,KAAK,SAAS,OAAO,KAAK,CAAC,KAAK,MAAM;AAC9C,eAAO,OAAO;AAAA,MAAA;AAEhB,YAAM,WAAW,KAAK,KAAK,QAAQ,SAAS,EAAE;AACxC,YAAA,WAAW,eACb,4BACA,UAAS,oBAAI,QAAO,QAAA,CAAS,IAAI,QAAQ;AAC7C,YAAM,OAAO,IAAI,KAAK,CAAC,IAAI,GAAG,UAAU,IAAI;AAC5C,cAAQ,IAAI;AAAA,IAAA,CACb,EACA,MAAM,MAAM;AAAA,EAAA,CAChB;AACH;AAEO,SAAS,kBAAkB,OAAO;AAChC,SAAA,UAAU,QAAQ,UAAU;AACrC;AAQgB,SAAA,KAAK,KAAK,aAAa;AAEnC,SAAA,OACG,OAAO,KAAK,GAAG,EAAE,OAAO,CAAC,KAAK,QAAQ;AACvC,WAAO,YAAY,SAAS,GAAG,IAAI,MAAM,EAAE,GAAG,KAAK,CAAC,GAAG,GAAG,IAAI,GAAG,EAAE;AAAA,EACrE,GAAG,EAAE;AAET;AASgB,SAAA,kBAAkB,OAAO,WAAW,kBAAkB;AACpE,MAAI,aAAa;AACjB,SAAO,MAAM,OAAO,CAAC,UAAU,OAAO;AACpC,QAAI,GAAG,OAAO,SAAS,CAAC,GAAG,OAAO,MAAM,YAAY;AAClD,YAAM,aAAa,iBAAiB,UAAU,IAC1C,EAAE,GAAG,GAAG,YAAY,OAAO,QAAQ,QAAQ,QAC3C,GAAG;AACP,eAAS,OAAO,EAAE,OAAO,UAAU,UAAU,KAAK,UAAU;AAC5D;AAAA,IAAA,OAEG;AACH,eAAS,OAAO,GAAG,QAAQ,GAAG,UAAU;AAAA,IAAA;AAEnC,WAAA;AAAA,EAAA,GACN,IAAI,MAAA,CAAO;AAChB;AAEO,SAAS,eAAe,eAAuB;AACpD,QAAM,QAAQ,CAAC;AACf,QAAM,YAAY;AAClB,MAAI,QAAQ;AACZ,WAAS,IAAI,GAAG,IAAI,cAAc,QAAQ,KAAK;AAC7C,QAAI,UAAU,OAAO,CAAC,MAAM,MAAM;AAChC,UAAI,MAAM,GAAG;AACX,cAAM,KAAK,IAAI;AAAA,MAAA,OAEZ;AACH,cAAM,KAAK,UAAU,UAAU,OAAO,CAAC,CAAC;AACxC,cAAM,KAAK,IAAI;AAAA,MAAA;AAEjB,cAAQ,IAAI;AAAA,IAAA;AAAA,EACd;AAGI,QAAA,UAAU,UAAU,UAAU,KAAK;AACzC,MAAI,SAAS;AACX,UAAM,KAAK,OAAO;AAAA,EAAA;AAGb,SAAA;AACT;AAUO,SAAS,qBAAqB,KAAK;AACpC,MAAA;AAEJ,SAAO,IAAI,QAAS,IAAI,gBAAgB,IAAI,aAAa;AAGrD,MAAA,SAAS,UAAa,IAAI,QAAQ;AACpC,WAAO,CAAC;AACR,QAAI,SAAS,IAAI;AACjB,SAAK,KAAK,MAAM;AAET,WAAA,UAAU,OAAO,YAAY;AAClC,eAAS,OAAO;AAChB,WAAK,KAAK,MAAM;AAAA,IAAA;AAAA,EAClB;AAGK,SAAA;AACT;AAEgB,SAAA,SAAS,KAAK,WAAW;AACjC,QAAA,SAAS,SAAS,cAAc,GAAG;AACzC,SAAO,OAAO;AACR,QAAA,WAAW,OAAO,KAAK,MAAM,GAAG,OAAO,KAAK,QAAQ,GAAG,CAAC;AACvD,SAAA,UAAU,SAAS,QAAQ;AACpC;AAEO,SAAS,YAAY,KAAa;AACvC,MAAI,CAAC,OAAO,CAAC,sBAAsB,KAAK,GAAG,GAAG;AACrC,WAAA;AAAA,EAAA;AAEF,SAAA;AACT;AAEgB,SAAA,SAAS,UAAU,KAAK;AAChC,QAAA,eAAe,IAAI,sBAAsB;AACzC,QAAA,EAAE,OAAO,MAAA,IAAU;AAEnB,QAAA,OAAO,QAAQ,OAAO;AACtB,QAAA,MAAM,QAAQ,OAAO;AACrB,QAAA;AAAA,IACJ,MAAM;AAAA,IACN,KAAK;AAAA,IACL,OAAO;AAAA,IACP,QAAQ;AAAA,EAAA,IACN;AACE,QAAA,SACF,OAAO,YACJ,OAAO,WAAW,aAClB,MAAM,WACN,MAAM,UAAU;AAChB,SAAA;AACT;"}
|
package/es/config/index.es.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { isNullOrUndefined } from "./editor.utils.es.js";
|
|
2
|
-
import { getEventComposedPath, hadProtocol, hexToRgbA, imageFileToUrl, imageUrlToFile, isInside,
|
|
2
|
+
import { getEventComposedPath, hadProtocol, hexToRgbA, imageFileToUrl, imageUrlToFile, isInside, omit, replaceDeltaImage, sanitize, splitWithBreak } from "./editor.utils.es.js";
|
|
3
3
|
import { AUDIO_VIDEO_UPLOADER_MIME_TYPES, BIG_DELTA_LIMIT, CHANGE_LANGUAGE_EVENT, COMPRESSED_UPLOADER_MIME_TYPES, DOC_UPLOADER_MIME_TYPES, FILE_UPLOADER_MIME_TYPES, IMAGE_UPLOADER_MIME_TYPES, OTHER_FILE_UPLOADER_MIME_TYPES, PPT_UPLOADER_MIME_TYPES, XSL_UPLOADER_MIME_TYPES, defaultLanguage } from "./editor.config.es.js";
|
|
4
|
+
import "./types/index.es.js";
|
|
4
5
|
function inputFile(type, accept) {
|
|
5
6
|
if (accept.length <= 0) return;
|
|
6
7
|
let fileInput = this.container.querySelector(`input.ql-${type}[type=file]`);
|
|
@@ -55,7 +56,6 @@ export {
|
|
|
55
56
|
inputFile,
|
|
56
57
|
isInside,
|
|
57
58
|
isNullOrUndefined,
|
|
58
|
-
isPureIE,
|
|
59
59
|
namespace,
|
|
60
60
|
omit,
|
|
61
61
|
replaceDeltaImage,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es.js","sources":["../../../src/config/index.ts"],"sourcesContent":["import { isNullOrUndefined } from './editor.utils'\r\n\r\nexport * from './editor.config'\r\nexport * from './editor.utils'\r\n\r\n// 触发上传\r\nexport function inputFile(type: 'image' | 'video' | 'file', accept: string[]) {\r\n if (accept.length <= 0) return\r\n let fileInput = this.container.querySelector(`input.ql-${type}[type=file]`)\r\n if (isNullOrUndefined(fileInput)) {\r\n fileInput = document.createElement('input')\r\n fileInput.style.display = 'none'\r\n fileInput.classList.add(`ql-${type}`)\r\n fileInput.setAttribute('type', 'file')\r\n fileInput.setAttribute('accept', accept.map(mime => mime === '*' ? `${type}/*` : mime).join(','))\r\n fileInput.setAttribute('multiple', '')\r\n fileInput.addEventListener('change', () => {\r\n const range = this.quill.getSelection(true)\r\n this.quill.uploader.upload(range, fileInput.files)\r\n fileInput.value = ''\r\n })\r\n this.container.appendChild(fileInput)\r\n }\r\n fileInput.click()\r\n}\r\n\r\nexport function getListValue(value, preListValue) {\r\n let curListValue = value\r\n if (preListValue && preListValue === value) {\r\n curListValue = false\r\n }\r\n else if (value === 'check') {\r\n if (preListValue === 'checked' || preListValue === 'unchecked') {\r\n curListValue = false\r\n }\r\n else {\r\n curListValue = 'unchecked'\r\n }\r\n }\r\n return curListValue\r\n}\r\n/** css namespace */\r\nexport const namespace = 'fe'\r\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.es.js","sources":["../../../src/config/index.ts"],"sourcesContent":["import { isNullOrUndefined } from './editor.utils'\r\n\r\nexport * from './editor.config'\r\nexport * from './editor.utils'\r\nexport * from './types'\r\n\r\n// 触发上传\r\nexport function inputFile(type: 'image' | 'video' | 'file', accept: string[]) {\r\n if (accept.length <= 0) return\r\n let fileInput = this.container.querySelector(`input.ql-${type}[type=file]`)\r\n if (isNullOrUndefined(fileInput)) {\r\n fileInput = document.createElement('input')\r\n fileInput.style.display = 'none'\r\n fileInput.classList.add(`ql-${type}`)\r\n fileInput.setAttribute('type', 'file')\r\n fileInput.setAttribute('accept', accept.map(mime => mime === '*' ? `${type}/*` : mime).join(','))\r\n fileInput.setAttribute('multiple', '')\r\n fileInput.addEventListener('change', () => {\r\n const range = this.quill.getSelection(true)\r\n this.quill.uploader.upload(range, fileInput.files)\r\n fileInput.value = ''\r\n })\r\n this.container.appendChild(fileInput)\r\n }\r\n fileInput.click()\r\n}\r\n\r\nexport function getListValue(value, preListValue) {\r\n let curListValue = value\r\n if (preListValue && preListValue === value) {\r\n curListValue = false\r\n }\r\n else if (value === 'check') {\r\n if (preListValue === 'checked' || preListValue === 'unchecked') {\r\n curListValue = false\r\n }\r\n else {\r\n curListValue = 'unchecked'\r\n }\r\n }\r\n return curListValue\r\n}\r\n/** css namespace */\r\nexport const namespace = 'fe'\r\n"],"names":[],"mappings":";;;;AAOgB,SAAA,UAAU,MAAkC,QAAkB;AACxE,MAAA,OAAO,UAAU,EAAG;AACxB,MAAI,YAAY,KAAK,UAAU,cAAc,YAAY,IAAI,aAAa;AACtE,MAAA,kBAAkB,SAAS,GAAG;AACpB,gBAAA,SAAS,cAAc,OAAO;AAC1C,cAAU,MAAM,UAAU;AAC1B,cAAU,UAAU,IAAI,MAAM,IAAI,EAAE;AAC1B,cAAA,aAAa,QAAQ,MAAM;AACrC,cAAU,aAAa,UAAU,OAAO,IAAI,UAAQ,SAAS,MAAM,GAAG,IAAI,OAAO,IAAI,EAAE,KAAK,GAAG,CAAC;AACtF,cAAA,aAAa,YAAY,EAAE;AAC3B,cAAA,iBAAiB,UAAU,MAAM;AACzC,YAAM,QAAQ,KAAK,MAAM,aAAa,IAAI;AAC1C,WAAK,MAAM,SAAS,OAAO,OAAO,UAAU,KAAK;AACjD,gBAAU,QAAQ;AAAA,IAAA,CACnB;AACI,SAAA,UAAU,YAAY,SAAS;AAAA,EAAA;AAEtC,YAAU,MAAM;AAClB;AAEgB,SAAA,aAAa,OAAO,cAAc;AAChD,MAAI,eAAe;AACf,MAAA,gBAAgB,iBAAiB,OAAO;AAC3B,mBAAA;AAAA,EAAA,WAER,UAAU,SAAS;AACtB,QAAA,iBAAiB,aAAa,iBAAiB,aAAa;AAC/C,qBAAA;AAAA,IAAA,OAEZ;AACY,qBAAA;AAAA,IAAA;AAAA,EACjB;AAEK,SAAA;AACT;AAEO,MAAM,YAAY;"}
|
|
@@ -1,24 +1,4 @@
|
|
|
1
|
-
import "./additional-toolbar-item.interface.es.js";
|
|
2
|
-
import "./content-change.interface.es.js";
|
|
3
|
-
import "./content-save.interface.es.js";
|
|
4
|
-
import "./counter-option.interface.es.js";
|
|
5
1
|
import "./editor-config.interface.es.js";
|
|
6
2
|
import "./editor-modules.interface.es.js";
|
|
7
|
-
import "./editor-toolbar.interface.es.js";
|
|
8
|
-
import "./file-operation.interface.es.js";
|
|
9
|
-
import "./focus-change.interface.es.js";
|
|
10
|
-
import "./fullscreen-module.interface.es.js";
|
|
11
|
-
import "./help-panel-option.interface.es.js";
|
|
12
|
-
import "./image-module.interface.es.js";
|
|
13
|
-
import "./image-upload.interface.es.js";
|
|
14
|
-
import "./load-on-demand-module.interface.es.js";
|
|
15
|
-
import "./mention-module.interface.es.js";
|
|
16
|
-
import "./paste-change.interface.es.js";
|
|
17
|
-
import "./quick-menu-module.interface.es.js";
|
|
18
|
-
import "./range.interface.es.js";
|
|
19
|
-
import "./registry-options.interface.es.js";
|
|
20
|
-
import "./selection-change.interface.es.js";
|
|
21
|
-
import "./toolbar-item.interface.es.js";
|
|
22
3
|
import "./type.es.js";
|
|
23
|
-
import "./validate-error.interface.es.js";
|
|
24
4
|
//# sourceMappingURL=index.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
1
4
|
import Quill from "quill";
|
|
2
5
|
import "../config/index.es.js";
|
|
3
6
|
import { I18N } from "../modules/i18n.es.js";
|
|
@@ -5,7 +8,7 @@ import { defaultLanguage } from "../config/editor.config.es.js";
|
|
|
5
8
|
class FluentEditor extends Quill {
|
|
6
9
|
constructor(container, options = {}) {
|
|
7
10
|
super(container, options);
|
|
8
|
-
this
|
|
11
|
+
__publicField(this, "isFullscreen", false);
|
|
9
12
|
}
|
|
10
13
|
static register(...args) {
|
|
11
14
|
super.register(...args);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fluent-editor.es.js","sources":["../../../src/core/fluent-editor.ts"],"sourcesContent":["import type { ExpandedQuillOptions } from 'quill'\r\nimport type { IEditorConfig } from '../config/types'\r\nimport type { FileUploader } from '../modules/custom-uploader'\r\nimport Quill from 'quill'\r\nimport { defaultLanguage } from '../config'\r\nimport I18N from '../modules/i18n'\r\n\r\nclass FluentEditor extends Quill {\r\n isFullscreen: boolean = false\r\n options: IEditorConfig & ExpandedQuillOptions\r\n uploader: FileUploader\r\n\r\n static register(...args: any[]): void {\r\n super.register(...args as Parameters<typeof Quill.register>)\r\n }\r\n\r\n get lang() {\r\n const i18nModule = this.getModule('i18n') as I18N\r\n return i18nModule ? i18nModule.options.lang : defaultLanguage\r\n }\r\n\r\n constructor(container: HTMLElement | string, options: IEditorConfig = {}) {\r\n super(container, options)\r\n }\r\n\r\n getLangText(name: string) {\r\n return I18N.parserText(name, this.lang)\r\n }\r\n}\r\n\r\nexport
|
|
1
|
+
{"version":3,"file":"fluent-editor.es.js","sources":["../../../src/core/fluent-editor.ts"],"sourcesContent":["import type { ExpandedQuillOptions } from 'quill'\r\nimport type { IEditorConfig } from '../config/types'\r\nimport type { FileUploader } from '../modules/custom-uploader'\r\nimport Quill from 'quill'\r\nimport { defaultLanguage } from '../config'\r\nimport I18N from '../modules/i18n'\r\n\r\nclass FluentEditor extends Quill {\r\n isFullscreen: boolean = false\r\n declare options: IEditorConfig & ExpandedQuillOptions\r\n declare uploader: FileUploader\r\n\r\n static register(...args: any[]): void {\r\n super.register(...args as Parameters<typeof Quill.register>)\r\n }\r\n\r\n get lang() {\r\n const i18nModule = this.getModule('i18n') as I18N\r\n return i18nModule ? i18nModule.options.lang : defaultLanguage\r\n }\r\n\r\n constructor(container: HTMLElement | string, options: IEditorConfig = {}) {\r\n super(container, options)\r\n }\r\n\r\n getLangText(name: string) {\r\n return I18N.parserText(name, this.lang)\r\n }\r\n}\r\n\r\nexport default FluentEditor\r\n"],"names":[],"mappings":";;;;;;;AAOA,MAAM,qBAAqB,MAAM;AAAA,EAc/B,YAAY,WAAiC,UAAyB,IAAI;AACxE,UAAM,WAAW,OAAO;AAd1B,wCAAwB;AAAA,EAcE;AAAA,EAV1B,OAAO,YAAY,MAAmB;AAC9B,UAAA,SAAS,GAAG,IAAyC;AAAA,EAAA;AAAA,EAG7D,IAAI,OAAO;AACH,UAAA,aAAa,KAAK,UAAU,MAAM;AACjC,WAAA,aAAa,WAAW,QAAQ,OAAO;AAAA,EAAA;AAAA,EAOhD,YAAY,MAAc;AACxB,WAAO,KAAK,WAAW,MAAM,KAAK,IAAI;AAAA,EAAA;AAE1C;"}
|
package/es/fluent-editor.es.js
CHANGED
|
@@ -2,31 +2,39 @@ import "./attributors/index.es.js";
|
|
|
2
2
|
import { EN_US } from "./config/i18n/en-us.es.js";
|
|
3
3
|
import { ZH_CN } from "./config/i18n/zh-cn.es.js";
|
|
4
4
|
import FluentEditor from "./core/fluent-editor.es.js";
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import Video from "./formats/video.es.js";
|
|
5
|
+
import "./formats/index.es.js";
|
|
6
|
+
import { AI } from "./modules/ai/index.es.js";
|
|
8
7
|
import Counter from "./modules/counter.es.js";
|
|
9
|
-
import CustomClipboard from "./modules/custom-clipboard.es.js";
|
|
10
|
-
import
|
|
8
|
+
import { CustomClipboard } from "./modules/custom-clipboard.es.js";
|
|
9
|
+
import "./modules/custom-image/index.es.js";
|
|
11
10
|
import { FileUploader } from "./modules/custom-uploader.es.js";
|
|
12
|
-
import DividerBlot from "./modules/divider.es.js";
|
|
13
|
-
import
|
|
14
|
-
import
|
|
11
|
+
import { DividerBlot } from "./modules/divider.es.js";
|
|
12
|
+
import { EmojiModule } from "./modules/emoji.es.js";
|
|
13
|
+
import "./modules/file/index.es.js";
|
|
15
14
|
import { I18N } from "./modules/i18n.es.js";
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import Mention from "./modules/mention/Mention.es.js";
|
|
15
|
+
import "./modules/link/index.es.js";
|
|
16
|
+
import "./modules/mathlive/index.es.js";
|
|
17
|
+
import "./modules/mention/index.es.js";
|
|
20
18
|
import { ShortCutKey } from "./modules/shortcut-key/index.es.js";
|
|
21
19
|
import CustomSyntax from "./modules/syntax.es.js";
|
|
22
|
-
import
|
|
20
|
+
import "./modules/toolbar/index.es.js";
|
|
23
21
|
import { Picker, ColorPicker } from "./modules/toolbar/better-picker.es.js";
|
|
24
22
|
import SnowTheme from "./themes/snow.es.js";
|
|
25
23
|
import Icons from "./ui/icons.es.js";
|
|
26
24
|
import { FontStyle } from "./attributors/font-style.es.js";
|
|
27
25
|
import { SizeStyle } from "./attributors/font-size.es.js";
|
|
28
26
|
import { LineHeightStyle } from "./attributors/line-height.es.js";
|
|
27
|
+
import { EmojiBlot } from "./formats/emoji.es.js";
|
|
28
|
+
import { SoftBreak } from "./formats/soft-break.es.js";
|
|
29
|
+
import { StrikeBlot } from "./formats/strike.es.js";
|
|
29
30
|
import { TextIndentStyle } from "./attributors/text-indent.es.js";
|
|
31
|
+
import { Video } from "./formats/video.es.js";
|
|
32
|
+
import { LinkBlot } from "./modules/link/formats/link.es.js";
|
|
33
|
+
import { FileModule } from "./modules/file/modules/file-module.es.js";
|
|
34
|
+
import { BlotFormatter } from "./modules/custom-image/blot-formatter.es.js";
|
|
35
|
+
import { MathliveModule } from "./modules/mathlive/module.es.js";
|
|
36
|
+
import { Mention } from "./modules/mention/mention.es.js";
|
|
37
|
+
import { BetterToolbar } from "./modules/toolbar/better-toolbar.es.js";
|
|
30
38
|
I18N.register(
|
|
31
39
|
{
|
|
32
40
|
"en-US": EN_US,
|
|
@@ -42,22 +50,21 @@ FluentEditor.register(
|
|
|
42
50
|
"formats/font": FontStyle,
|
|
43
51
|
"formats/line-height": LineHeightStyle,
|
|
44
52
|
"formats/size": SizeStyle,
|
|
45
|
-
"formats/emoji":
|
|
46
|
-
[`formats/${MathliveBlot.blotName}`]: MathliveBlot,
|
|
53
|
+
"formats/emoji": EmojiBlot,
|
|
47
54
|
"formats/softBreak": SoftBreak,
|
|
48
55
|
"formats/strike": StrikeBlot,
|
|
49
56
|
"formats/text-indent": TextIndentStyle,
|
|
50
57
|
"formats/video": Video,
|
|
58
|
+
"formats/divider": DividerBlot,
|
|
59
|
+
"formats/link": LinkBlot,
|
|
51
60
|
"modules/clipboard": CustomClipboard,
|
|
52
61
|
"modules/counter": Counter,
|
|
53
|
-
"modules/
|
|
54
|
-
"modules/emoji-shortname": Emoji.ShortNameEmoji,
|
|
55
|
-
"modules/emoji-toolbar": Emoji.ToolbarEmoji,
|
|
62
|
+
"modules/emoji": EmojiModule,
|
|
56
63
|
"modules/file": FileModule,
|
|
57
64
|
"modules/i18n": I18N,
|
|
58
65
|
"modules/image": BlotFormatter,
|
|
59
|
-
"modules/link": Link,
|
|
60
66
|
"modules/mathlive": MathliveModule,
|
|
67
|
+
"modules/ai": AI,
|
|
61
68
|
"modules/mention": Mention,
|
|
62
69
|
"modules/syntax": CustomSyntax,
|
|
63
70
|
"modules/toolbar": BetterToolbar,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fluent-editor.es.js","sources":["../../src/fluent-editor.ts"],"sourcesContent":["import { FontStyle, LineHeightStyle, SizeStyle, TextIndentStyle } from './attributors'\r\nimport { EN_US } from './config/i18n/en-us'\r\nimport { ZH_CN } from './config/i18n/zh-cn'\r\nimport FluentEditor from './core/fluent-editor'\r\nimport
|
|
1
|
+
{"version":3,"file":"fluent-editor.es.js","sources":["../../src/fluent-editor.ts"],"sourcesContent":["import { FontStyle, LineHeightStyle, SizeStyle, TextIndentStyle } from './attributors'\r\nimport { EN_US } from './config/i18n/en-us'\r\nimport { ZH_CN } from './config/i18n/zh-cn'\r\nimport FluentEditor from './core/fluent-editor'\r\nimport { EmojiBlot, SoftBreak, StrikeBlot, Video } from './formats'\r\nimport { AI } from './modules/ai' // AI\r\nimport Counter from './modules/counter' // 字符统计\r\nimport { CustomClipboard } from './modules/custom-clipboard' // 粘贴板\r\nimport { BlotFormatter } from './modules/custom-image' // 图片\r\nimport { FileUploader } from './modules/custom-uploader' // 上传\r\nimport { DividerBlot } from './modules/divider' // 分割线\r\nimport { EmojiModule } from './modules/emoji'\r\nimport { FileModule } from './modules/file' // 文件\r\nimport I18N from './modules/i18n'\r\nimport { LinkBlot } from './modules/link' // 超链接\r\nimport { MathliveModule } from './modules/mathlive' // latex公式\r\nimport { Mention } from './modules/mention' // @提醒\r\nimport { ShortCutKey } from './modules/shortcut-key'\r\nimport Syntax from './modules/syntax' // 代码块高亮\r\nimport { BetterToolbar } from './modules/toolbar' // 工具栏\r\nimport { ColorPicker, Picker } from './modules/toolbar/better-picker'\r\nimport SnowTheme from './themes/snow'\r\nimport Icons from './ui/icons'\r\n\r\nI18N.register(\r\n {\r\n 'en-US': EN_US,\r\n 'zh-CN': ZH_CN,\r\n },\r\n true,\r\n)\r\nFluentEditor.register(\r\n {\r\n 'attributors/style/font': FontStyle,\r\n 'attributors/style/size': SizeStyle,\r\n 'attributors/style/line-height': LineHeightStyle,\r\n\r\n 'formats/font': FontStyle,\r\n 'formats/line-height': LineHeightStyle,\r\n 'formats/size': SizeStyle,\r\n 'formats/emoji': EmojiBlot,\r\n 'formats/softBreak': SoftBreak,\r\n 'formats/strike': StrikeBlot,\r\n 'formats/text-indent': TextIndentStyle,\r\n 'formats/video': Video,\r\n 'formats/divider': DividerBlot,\r\n 'formats/link': LinkBlot,\r\n\r\n 'modules/clipboard': CustomClipboard,\r\n 'modules/counter': Counter,\r\n 'modules/emoji': EmojiModule,\r\n 'modules/file': FileModule,\r\n 'modules/i18n': I18N,\r\n 'modules/image': BlotFormatter,\r\n 'modules/mathlive': MathliveModule,\r\n 'modules/ai': AI,\r\n 'modules/mention': Mention,\r\n 'modules/syntax': Syntax,\r\n 'modules/toolbar': BetterToolbar,\r\n 'modules/uploader': FileUploader,\r\n 'modules/shortcut-key': ShortCutKey,\r\n\r\n 'themes/snow': SnowTheme,\r\n\r\n 'ui/icons': Icons,\r\n 'ui/picker': Picker,\r\n 'ui/color-picker': ColorPicker,\r\n },\r\n true, // 覆盖内部模块\r\n)\r\n\r\nexport default FluentEditor\r\n"],"names":["Syntax"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBA,KAAK;AAAA,EACH;AAAA,IACE,SAAS;AAAA,IACT,SAAS;AAAA,EACX;AAAA,EACA;AACF;AACA,aAAa;AAAA,EACX;AAAA,IACE,0BAA0B;AAAA,IAC1B,0BAA0B;AAAA,IAC1B,iCAAiC;AAAA,IAEjC,gBAAgB;AAAA,IAChB,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,iBAAiB;AAAA,IACjB,qBAAqB;AAAA,IACrB,kBAAkB;AAAA,IAClB,uBAAuB;AAAA,IACvB,iBAAiB;AAAA,IACjB,mBAAmB;AAAA,IACnB,gBAAgB;AAAA,IAEhB,qBAAqB;AAAA,IACrB,mBAAmB;AAAA,IACnB,iBAAiB;AAAA,IACjB,gBAAgB;AAAA,IAChB,gBAAgB;AAAA,IAChB,iBAAiB;AAAA,IACjB,oBAAoB;AAAA,IACpB,cAAc;AAAA,IACd,mBAAmB;AAAA,IACnB,kBAAkBA;AAAAA,IAClB,mBAAmB;AAAA,IACnB,oBAAoB;AAAA,IACpB,wBAAwB;AAAA,IAExB,eAAe;AAAA,IAEf,YAAY;AAAA,IACZ,aAAa;AAAA,IACb,mBAAmB;AAAA,EACrB;AAAA,EACA;AAAA;AACF;"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4
|
+
import Quill from "quill";
|
|
5
|
+
const Inline = Quill.import("blots/inline");
|
|
6
|
+
class EmojiBlot extends Inline {
|
|
7
|
+
}
|
|
8
|
+
__publicField(EmojiBlot, "blotName", "emoji");
|
|
9
|
+
__publicField(EmojiBlot, "tagName", "span");
|
|
10
|
+
__publicField(EmojiBlot, "className", "ql-emoji-format");
|
|
11
|
+
export {
|
|
12
|
+
EmojiBlot
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=emoji.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"emoji.es.js","sources":["../../../src/formats/emoji.ts"],"sourcesContent":["import type TypeInline from 'quill/blots/inline'\r\nimport Quill from 'quill'\r\n\r\nconst Inline = Quill.import('blots/inline') as typeof TypeInline\r\n\r\nexport class EmojiBlot extends Inline {\r\n static blotName = 'emoji'\r\n static tagName = 'span'\r\n static className = 'ql-emoji-format'\r\n}\r\n"],"names":[],"mappings":";;;;AAGA,MAAM,SAAS,MAAM,OAAO,cAAc;AAEnC,MAAM,kBAAkB,OAAO;AAItC;AAHE,cADW,WACJ,YAAW;AAClB,cAFW,WAEJ,WAAU;AACjB,cAHW,WAGJ,aAAY;"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { EmojiBlot } from "./emoji.es.js";
|
|
2
|
+
import { SoftBreak } from "./soft-break.es.js";
|
|
3
|
+
import { StrikeBlot } from "./strike.es.js";
|
|
4
|
+
import { Video } from "./video.es.js";
|
|
5
|
+
export {
|
|
6
|
+
EmojiBlot,
|
|
7
|
+
SoftBreak,
|
|
8
|
+
StrikeBlot,
|
|
9
|
+
Video
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=index.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
|
@@ -1,6 +1,13 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
1
4
|
import Quill from "quill";
|
|
2
|
-
const Embed = Quill.
|
|
5
|
+
const Embed = Quill.import("blots/embed");
|
|
3
6
|
class SoftBreak extends Embed {
|
|
7
|
+
constructor() {
|
|
8
|
+
super(...arguments);
|
|
9
|
+
__publicField(this, "remove");
|
|
10
|
+
}
|
|
4
11
|
static create() {
|
|
5
12
|
const node = super.create();
|
|
6
13
|
return node;
|
|
@@ -14,10 +21,10 @@ class SoftBreak extends Embed {
|
|
|
14
21
|
return 1;
|
|
15
22
|
}
|
|
16
23
|
}
|
|
17
|
-
SoftBreak
|
|
18
|
-
SoftBreak
|
|
19
|
-
SoftBreak
|
|
24
|
+
__publicField(SoftBreak, "blotName", "soft-break");
|
|
25
|
+
__publicField(SoftBreak, "tagName", "BR");
|
|
26
|
+
__publicField(SoftBreak, "className", "ql-soft-break");
|
|
20
27
|
export {
|
|
21
|
-
SoftBreak
|
|
28
|
+
SoftBreak
|
|
22
29
|
};
|
|
23
30
|
//# sourceMappingURL=soft-break.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"soft-break.es.js","sources":["../../../src/formats/soft-break.ts"],"sourcesContent":["import Quill from 'quill'\r\n\r\nconst Embed = Quill.
|
|
1
|
+
{"version":3,"file":"soft-break.es.js","sources":["../../../src/formats/soft-break.ts"],"sourcesContent":["import type TypeEmbed from 'quill/blots/embed'\r\nimport Quill from 'quill'\r\n\r\nconst Embed = Quill.import('blots/embed') as typeof TypeEmbed\r\n\r\nexport class SoftBreak extends Embed {\r\n static blotName = 'soft-break'\r\n static tagName = 'BR'\r\n static className = 'ql-soft-break'\r\n remove: () => void\r\n\r\n static create() {\r\n const node = super.create()\r\n return node\r\n }\r\n\r\n optimize() {\r\n // li的开头结尾,移除软回车\r\n if (this.prev === null) {\r\n this.remove()\r\n }\r\n }\r\n\r\n length() {\r\n return 1\r\n }\r\n}\r\n"],"names":[],"mappings":";;;;AAGA,MAAM,QAAQ,MAAM,OAAO,aAAa;AAEjC,MAAM,kBAAkB,MAAM;AAAA,EAA9B;AAAA;AAIL;AAAA;AAAA,EAEA,OAAO,SAAS;AACR,UAAA,OAAO,MAAM,OAAO;AACnB,WAAA;AAAA,EAAA;AAAA,EAGT,WAAW;AAEL,QAAA,KAAK,SAAS,MAAM;AACtB,WAAK,OAAO;AAAA,IAAA;AAAA,EACd;AAAA,EAGF,SAAS;AACA,WAAA;AAAA,EAAA;AAEX;AApBE,cADW,WACJ,YAAW;AAClB,cAFW,WAEJ,WAAU;AACjB,cAHW,WAGJ,aAAY;"}
|
package/es/formats/strike.es.js
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
1
4
|
import Quill from "quill";
|
|
2
|
-
const Inline = Quill.
|
|
5
|
+
const Inline = Quill.import("blots/inline");
|
|
3
6
|
class StrikeBlot extends Inline {
|
|
4
7
|
// 此处删除了formats方法,当前tag非span,则并不需要进行特殊处理去重写formats方法
|
|
5
8
|
}
|
|
6
|
-
StrikeBlot
|
|
7
|
-
StrikeBlot
|
|
8
|
-
StrikeBlot
|
|
9
|
+
__publicField(StrikeBlot, "blotName", "strike");
|
|
10
|
+
__publicField(StrikeBlot, "tagName", "u");
|
|
11
|
+
__publicField(StrikeBlot, "className", "ql-custom-strike");
|
|
9
12
|
export {
|
|
10
|
-
StrikeBlot
|
|
13
|
+
StrikeBlot
|
|
11
14
|
};
|
|
12
15
|
//# sourceMappingURL=strike.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"strike.es.js","sources":["../../../src/formats/strike.ts"],"sourcesContent":["import Quill from 'quill'\r\n\r\nconst Inline = Quill.
|
|
1
|
+
{"version":3,"file":"strike.es.js","sources":["../../../src/formats/strike.ts"],"sourcesContent":["import type TypeInline from 'quill/blots/inline'\r\nimport Quill from 'quill'\r\n\r\nconst Inline = Quill.import('blots/inline') as typeof TypeInline\r\n\r\nexport class StrikeBlot extends Inline {\r\n static blotName = 'strike'\r\n static tagName = 'u'\r\n static className = 'ql-custom-strike'\r\n // 此处删除了formats方法,当前tag非span,则并不需要进行特殊处理去重写formats方法\r\n}\r\n"],"names":[],"mappings":";;;;AAGA,MAAM,SAAS,MAAM,OAAO,cAAc;AAEnC,MAAM,mBAAmB,OAAO;AAAA;AAKvC;AAJE,cADW,YACJ,YAAW;AAClB,cAFW,YAEJ,WAAU;AACjB,cAHW,YAGJ,aAAY;"}
|
package/es/formats/video.es.js
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
1
4
|
import Quill from "quill";
|
|
2
5
|
import { sanitize } from "../config/editor.utils.es.js";
|
|
3
|
-
const BlockEmbed = Quill.
|
|
6
|
+
const BlockEmbed = Quill.import("blots/block/embed");
|
|
4
7
|
const VIDEO_ATTRIBUTES = ["id", "title", "src"];
|
|
5
|
-
class
|
|
8
|
+
const _Video = class _Video extends BlockEmbed {
|
|
6
9
|
static sanitize(url) {
|
|
7
10
|
return sanitize(url, this.PROTOCOL_WHITELIST) ? url : this.SANITIZED_URL;
|
|
8
11
|
}
|
|
@@ -14,7 +17,7 @@ class Video extends BlockEmbed {
|
|
|
14
17
|
if (value[key]) {
|
|
15
18
|
switch (key) {
|
|
16
19
|
case "src": {
|
|
17
|
-
const src =
|
|
20
|
+
const src = _Video.sanitize(value[key]);
|
|
18
21
|
node.setAttribute(key, src);
|
|
19
22
|
break;
|
|
20
23
|
}
|
|
@@ -40,13 +43,14 @@ class Video extends BlockEmbed {
|
|
|
40
43
|
});
|
|
41
44
|
return formats;
|
|
42
45
|
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
46
|
+
};
|
|
47
|
+
__publicField(_Video, "blotName", "video");
|
|
48
|
+
__publicField(_Video, "tagName", "VIDEO");
|
|
49
|
+
__publicField(_Video, "SANITIZED_URL", "about:blank");
|
|
50
|
+
__publicField(_Video, "PROTOCOL_WHITELIST", ["http", "https", "blob"]);
|
|
51
|
+
__publicField(_Video, "className", "ql-video");
|
|
52
|
+
let Video = _Video;
|
|
49
53
|
export {
|
|
50
|
-
Video
|
|
54
|
+
Video
|
|
51
55
|
};
|
|
52
56
|
//# sourceMappingURL=video.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"video.es.js","sources":["../../../src/formats/video.ts"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"video.es.js","sources":["../../../src/formats/video.ts"],"sourcesContent":["import type { BlockEmbed as TypeBlockEmbed } from 'quill/blots/block'\r\nimport Quill from 'quill'\r\nimport { sanitize } from '../config/editor.utils'\r\n\r\nconst BlockEmbed = Quill.import('blots/block/embed') as typeof TypeBlockEmbed\r\nconst VIDEO_ATTRIBUTES = ['id', 'title', 'src']\r\n\r\nexport class Video extends BlockEmbed {\r\n static blotName = 'video'\r\n static tagName = 'VIDEO'\r\n static SANITIZED_URL = 'about:blank'\r\n static PROTOCOL_WHITELIST = ['http', 'https', 'blob']\r\n static className = 'ql-video'\r\n\r\n static sanitize(url) {\r\n return sanitize(url, this.PROTOCOL_WHITELIST) ? url : this.SANITIZED_URL\r\n }\r\n\r\n static create(value) {\r\n const node = super.create(value) as HTMLElement\r\n node.setAttribute('contenteditable', 'false')\r\n node.setAttribute('controls', 'controls')\r\n VIDEO_ATTRIBUTES.forEach((key) => {\r\n if (value[key]) {\r\n switch (key) {\r\n case 'src':{ const src = Video.sanitize(value[key])\r\n node.setAttribute(key, src)\r\n break\r\n }\r\n case 'title': {\r\n node.setAttribute(key, value[key])\r\n break\r\n }\r\n default: {\r\n node.dataset[key] = value[key]\r\n }\r\n }\r\n }\r\n })\r\n return node\r\n }\r\n\r\n static value(domNode) {\r\n const formats: any = {}\r\n VIDEO_ATTRIBUTES.forEach((key) => {\r\n const value = domNode.getAttribute(key) || domNode.dataset[key]\r\n if (value) {\r\n formats[key] = value\r\n }\r\n })\r\n return formats\r\n }\r\n}\r\n"],"names":[],"mappings":";;;;;AAIA,MAAM,aAAa,MAAM,OAAO,mBAAmB;AACnD,MAAM,mBAAmB,CAAC,MAAM,SAAS,KAAK;AAEvC,MAAM,SAAN,MAAM,eAAc,WAAW;AAAA,EAOpC,OAAO,SAAS,KAAK;AACnB,WAAO,SAAS,KAAK,KAAK,kBAAkB,IAAI,MAAM,KAAK;AAAA,EAAA;AAAA,EAG7D,OAAO,OAAO,OAAO;AACb,UAAA,OAAO,MAAM,OAAO,KAAK;AAC1B,SAAA,aAAa,mBAAmB,OAAO;AACvC,SAAA,aAAa,YAAY,UAAU;AACvB,qBAAA,QAAQ,CAAC,QAAQ;AAC5B,UAAA,MAAM,GAAG,GAAG;AACd,gBAAQ,KAAK;AAAA,UACX,KAAK,OAAM;AAAE,kBAAM,MAAM,OAAM,SAAS,MAAM,GAAG,CAAC;AAC3C,iBAAA,aAAa,KAAK,GAAG;AAC1B;AAAA,UAAA;AAAA,UAEF,KAAK,SAAS;AACZ,iBAAK,aAAa,KAAK,MAAM,GAAG,CAAC;AACjC;AAAA,UAAA;AAAA,UAEF,SAAS;AACP,iBAAK,QAAQ,GAAG,IAAI,MAAM,GAAG;AAAA,UAAA;AAAA,QAC/B;AAAA,MACF;AAAA,IACF,CACD;AACM,WAAA;AAAA,EAAA;AAAA,EAGT,OAAO,MAAM,SAAS;AACpB,UAAM,UAAe,CAAC;AACL,qBAAA,QAAQ,CAAC,QAAQ;AAChC,YAAM,QAAQ,QAAQ,aAAa,GAAG,KAAK,QAAQ,QAAQ,GAAG;AAC9D,UAAI,OAAO;AACT,gBAAQ,GAAG,IAAI;AAAA,MAAA;AAAA,IACjB,CACD;AACM,WAAA;AAAA,EAAA;AAEX;AA5CE,cADW,QACJ,YAAW;AAClB,cAFW,QAEJ,WAAU;AACjB,cAHW,QAGJ,iBAAgB;AACvB,cAJW,QAIJ,sBAAqB,CAAC,QAAQ,SAAS,MAAM;AACpD,cALW,QAKJ,aAAY;AALd,IAAM,QAAN;"}
|
package/es/index.es.js
CHANGED
|
@@ -1,43 +1,102 @@
|
|
|
1
1
|
import "./fluent-editor.es.js";
|
|
2
|
-
import
|
|
2
|
+
import "./attributors/index.es.js";
|
|
3
|
+
import "./config/types/index.es.js";
|
|
4
|
+
import "./formats/index.es.js";
|
|
5
|
+
import "./modules/index.es.js";
|
|
6
|
+
import { generateTableUpShortKeyMenu } from "quill-shortcut-key";
|
|
7
|
+
import { AttributeMap, Delta, Op, OpIterator, Parchment, Range } from "quill/core";
|
|
8
|
+
import FluentEditor from "./core/fluent-editor.es.js";
|
|
9
|
+
import { SizeStyle } from "./attributors/font-size.es.js";
|
|
10
|
+
import { FontStyle } from "./attributors/font-style.es.js";
|
|
11
|
+
import { LineHeightStyle } from "./attributors/line-height.es.js";
|
|
12
|
+
import { TextIndentStyle } from "./attributors/text-indent.es.js";
|
|
13
|
+
import { EmojiBlot } from "./formats/emoji.es.js";
|
|
14
|
+
import { SoftBreak } from "./formats/soft-break.es.js";
|
|
15
|
+
import { StrikeBlot } from "./formats/strike.es.js";
|
|
16
|
+
import { Video } from "./formats/video.es.js";
|
|
17
|
+
import { CustomClipboard } from "./modules/custom-clipboard.es.js";
|
|
18
|
+
import { Action } from "./modules/custom-image/actions/action.es.js";
|
|
19
|
+
import { CustomResizeAction } from "./modules/custom-image/actions/custom-resize-action.es.js";
|
|
20
|
+
import { DeleteAction } from "./modules/custom-image/actions/delete-action.es.js";
|
|
21
|
+
import { ALIGN_ATTR, ImageToolbarButtons, alignmentHandler, setAlignStyle } from "./modules/custom-image/actions/image-toolbar-buttons.es.js";
|
|
22
|
+
import { ImageToolbar } from "./modules/custom-image/actions/toolbar.es.js";
|
|
23
|
+
import { ImageToolbarAction } from "./modules/custom-image/actions/toolbar-action.es.js";
|
|
24
|
+
import { BlotFormatter } from "./modules/custom-image/blot-formatter.es.js";
|
|
25
|
+
import { CustomImage } from "./modules/custom-image/image.es.js";
|
|
26
|
+
import { BlotSpec } from "./modules/custom-image/specs/blot-spec.es.js";
|
|
27
|
+
import { CustomImageSpec } from "./modules/custom-image/specs/custom-image-spec.es.js";
|
|
28
|
+
import { ImageSpec } from "./modules/custom-image/specs/image-spec.es.js";
|
|
29
|
+
import { FileUploader } from "./modules/custom-uploader.es.js";
|
|
30
|
+
import { DividerBlot } from "./modules/divider.es.js";
|
|
31
|
+
import { EmojiModule } from "./modules/emoji.es.js";
|
|
32
|
+
import { File } from "./modules/file/formats/file.es.js";
|
|
33
|
+
import { FileBar } from "./modules/file/modules/file-bar.es.js";
|
|
34
|
+
import { FileModule } from "./modules/file/modules/file-module.es.js";
|
|
3
35
|
import { I18N } from "./modules/i18n.es.js";
|
|
36
|
+
import { LinkBlot } from "./modules/link/formats/link.es.js";
|
|
37
|
+
import { LinkTooltip } from "./modules/link/modules/tooltip.es.js";
|
|
38
|
+
import { MathliveBlot } from "./modules/mathlive/formats.es.js";
|
|
39
|
+
import { MathliveModule } from "./modules/mathlive/module.es.js";
|
|
40
|
+
import { MathliveTooltip } from "./modules/mathlive/tooltip.es.js";
|
|
41
|
+
import { Mention } from "./modules/mention/mention.es.js";
|
|
42
|
+
import { MentionLink } from "./modules/mention/mention-link.es.js";
|
|
43
|
+
import { ShortCutKey, shortKey } from "./modules/shortcut-key/index.es.js";
|
|
4
44
|
import { generateTableUp } from "./modules/table-up/index.es.js";
|
|
45
|
+
import { ColorPicker, Picker } from "./modules/toolbar/better-picker.es.js";
|
|
46
|
+
import { BetterToolbar } from "./modules/toolbar/better-toolbar.es.js";
|
|
5
47
|
import { generateToolbarTip } from "./modules/toolbar/toolbar-tip.es.js";
|
|
6
|
-
import { generateTableUpShortKeyMenu } from "quill-shortcut-key";
|
|
7
|
-
import FluentEditor from "./core/fluent-editor.es.js";
|
|
8
|
-
import { AUDIO_VIDEO_UPLOADER_MIME_TYPES, BIG_DELTA_LIMIT, CHANGE_LANGUAGE_EVENT, COMPRESSED_UPLOADER_MIME_TYPES, DOC_UPLOADER_MIME_TYPES, FILE_UPLOADER_MIME_TYPES, IMAGE_UPLOADER_MIME_TYPES, OTHER_FILE_UPLOADER_MIME_TYPES, PPT_UPLOADER_MIME_TYPES, XSL_UPLOADER_MIME_TYPES, defaultLanguage } from "./config/editor.config.es.js";
|
|
9
|
-
import { getEventComposedPath, hadProtocol, hexToRgbA, imageFileToUrl, imageUrlToFile, isInside, isNullOrUndefined, isPureIE, omit, replaceDeltaImage, sanitize, splitWithBreak } from "./config/editor.utils.es.js";
|
|
10
48
|
export {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
49
|
+
ALIGN_ATTR,
|
|
50
|
+
Action,
|
|
51
|
+
AttributeMap,
|
|
52
|
+
BetterToolbar,
|
|
53
|
+
BlotFormatter,
|
|
54
|
+
BlotSpec,
|
|
55
|
+
ColorPicker,
|
|
56
|
+
CustomClipboard,
|
|
57
|
+
CustomImage,
|
|
58
|
+
CustomImageSpec,
|
|
59
|
+
CustomResizeAction,
|
|
60
|
+
DeleteAction,
|
|
61
|
+
Delta,
|
|
62
|
+
DividerBlot,
|
|
63
|
+
EmojiBlot,
|
|
64
|
+
EmojiModule,
|
|
65
|
+
File,
|
|
66
|
+
FileBar,
|
|
67
|
+
FileModule,
|
|
68
|
+
FileUploader,
|
|
69
|
+
FontStyle,
|
|
17
70
|
I18N,
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
71
|
+
ImageSpec,
|
|
72
|
+
ImageToolbar,
|
|
73
|
+
ImageToolbarAction,
|
|
74
|
+
ImageToolbarButtons,
|
|
75
|
+
LineHeightStyle,
|
|
76
|
+
LinkBlot,
|
|
77
|
+
LinkTooltip,
|
|
78
|
+
MathliveBlot,
|
|
79
|
+
MathliveModule,
|
|
80
|
+
MathliveTooltip,
|
|
81
|
+
Mention,
|
|
82
|
+
MentionLink,
|
|
83
|
+
Op,
|
|
84
|
+
OpIterator,
|
|
85
|
+
Parchment,
|
|
86
|
+
Picker,
|
|
87
|
+
Range,
|
|
88
|
+
ShortCutKey,
|
|
89
|
+
SizeStyle,
|
|
90
|
+
SoftBreak,
|
|
91
|
+
StrikeBlot,
|
|
92
|
+
TextIndentStyle,
|
|
93
|
+
Video,
|
|
94
|
+
alignmentHandler,
|
|
22
95
|
FluentEditor as default,
|
|
23
|
-
defaultLanguage,
|
|
24
96
|
generateTableUp,
|
|
25
97
|
generateTableUpShortKeyMenu,
|
|
26
98
|
generateToolbarTip,
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
hadProtocol,
|
|
30
|
-
hexToRgbA,
|
|
31
|
-
imageFileToUrl,
|
|
32
|
-
imageUrlToFile,
|
|
33
|
-
inputFile,
|
|
34
|
-
isInside,
|
|
35
|
-
isNullOrUndefined,
|
|
36
|
-
isPureIE,
|
|
37
|
-
namespace,
|
|
38
|
-
omit,
|
|
39
|
-
replaceDeltaImage,
|
|
40
|
-
sanitize,
|
|
41
|
-
splitWithBreak
|
|
99
|
+
setAlignStyle,
|
|
100
|
+
shortKey
|
|
42
101
|
};
|
|
43
102
|
//# sourceMappingURL=index.es.js.map
|