@syncfusion/ej2-richtexteditor 29.2.4-738301 → 29.2.4-760237
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/.eslintrc.json +262 -260
- package/aceconfig.js +17 -0
- package/blazorGlobalSrc/common/config.d.ts +63 -0
- package/blazorGlobalSrc/common/config.js +123 -0
- package/blazorGlobalSrc/common/constant.d.ts +117 -0
- package/blazorGlobalSrc/common/constant.js +23 -0
- package/blazorGlobalSrc/common/editor-styles.d.ts +1 -0
- package/blazorGlobalSrc/common/editor-styles.js +5 -0
- package/blazorGlobalSrc/common/index.d.ts +7 -0
- package/blazorGlobalSrc/common/index.js +9 -0
- package/blazorGlobalSrc/common/interface.d.ts +119 -0
- package/blazorGlobalSrc/common/interface.js +4 -0
- package/blazorGlobalSrc/common/types.d.ts +25 -0
- package/blazorGlobalSrc/common/types.js +4 -0
- package/blazorGlobalSrc/common/user-agent.d.ts +41 -0
- package/blazorGlobalSrc/common/user-agent.js +71 -0
- package/blazorGlobalSrc/common/util.d.ts +70 -0
- package/blazorGlobalSrc/common/util.js +222 -0
- package/blazorGlobalSrc/components.d.ts +8 -0
- package/blazorGlobalSrc/components.js +12 -0
- package/blazorGlobalSrc/editor-manager/base/classes.d.ts +31 -0
- package/blazorGlobalSrc/editor-manager/base/classes.js +28 -0
- package/blazorGlobalSrc/editor-manager/base/constant.d.ts +97 -0
- package/blazorGlobalSrc/editor-manager/base/constant.js +41 -0
- package/blazorGlobalSrc/editor-manager/base/editor-manager.d.ts +95 -0
- package/blazorGlobalSrc/editor-manager/base/editor-manager.js +339 -0
- package/blazorGlobalSrc/editor-manager/base/enum.d.ts +17 -0
- package/blazorGlobalSrc/editor-manager/base/enum.js +4 -0
- package/blazorGlobalSrc/editor-manager/base/interface.d.ts +263 -0
- package/blazorGlobalSrc/editor-manager/base/interface.js +4 -0
- package/blazorGlobalSrc/editor-manager/base/types.d.ts +7 -0
- package/blazorGlobalSrc/editor-manager/base/types.js +4 -0
- package/blazorGlobalSrc/editor-manager/base.d.ts +8 -0
- package/blazorGlobalSrc/editor-manager/base.js +10 -0
- package/blazorGlobalSrc/editor-manager/index.d.ts +5 -0
- package/blazorGlobalSrc/editor-manager/index.js +9 -0
- package/blazorGlobalSrc/editor-manager/plugin/alignments.d.ts +26 -0
- package/blazorGlobalSrc/editor-manager/plugin/alignments.js +105 -0
- package/blazorGlobalSrc/editor-manager/plugin/audio.d.ts +34 -0
- package/blazorGlobalSrc/editor-manager/plugin/audio.js +145 -0
- package/blazorGlobalSrc/editor-manager/plugin/clearformat-exec.d.ts +24 -0
- package/blazorGlobalSrc/editor-manager/plugin/clearformat-exec.js +47 -0
- package/blazorGlobalSrc/editor-manager/plugin/clearformat.d.ts +29 -0
- package/blazorGlobalSrc/editor-manager/plugin/clearformat.js +249 -0
- package/blazorGlobalSrc/editor-manager/plugin/dom-node.d.ts +351 -0
- package/blazorGlobalSrc/editor-manager/plugin/dom-node.js +737 -0
- package/blazorGlobalSrc/editor-manager/plugin/dom-tree.d.ts +84 -0
- package/blazorGlobalSrc/editor-manager/plugin/dom-tree.js +164 -0
- package/blazorGlobalSrc/editor-manager/plugin/emoji-picker-action.d.ts +10 -0
- package/blazorGlobalSrc/editor-manager/plugin/emoji-picker-action.js +86 -0
- package/blazorGlobalSrc/editor-manager/plugin/format-painter-actions.d.ts +47 -0
- package/blazorGlobalSrc/editor-manager/plugin/format-painter-actions.js +622 -0
- package/blazorGlobalSrc/editor-manager/plugin/formats.d.ts +43 -0
- package/blazorGlobalSrc/editor-manager/plugin/formats.js +597 -0
- package/blazorGlobalSrc/editor-manager/plugin/image.d.ts +48 -0
- package/blazorGlobalSrc/editor-manager/plugin/image.js +399 -0
- package/blazorGlobalSrc/editor-manager/plugin/indents.d.ts +24 -0
- package/blazorGlobalSrc/editor-manager/plugin/indents.js +106 -0
- package/blazorGlobalSrc/editor-manager/plugin/insert-methods.d.ts +48 -0
- package/blazorGlobalSrc/editor-manager/plugin/insert-methods.js +37 -0
- package/blazorGlobalSrc/editor-manager/plugin/insert-text.d.ts +22 -0
- package/blazorGlobalSrc/editor-manager/plugin/insert-text.js +36 -0
- package/blazorGlobalSrc/editor-manager/plugin/inserthtml-exec.d.ts +22 -0
- package/blazorGlobalSrc/editor-manager/plugin/inserthtml-exec.js +49 -0
- package/blazorGlobalSrc/editor-manager/plugin/inserthtml.d.ts +51 -0
- package/blazorGlobalSrc/editor-manager/plugin/inserthtml.js +985 -0
- package/blazorGlobalSrc/editor-manager/plugin/isformatted.d.ts +89 -0
- package/blazorGlobalSrc/editor-manager/plugin/isformatted.js +199 -0
- package/blazorGlobalSrc/editor-manager/plugin/link.d.ts +41 -0
- package/blazorGlobalSrc/editor-manager/plugin/link.js +550 -0
- package/blazorGlobalSrc/editor-manager/plugin/lists.d.ts +74 -0
- package/blazorGlobalSrc/editor-manager/plugin/lists.js +1503 -0
- package/blazorGlobalSrc/editor-manager/plugin/ms-word-clean-up.d.ts +61 -0
- package/blazorGlobalSrc/editor-manager/plugin/ms-word-clean-up.js +1136 -0
- package/blazorGlobalSrc/editor-manager/plugin/nodecutter.d.ts +64 -0
- package/blazorGlobalSrc/editor-manager/plugin/nodecutter.js +167 -0
- package/blazorGlobalSrc/editor-manager/plugin/selection-commands.d.ts +41 -0
- package/blazorGlobalSrc/editor-manager/plugin/selection-commands.js +1069 -0
- package/blazorGlobalSrc/editor-manager/plugin/selection-exec.d.ts +24 -0
- package/blazorGlobalSrc/editor-manager/plugin/selection-exec.js +49 -0
- package/blazorGlobalSrc/editor-manager/plugin/table-selection.d.ts +26 -0
- package/blazorGlobalSrc/editor-manager/plugin/table-selection.js +210 -0
- package/blazorGlobalSrc/editor-manager/plugin/table.d.ts +56 -0
- package/blazorGlobalSrc/editor-manager/plugin/table.js +1100 -0
- package/blazorGlobalSrc/editor-manager/plugin/toolbar-status.d.ts +39 -0
- package/blazorGlobalSrc/editor-manager/plugin/toolbar-status.js +384 -0
- package/blazorGlobalSrc/editor-manager/plugin/undo.d.ts +85 -0
- package/blazorGlobalSrc/editor-manager/plugin/undo.js +216 -0
- package/blazorGlobalSrc/editor-manager/plugin/video.d.ts +38 -0
- package/blazorGlobalSrc/editor-manager/plugin/video.js +311 -0
- package/blazorGlobalSrc/editor-manager/plugin.d.ts +27 -0
- package/blazorGlobalSrc/editor-manager/plugin.js +31 -0
- package/blazorGlobalSrc/global.d.ts +1 -0
- package/blazorGlobalSrc/global.js +3 -0
- package/blazorGlobalSrc/index.d.ts +8 -0
- package/blazorGlobalSrc/index.js +12 -0
- package/blazorGlobalSrc/markdown-parser/base/constant.d.ts +39 -0
- package/blazorGlobalSrc/markdown-parser/base/constant.js +10 -0
- package/blazorGlobalSrc/markdown-parser/base/interface.d.ts +169 -0
- package/blazorGlobalSrc/markdown-parser/base/interface.js +4 -0
- package/blazorGlobalSrc/markdown-parser/base/markdown-parser.d.ts +69 -0
- package/blazorGlobalSrc/markdown-parser/base/markdown-parser.js +87 -0
- package/blazorGlobalSrc/markdown-parser/base/types.d.ts +7 -0
- package/blazorGlobalSrc/markdown-parser/base/types.js +4 -0
- package/blazorGlobalSrc/markdown-parser/base.d.ts +7 -0
- package/blazorGlobalSrc/markdown-parser/base.js +9 -0
- package/blazorGlobalSrc/markdown-parser/index.d.ts +5 -0
- package/blazorGlobalSrc/markdown-parser/index.js +9 -0
- package/blazorGlobalSrc/markdown-parser/plugin/clearformat.d.ts +28 -0
- package/blazorGlobalSrc/markdown-parser/plugin/clearformat.js +110 -0
- package/blazorGlobalSrc/markdown-parser/plugin/formats.d.ts +32 -0
- package/blazorGlobalSrc/markdown-parser/plugin/formats.js +225 -0
- package/blazorGlobalSrc/markdown-parser/plugin/insert-text.d.ts +24 -0
- package/blazorGlobalSrc/markdown-parser/plugin/insert-text.js +49 -0
- package/blazorGlobalSrc/markdown-parser/plugin/link.d.ts +24 -0
- package/blazorGlobalSrc/markdown-parser/plugin/link.js +50 -0
- package/blazorGlobalSrc/markdown-parser/plugin/lists.d.ts +39 -0
- package/blazorGlobalSrc/markdown-parser/plugin/lists.js +462 -0
- package/blazorGlobalSrc/markdown-parser/plugin/markdown-selection.d.ts +140 -0
- package/blazorGlobalSrc/markdown-parser/plugin/markdown-selection.js +104 -0
- package/blazorGlobalSrc/markdown-parser/plugin/md-selection-formats.d.ts +31 -0
- package/blazorGlobalSrc/markdown-parser/plugin/md-selection-formats.js +335 -0
- package/blazorGlobalSrc/markdown-parser/plugin/table.d.ts +52 -0
- package/blazorGlobalSrc/markdown-parser/plugin/table.js +216 -0
- package/blazorGlobalSrc/markdown-parser/plugin/undo.d.ts +83 -0
- package/blazorGlobalSrc/markdown-parser/plugin/undo.js +147 -0
- package/blazorGlobalSrc/markdown-parser/plugin.d.ts +11 -0
- package/blazorGlobalSrc/markdown-parser/plugin.js +15 -0
- package/blazorGlobalSrc/rich-text-editor/actions/base-quick-toolbar.d.ts +114 -0
- package/blazorGlobalSrc/rich-text-editor/actions/base-quick-toolbar.js +465 -0
- package/blazorGlobalSrc/rich-text-editor/actions/base-toolbar.d.ts +58 -0
- package/blazorGlobalSrc/rich-text-editor/actions/base-toolbar.js +216 -0
- package/blazorGlobalSrc/rich-text-editor/actions/color-picker.d.ts +52 -0
- package/blazorGlobalSrc/rich-text-editor/actions/color-picker.js +241 -0
- package/blazorGlobalSrc/rich-text-editor/actions/count.d.ts +55 -0
- package/blazorGlobalSrc/rich-text-editor/actions/count.js +117 -0
- package/blazorGlobalSrc/rich-text-editor/actions/dropdown-buttons.d.ts +72 -0
- package/blazorGlobalSrc/rich-text-editor/actions/dropdown-buttons.js +552 -0
- package/blazorGlobalSrc/rich-text-editor/actions/emoji-picker.d.ts +51 -0
- package/blazorGlobalSrc/rich-text-editor/actions/emoji-picker.js +853 -0
- package/blazorGlobalSrc/rich-text-editor/actions/enter-key.d.ts +28 -0
- package/blazorGlobalSrc/rich-text-editor/actions/enter-key.js +821 -0
- package/blazorGlobalSrc/rich-text-editor/actions/execute-command-callback.d.ts +11 -0
- package/blazorGlobalSrc/rich-text-editor/actions/execute-command-callback.js +28 -0
- package/blazorGlobalSrc/rich-text-editor/actions/file-manager.d.ts +45 -0
- package/blazorGlobalSrc/rich-text-editor/actions/file-manager.js +249 -0
- package/blazorGlobalSrc/rich-text-editor/actions/format-painter.d.ts +25 -0
- package/blazorGlobalSrc/rich-text-editor/actions/format-painter.js +156 -0
- package/blazorGlobalSrc/rich-text-editor/actions/full-screen.d.ts +40 -0
- package/blazorGlobalSrc/rich-text-editor/actions/full-screen.js +148 -0
- package/blazorGlobalSrc/rich-text-editor/actions/html-attributes.d.ts +15 -0
- package/blazorGlobalSrc/rich-text-editor/actions/html-attributes.js +50 -0
- package/blazorGlobalSrc/rich-text-editor/actions/html-editor.d.ts +120 -0
- package/blazorGlobalSrc/rich-text-editor/actions/html-editor.js +1244 -0
- package/blazorGlobalSrc/rich-text-editor/actions/html-toolbar-status.d.ts +14 -0
- package/blazorGlobalSrc/rich-text-editor/actions/html-toolbar-status.js +47 -0
- package/blazorGlobalSrc/rich-text-editor/actions/import-export.d.ts +21 -0
- package/blazorGlobalSrc/rich-text-editor/actions/import-export.js +117 -0
- package/blazorGlobalSrc/rich-text-editor/actions/keyboard-model.d.ts +30 -0
- package/blazorGlobalSrc/rich-text-editor/actions/keyboard.d.ts +110 -0
- package/blazorGlobalSrc/rich-text-editor/actions/keyboard.js +163 -0
- package/blazorGlobalSrc/rich-text-editor/actions/markdown-editor.d.ts +66 -0
- package/blazorGlobalSrc/rich-text-editor/actions/markdown-editor.js +142 -0
- package/blazorGlobalSrc/rich-text-editor/actions/markdown-toolbar-status.d.ts +23 -0
- package/blazorGlobalSrc/rich-text-editor/actions/markdown-toolbar-status.js +124 -0
- package/blazorGlobalSrc/rich-text-editor/actions/paste-clean-up.d.ts +86 -0
- package/blazorGlobalSrc/rich-text-editor/actions/paste-clean-up.js +1071 -0
- package/blazorGlobalSrc/rich-text-editor/actions/quick-toolbar.d.ts +151 -0
- package/blazorGlobalSrc/rich-text-editor/actions/quick-toolbar.js +548 -0
- package/blazorGlobalSrc/rich-text-editor/actions/resize.d.ts +37 -0
- package/blazorGlobalSrc/rich-text-editor/actions/resize.js +188 -0
- package/blazorGlobalSrc/rich-text-editor/actions/sanitize-helper.d.ts +11 -0
- package/blazorGlobalSrc/rich-text-editor/actions/sanitize-helper.js +168 -0
- package/blazorGlobalSrc/rich-text-editor/actions/toolbar-action.d.ts +18 -0
- package/blazorGlobalSrc/rich-text-editor/actions/toolbar-action.js +76 -0
- package/blazorGlobalSrc/rich-text-editor/actions/toolbar.d.ts +185 -0
- package/blazorGlobalSrc/rich-text-editor/actions/toolbar.js +512 -0
- package/blazorGlobalSrc/rich-text-editor/actions/xhtml-validation.d.ts +25 -0
- package/blazorGlobalSrc/rich-text-editor/actions/xhtml-validation.js +166 -0
- package/blazorGlobalSrc/rich-text-editor/actions.d.ts +26 -0
- package/blazorGlobalSrc/rich-text-editor/actions.js +30 -0
- package/blazorGlobalSrc/rich-text-editor/audio.d.ts +4 -0
- package/blazorGlobalSrc/rich-text-editor/audio.js +8 -0
- package/blazorGlobalSrc/rich-text-editor/base/classes.d.ts +628 -0
- package/blazorGlobalSrc/rich-text-editor/base/classes.js +129 -0
- package/blazorGlobalSrc/rich-text-editor/base/constant.d.ts +808 -0
- package/blazorGlobalSrc/rich-text-editor/base/constant.js +334 -0
- package/blazorGlobalSrc/rich-text-editor/base/enum.d.ts +81 -0
- package/blazorGlobalSrc/rich-text-editor/base/enum.js +37 -0
- package/blazorGlobalSrc/rich-text-editor/base/interface.d.ts +1577 -0
- package/blazorGlobalSrc/rich-text-editor/base/interface.js +194 -0
- package/blazorGlobalSrc/rich-text-editor/base/rich-text-editor-model.d.ts +1032 -0
- package/blazorGlobalSrc/rich-text-editor/base/rich-text-editor.d.ts +1699 -0
- package/blazorGlobalSrc/rich-text-editor/base/rich-text-editor.js +2645 -0
- package/blazorGlobalSrc/rich-text-editor/base/util.d.ts +212 -0
- package/blazorGlobalSrc/rich-text-editor/base/util.js +610 -0
- package/blazorGlobalSrc/rich-text-editor/base.d.ts +10 -0
- package/blazorGlobalSrc/rich-text-editor/base.js +13 -0
- package/blazorGlobalSrc/rich-text-editor/formatter/formatter.d.ts +87 -0
- package/blazorGlobalSrc/rich-text-editor/formatter/formatter.js +223 -0
- package/blazorGlobalSrc/rich-text-editor/formatter/html-formatter.d.ts +34 -0
- package/blazorGlobalSrc/rich-text-editor/formatter/html-formatter.js +44 -0
- package/blazorGlobalSrc/rich-text-editor/formatter/markdown-formatter.d.ts +39 -0
- package/blazorGlobalSrc/rich-text-editor/formatter/markdown-formatter.js +48 -0
- package/blazorGlobalSrc/rich-text-editor/formatter.d.ts +6 -0
- package/blazorGlobalSrc/rich-text-editor/formatter.js +10 -0
- package/blazorGlobalSrc/rich-text-editor/html-editor.d.ts +4 -0
- package/blazorGlobalSrc/rich-text-editor/html-editor.js +8 -0
- package/blazorGlobalSrc/rich-text-editor/image.d.ts +4 -0
- package/blazorGlobalSrc/rich-text-editor/image.js +8 -0
- package/blazorGlobalSrc/rich-text-editor/index.d.ts +9 -0
- package/blazorGlobalSrc/rich-text-editor/index.js +12 -0
- package/blazorGlobalSrc/rich-text-editor/link.d.ts +4 -0
- package/blazorGlobalSrc/rich-text-editor/link.js +8 -0
- package/blazorGlobalSrc/rich-text-editor/markdown-editor.d.ts +4 -0
- package/blazorGlobalSrc/rich-text-editor/markdown-editor.js +8 -0
- package/blazorGlobalSrc/rich-text-editor/models/default-locale.d.ts +25 -0
- package/blazorGlobalSrc/rich-text-editor/models/default-locale.js +391 -0
- package/blazorGlobalSrc/rich-text-editor/models/iframe-settings-model.d.ts +68 -0
- package/blazorGlobalSrc/rich-text-editor/models/iframe-settings.d.ts +61 -0
- package/blazorGlobalSrc/rich-text-editor/models/iframe-settings.js +60 -0
- package/blazorGlobalSrc/rich-text-editor/models/inline-mode-model.d.ts +24 -0
- package/blazorGlobalSrc/rich-text-editor/models/inline-mode.d.ts +20 -0
- package/blazorGlobalSrc/rich-text-editor/models/inline-mode.js +37 -0
- package/blazorGlobalSrc/rich-text-editor/models/items.d.ts +36 -0
- package/blazorGlobalSrc/rich-text-editor/models/items.js +1011 -0
- package/blazorGlobalSrc/rich-text-editor/models/models.d.ts +7 -0
- package/blazorGlobalSrc/rich-text-editor/models/models.js +4 -0
- package/blazorGlobalSrc/rich-text-editor/models/slash-menu-settings-model.d.ts +40 -0
- package/blazorGlobalSrc/rich-text-editor/models/slash-menu-settings.d.ts +50 -0
- package/blazorGlobalSrc/rich-text-editor/models/slash-menu-settings.js +143 -0
- package/blazorGlobalSrc/rich-text-editor/models/toolbar-settings-model.d.ts +1130 -0
- package/blazorGlobalSrc/rich-text-editor/models/toolbar-settings.d.ts +992 -0
- package/blazorGlobalSrc/rich-text-editor/models/toolbar-settings.js +510 -0
- package/blazorGlobalSrc/rich-text-editor/models.d.ts +4 -0
- package/blazorGlobalSrc/rich-text-editor/models.js +4 -0
- package/blazorGlobalSrc/rich-text-editor/quick-toolbar.d.ts +4 -0
- package/blazorGlobalSrc/rich-text-editor/quick-toolbar.js +8 -0
- package/blazorGlobalSrc/rich-text-editor/renderer/audio-module.d.ts +82 -0
- package/blazorGlobalSrc/rich-text-editor/renderer/audio-module.js +886 -0
- package/blazorGlobalSrc/rich-text-editor/renderer/content-renderer.d.ts +65 -0
- package/blazorGlobalSrc/rich-text-editor/renderer/content-renderer.js +49 -0
- package/blazorGlobalSrc/rich-text-editor/renderer/dialog-renderer.d.ts +39 -0
- package/blazorGlobalSrc/rich-text-editor/renderer/dialog-renderer.js +111 -0
- package/blazorGlobalSrc/rich-text-editor/renderer/iframe-content-renderer.d.ts +33 -0
- package/blazorGlobalSrc/rich-text-editor/renderer/iframe-content-renderer.js +101 -0
- package/blazorGlobalSrc/rich-text-editor/renderer/image-module.d.ts +199 -0
- package/blazorGlobalSrc/rich-text-editor/renderer/image-module.js +2494 -0
- package/blazorGlobalSrc/rich-text-editor/renderer/link-module.d.ts +63 -0
- package/blazorGlobalSrc/rich-text-editor/renderer/link-module.js +596 -0
- package/blazorGlobalSrc/rich-text-editor/renderer/markdown-renderer.d.ts +65 -0
- package/blazorGlobalSrc/rich-text-editor/renderer/markdown-renderer.js +38 -0
- package/blazorGlobalSrc/rich-text-editor/renderer/popup-renderer.d.ts +54 -0
- package/blazorGlobalSrc/rich-text-editor/renderer/popup-renderer.js +35 -0
- package/blazorGlobalSrc/rich-text-editor/renderer/render.d.ts +46 -0
- package/blazorGlobalSrc/rich-text-editor/renderer/render.js +70 -0
- package/blazorGlobalSrc/rich-text-editor/renderer/slash-menu.d.ts +20 -0
- package/blazorGlobalSrc/rich-text-editor/renderer/slash-menu.js +224 -0
- package/blazorGlobalSrc/rich-text-editor/renderer/table-module.d.ts +155 -0
- package/blazorGlobalSrc/rich-text-editor/renderer/table-module.js +2206 -0
- package/blazorGlobalSrc/rich-text-editor/renderer/toolbar-renderer.d.ts +131 -0
- package/blazorGlobalSrc/rich-text-editor/renderer/toolbar-renderer.js +747 -0
- package/blazorGlobalSrc/rich-text-editor/renderer/video-module.d.ts +120 -0
- package/blazorGlobalSrc/rich-text-editor/renderer/video-module.js +1507 -0
- package/blazorGlobalSrc/rich-text-editor/renderer/view-source.d.ts +74 -0
- package/blazorGlobalSrc/rich-text-editor/renderer/view-source.js +225 -0
- package/blazorGlobalSrc/rich-text-editor/renderer.d.ts +17 -0
- package/blazorGlobalSrc/rich-text-editor/renderer.js +21 -0
- package/blazorGlobalSrc/rich-text-editor/services/renderer-factory.d.ts +33 -0
- package/blazorGlobalSrc/rich-text-editor/services/renderer-factory.js +29 -0
- package/blazorGlobalSrc/rich-text-editor/services/service-locator.d.ts +29 -0
- package/blazorGlobalSrc/rich-text-editor/services/service-locator.js +25 -0
- package/blazorGlobalSrc/rich-text-editor/services.d.ts +5 -0
- package/blazorGlobalSrc/rich-text-editor/services.js +9 -0
- package/blazorGlobalSrc/rich-text-editor/toolbar.d.ts +4 -0
- package/blazorGlobalSrc/rich-text-editor/toolbar.js +8 -0
- package/blazorGlobalSrc/rich-text-editor/video.d.ts +4 -0
- package/blazorGlobalSrc/rich-text-editor/video.js +8 -0
- package/blazorGlobalSrc/rich-text-editor.d.ts +4 -0
- package/blazorGlobalSrc/rich-text-editor.js +8 -0
- package/blazorGlobalSrc/selection/index.d.ts +4 -0
- package/blazorGlobalSrc/selection/index.js +8 -0
- package/blazorGlobalSrc/selection/selection.d.ts +244 -0
- package/blazorGlobalSrc/selection/selection.js +309 -0
- package/dist/ej2-richtexteditor.umd.min.js +1 -1
- package/dist/ej2-richtexteditor.umd.min.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es2015.js +6 -4
- package/dist/es6/ej2-richtexteditor.es2015.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es5.js +6 -4
- package/dist/es6/ej2-richtexteditor.es5.js.map +1 -1
- package/helpers/e2e/index.d.ts +1 -0
- package/helpers/e2e/index.js +8 -0
- package/helpers/e2e/rte-helper.d.ts +79 -0
- package/helpers/e2e/rte-helper.js +81 -0
- package/package.json +1 -1
- package/src/editor-manager/plugin/dom-tree.js +6 -4
- package/src/global.d.ts +1 -0
- package/styles/bds-lite.css +7 -17
- package/styles/bds.css +11 -22
- package/styles/bootstrap-dark-lite.css +3 -13
- package/styles/bootstrap-dark.css +3 -14
- package/styles/bootstrap-lite.css +3 -13
- package/styles/bootstrap.css +3 -14
- package/styles/bootstrap4-lite.css +3 -13
- package/styles/bootstrap4.css +3 -14
- package/styles/bootstrap5-dark-lite.css +3 -13
- package/styles/bootstrap5-dark.css +3 -14
- package/styles/bootstrap5-lite.css +3 -13
- package/styles/bootstrap5.3-lite.css +3 -13
- package/styles/bootstrap5.3.css +3 -14
- package/styles/bootstrap5.css +3 -14
- package/styles/fabric-dark-lite.css +3 -13
- package/styles/fabric-dark.css +3 -14
- package/styles/fabric-lite.css +3 -13
- package/styles/fabric.css +3 -14
- package/styles/fluent-dark-lite.css +3 -13
- package/styles/fluent-dark.css +3 -14
- package/styles/fluent-lite.css +3 -13
- package/styles/fluent.css +3 -14
- package/styles/fluent2-lite.css +3 -13
- package/styles/fluent2.css +3 -14
- package/styles/highcontrast-light-lite.css +3 -13
- package/styles/highcontrast-light.css +3 -14
- package/styles/highcontrast-lite.css +3 -13
- package/styles/highcontrast.css +3 -14
- package/styles/material-dark-lite.css +3 -13
- package/styles/material-dark.css +3 -14
- package/styles/material-lite.css +3 -13
- package/styles/material.css +3 -14
- package/styles/material3-dark-lite.css +3 -13
- package/styles/material3-dark.css +3 -14
- package/styles/material3-lite.css +3 -13
- package/styles/material3.css +3 -14
- package/styles/rich-text-editor/_bds-definition.scss +2 -2
- package/styles/rich-text-editor/_bigger.scss +0 -1
- package/styles/rich-text-editor/_layout.scss +0 -9
- package/styles/rich-text-editor/_theme.scss +3 -0
- package/styles/rich-text-editor/bds.css +11 -22
- package/styles/rich-text-editor/bootstrap-dark.css +3 -14
- package/styles/rich-text-editor/bootstrap.css +3 -14
- package/styles/rich-text-editor/bootstrap4.css +3 -14
- package/styles/rich-text-editor/bootstrap5-dark.css +3 -14
- package/styles/rich-text-editor/bootstrap5.3.css +3 -14
- package/styles/rich-text-editor/bootstrap5.css +3 -14
- package/styles/rich-text-editor/fabric-dark.css +3 -14
- package/styles/rich-text-editor/fabric.css +3 -14
- package/styles/rich-text-editor/fluent-dark.css +3 -14
- package/styles/rich-text-editor/fluent.css +3 -14
- package/styles/rich-text-editor/fluent2.css +3 -14
- package/styles/rich-text-editor/highcontrast-light.css +3 -14
- package/styles/rich-text-editor/highcontrast.css +3 -14
- package/styles/rich-text-editor/material-dark.css +3 -14
- package/styles/rich-text-editor/material.css +3 -14
- package/styles/rich-text-editor/material3-dark.css +3 -14
- package/styles/rich-text-editor/material3.css +3 -14
- package/styles/rich-text-editor/tailwind-dark.css +3 -14
- package/styles/rich-text-editor/tailwind.css +3 -14
- package/styles/rich-text-editor/tailwind3.css +3 -14
- package/styles/tailwind-dark-lite.css +3 -13
- package/styles/tailwind-dark.css +3 -14
- package/styles/tailwind-lite.css +3 -13
- package/styles/tailwind.css +3 -14
- package/styles/tailwind3-lite.css +3 -13
- package/styles/tailwind3.css +3 -14
- package/tslint.json +111 -0
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
define(["require", "exports", "@syncfusion/ej2-base", "./../../selection/selection", "./../../common/constant", "../../common/util"], function (require, exports, ej2_base_1, selection_1, EVENTS, util_1) {
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
var UndoRedoManager = (function () {
|
|
5
|
+
function UndoRedoManager(parent, options) {
|
|
6
|
+
this.undoRedoStack = [];
|
|
7
|
+
this.parent = parent;
|
|
8
|
+
this.undoRedoSteps = !ej2_base_1.isNullOrUndefined(options) ? options.undoRedoSteps : 30;
|
|
9
|
+
this.undoRedoTimer = !ej2_base_1.isNullOrUndefined(options) ? options.undoRedoTimer : 300;
|
|
10
|
+
this.addEventListener();
|
|
11
|
+
}
|
|
12
|
+
UndoRedoManager.prototype.addEventListener = function () {
|
|
13
|
+
this.debounceListener = ej2_base_1.debounce(this.keyUp, this.undoRedoTimer);
|
|
14
|
+
this.parent.observer.on(EVENTS.KEY_UP_HANDLER, this.debounceListener, this);
|
|
15
|
+
this.parent.observer.on(EVENTS.KEY_DOWN_HANDLER, this.keyDown, this);
|
|
16
|
+
this.parent.observer.on(EVENTS.ACTION, this.onAction, this);
|
|
17
|
+
this.parent.observer.on(EVENTS.MODEL_CHANGED_PLUGIN, this.onPropertyChanged, this);
|
|
18
|
+
this.parent.observer.on(EVENTS.INTERNAL_DESTROY, this.destroy, this);
|
|
19
|
+
};
|
|
20
|
+
UndoRedoManager.prototype.onPropertyChanged = function (props) {
|
|
21
|
+
for (var _i = 0, _a = Object.keys(props.newProp); _i < _a.length; _i++) {
|
|
22
|
+
var prop = _a[_i];
|
|
23
|
+
switch (prop) {
|
|
24
|
+
case 'undoRedoSteps':
|
|
25
|
+
this.undoRedoSteps = props.newProp.undoRedoSteps;
|
|
26
|
+
break;
|
|
27
|
+
case 'undoRedoTimer':
|
|
28
|
+
this.undoRedoTimer = props.newProp.undoRedoTimer;
|
|
29
|
+
break;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
UndoRedoManager.prototype.removeEventListener = function () {
|
|
34
|
+
this.parent.observer.off(EVENTS.KEY_UP_HANDLER, this.keyUp);
|
|
35
|
+
this.parent.observer.off(EVENTS.KEY_DOWN_HANDLER, this.keyDown);
|
|
36
|
+
this.parent.observer.off(EVENTS.ACTION, this.onAction);
|
|
37
|
+
this.parent.observer.off(EVENTS.MODEL_CHANGED_PLUGIN, this.onPropertyChanged);
|
|
38
|
+
this.parent.observer.off(EVENTS.INTERNAL_DESTROY, this.destroy);
|
|
39
|
+
this.debounceListener = null;
|
|
40
|
+
};
|
|
41
|
+
UndoRedoManager.prototype.onAction = function (e) {
|
|
42
|
+
if (e.subCommand === 'Undo') {
|
|
43
|
+
this.undo(e);
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
this.redo(e);
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
UndoRedoManager.prototype.destroy = function () {
|
|
50
|
+
this.removeEventListener();
|
|
51
|
+
this.element = null;
|
|
52
|
+
this.steps = null;
|
|
53
|
+
this.undoRedoStack = [];
|
|
54
|
+
this.undoRedoSteps = null;
|
|
55
|
+
this.undoRedoTimer = null;
|
|
56
|
+
};
|
|
57
|
+
UndoRedoManager.prototype.keyDown = function (e) {
|
|
58
|
+
var event = e.event;
|
|
59
|
+
var proxy = this;
|
|
60
|
+
switch (event.action) {
|
|
61
|
+
case 'undo':
|
|
62
|
+
event.preventDefault();
|
|
63
|
+
proxy.undo(e);
|
|
64
|
+
break;
|
|
65
|
+
case 'redo':
|
|
66
|
+
event.preventDefault();
|
|
67
|
+
proxy.redo(e);
|
|
68
|
+
break;
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
UndoRedoManager.prototype.keyUp = function (e) {
|
|
72
|
+
if (e.event.keyCode !== 17 && !e.event.ctrlKey) {
|
|
73
|
+
this.saveData(e);
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
UndoRedoManager.prototype.getTextContentFromFragment = function (fragment) {
|
|
77
|
+
var textContent = '';
|
|
78
|
+
for (var i = 0; i < fragment.childNodes.length; i++) {
|
|
79
|
+
var childNode = fragment.childNodes[i];
|
|
80
|
+
if (childNode.nodeType === Node.TEXT_NODE) {
|
|
81
|
+
textContent += childNode.textContent;
|
|
82
|
+
}
|
|
83
|
+
else if (childNode.nodeType === Node.ELEMENT_NODE) {
|
|
84
|
+
textContent += this.getTextContentFromFragment(childNode);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
return textContent;
|
|
88
|
+
};
|
|
89
|
+
UndoRedoManager.prototype.isElementStructureEqual = function (previousFragment, currentFragment) {
|
|
90
|
+
if (previousFragment.childNodes.length !== currentFragment.childNodes.length) {
|
|
91
|
+
return false;
|
|
92
|
+
}
|
|
93
|
+
for (var i = 0; i < previousFragment.childNodes.length; i++) {
|
|
94
|
+
var previousFragmentNode = previousFragment.childNodes[i];
|
|
95
|
+
var currentFragmentNode = currentFragment.childNodes[i];
|
|
96
|
+
if (!previousFragmentNode || !currentFragmentNode) {
|
|
97
|
+
return false;
|
|
98
|
+
}
|
|
99
|
+
if (previousFragmentNode.nodeType !== currentFragmentNode.nodeType) {
|
|
100
|
+
return false;
|
|
101
|
+
}
|
|
102
|
+
if (previousFragmentNode.outerHTML !== currentFragmentNode.outerHTML) {
|
|
103
|
+
return false;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
return true;
|
|
107
|
+
};
|
|
108
|
+
UndoRedoManager.prototype.saveData = function (e) {
|
|
109
|
+
if (!this.parent.currentDocument) {
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
var range = new selection_1.NodeSelection(this.parent.editableElement).getRange(this.parent.currentDocument);
|
|
113
|
+
var currentContainer = this.parent.editableElement === range.startContainer.parentElement ?
|
|
114
|
+
range.startContainer.parentElement : range.startContainer;
|
|
115
|
+
for (var i = currentContainer.childNodes.length - 1; i >= 0; i--) {
|
|
116
|
+
if (!ej2_base_1.isNullOrUndefined(currentContainer.childNodes[i]) && currentContainer.childNodes[i].nodeName === '#text' &&
|
|
117
|
+
currentContainer.childNodes[i].textContent.length === 0 && currentContainer.childNodes[i].nodeName !== 'IMG' &&
|
|
118
|
+
currentContainer.childNodes[i].nodeName !== 'BR' && currentContainer.childNodes[i].nodeName && 'HR') {
|
|
119
|
+
ej2_base_1.detach(currentContainer.childNodes[i]);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
range = new selection_1.NodeSelection(this.parent.editableElement).getRange(this.parent.currentDocument);
|
|
123
|
+
var save = new selection_1.NodeSelection(this.parent.editableElement).save(range, this.parent.currentDocument);
|
|
124
|
+
var clonedElement = this.parent.editableElement.cloneNode(true);
|
|
125
|
+
var fragment = document.createDocumentFragment();
|
|
126
|
+
while (clonedElement.firstChild) {
|
|
127
|
+
fragment.appendChild(clonedElement.firstChild);
|
|
128
|
+
}
|
|
129
|
+
var changEle = { text: fragment, range: save };
|
|
130
|
+
if (this.undoRedoStack.length >= this.steps) {
|
|
131
|
+
this.undoRedoStack = this.undoRedoStack.slice(0, this.steps + 1);
|
|
132
|
+
}
|
|
133
|
+
if (this.undoRedoStack.length > 1 && (this.undoRedoStack[this.undoRedoStack.length - 1].range.range.collapsed === range.collapsed)
|
|
134
|
+
&& (this.undoRedoStack[this.undoRedoStack.length - 1].range.startOffset === save.range.startOffset) &&
|
|
135
|
+
(this.undoRedoStack[this.undoRedoStack.length - 1].range.endOffset === save.range.endOffset) &&
|
|
136
|
+
(this.undoRedoStack[this.undoRedoStack.length - 1].range.range.startContainer === save.range.startContainer) &&
|
|
137
|
+
(this.getTextContentFromFragment(this.undoRedoStack[this.undoRedoStack.length - 1].text).trim() ===
|
|
138
|
+
this.getTextContentFromFragment(changEle.text).trim()) &&
|
|
139
|
+
this.isElementStructureEqual(this.undoRedoStack[this.undoRedoStack.length - 1].text, changEle.text)) {
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
this.undoRedoStack.push(changEle);
|
|
143
|
+
this.steps = this.undoRedoStack.length - 1;
|
|
144
|
+
if (this.steps > this.undoRedoSteps) {
|
|
145
|
+
this.undoRedoStack.shift();
|
|
146
|
+
this.steps--;
|
|
147
|
+
}
|
|
148
|
+
if (e && e.callBack) {
|
|
149
|
+
e.callBack();
|
|
150
|
+
}
|
|
151
|
+
};
|
|
152
|
+
UndoRedoManager.prototype.undo = function (e) {
|
|
153
|
+
if (this.steps > 0) {
|
|
154
|
+
var range = this.undoRedoStack[this.steps - 1].range;
|
|
155
|
+
var removedContent = this.undoRedoStack[this.steps - 1].text;
|
|
156
|
+
this.parent.editableElement.innerHTML = '';
|
|
157
|
+
this.parent.editableElement.appendChild(removedContent.cloneNode(true));
|
|
158
|
+
this.parent.editableElement.focus();
|
|
159
|
+
util_1.scrollToCursor(this.parent.currentDocument, this.parent.editableElement);
|
|
160
|
+
if (util_1.isIDevice()) {
|
|
161
|
+
util_1.setEditFrameFocus(this.parent.editableElement, e.selector);
|
|
162
|
+
}
|
|
163
|
+
range.restore();
|
|
164
|
+
this.steps--;
|
|
165
|
+
if (e.callBack) {
|
|
166
|
+
e.callBack({
|
|
167
|
+
requestType: 'Undo',
|
|
168
|
+
editorMode: 'HTML',
|
|
169
|
+
range: range,
|
|
170
|
+
elements: this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument),
|
|
171
|
+
event: e.event
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
};
|
|
176
|
+
UndoRedoManager.prototype.redo = function (e) {
|
|
177
|
+
if (this.undoRedoStack[this.steps + 1] != null) {
|
|
178
|
+
var range = this.undoRedoStack[this.steps + 1].range;
|
|
179
|
+
var addedContent = this.undoRedoStack[this.steps + 1].text;
|
|
180
|
+
this.parent.editableElement.innerHTML = '';
|
|
181
|
+
this.parent.editableElement.appendChild(addedContent.cloneNode(true));
|
|
182
|
+
this.parent.editableElement.focus();
|
|
183
|
+
util_1.scrollToCursor(this.parent.currentDocument, this.parent.editableElement);
|
|
184
|
+
if (util_1.isIDevice()) {
|
|
185
|
+
util_1.setEditFrameFocus(this.parent.editableElement, e.selector);
|
|
186
|
+
}
|
|
187
|
+
range.restore();
|
|
188
|
+
this.steps++;
|
|
189
|
+
if (e.callBack) {
|
|
190
|
+
e.callBack({
|
|
191
|
+
requestType: 'Redo',
|
|
192
|
+
editorMode: 'HTML',
|
|
193
|
+
range: range,
|
|
194
|
+
elements: this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument),
|
|
195
|
+
event: e.event
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
};
|
|
200
|
+
UndoRedoManager.prototype.getUndoStatus = function () {
|
|
201
|
+
var status = { undo: false, redo: false };
|
|
202
|
+
if (this.steps > 0) {
|
|
203
|
+
status.undo = true;
|
|
204
|
+
}
|
|
205
|
+
if (this.undoRedoStack[this.steps + 1] != null) {
|
|
206
|
+
status.redo = true;
|
|
207
|
+
}
|
|
208
|
+
return status;
|
|
209
|
+
};
|
|
210
|
+
UndoRedoManager.prototype.getCurrentStackIndex = function () {
|
|
211
|
+
return this.steps;
|
|
212
|
+
};
|
|
213
|
+
return UndoRedoManager;
|
|
214
|
+
}());
|
|
215
|
+
exports.UndoRedoManager = UndoRedoManager;
|
|
216
|
+
});
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { EditorManager } from './../base/editor-manager';
|
|
2
|
+
import { IHtmlItem } from './../base/interface';
|
|
3
|
+
/**
|
|
4
|
+
* Video internal component
|
|
5
|
+
*
|
|
6
|
+
* @hidden
|
|
7
|
+
* @deprecated
|
|
8
|
+
*/
|
|
9
|
+
export declare class VideoCommand {
|
|
10
|
+
private parent;
|
|
11
|
+
private vidElement;
|
|
12
|
+
/**
|
|
13
|
+
* Constructor for creating the Video plugin
|
|
14
|
+
*
|
|
15
|
+
* @param {EditorManager} parent - specifies the parent element
|
|
16
|
+
* @hidden
|
|
17
|
+
* @deprecated
|
|
18
|
+
*/
|
|
19
|
+
constructor(parent: EditorManager);
|
|
20
|
+
private addEventListener;
|
|
21
|
+
private removeEventListener;
|
|
22
|
+
/**
|
|
23
|
+
* videoCommand method
|
|
24
|
+
*
|
|
25
|
+
* @param {IHtmlItem} e - specifies the element
|
|
26
|
+
* @returns {void}
|
|
27
|
+
* @hidden
|
|
28
|
+
* @deprecated
|
|
29
|
+
*/
|
|
30
|
+
videoCommand(e: IHtmlItem): void;
|
|
31
|
+
private wrapVideo;
|
|
32
|
+
private createVideo;
|
|
33
|
+
private editAreaVideoClick;
|
|
34
|
+
private setStyle;
|
|
35
|
+
private videoDimension;
|
|
36
|
+
private callBack;
|
|
37
|
+
destroy(): void;
|
|
38
|
+
}
|
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
define(["require", "exports", "@syncfusion/ej2-base", "./../base/constant", "./../base/classes", "./inserthtml", "./../../common/constant", "../../common/util"], function (require, exports, ej2_base_1, CONSTANT, classes, inserthtml_1, EVENTS, util_1) {
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
var VideoCommand = (function () {
|
|
5
|
+
function VideoCommand(parent) {
|
|
6
|
+
this.parent = parent;
|
|
7
|
+
this.addEventListener();
|
|
8
|
+
}
|
|
9
|
+
VideoCommand.prototype.addEventListener = function () {
|
|
10
|
+
this.parent.observer.on(CONSTANT.VIDEO, this.videoCommand, this);
|
|
11
|
+
this.parent.observer.on(EVENTS.INTERNAL_DESTROY, this.destroy, this);
|
|
12
|
+
};
|
|
13
|
+
VideoCommand.prototype.removeEventListener = function () {
|
|
14
|
+
this.parent.observer.off(CONSTANT.VIDEO, this.videoCommand);
|
|
15
|
+
this.parent.observer.off(EVENTS.INTERNAL_DESTROY, this.destroy);
|
|
16
|
+
};
|
|
17
|
+
VideoCommand.prototype.videoCommand = function (e) {
|
|
18
|
+
var selectNode;
|
|
19
|
+
var videoWrapNode;
|
|
20
|
+
var videoClickElem;
|
|
21
|
+
var embededClass = '';
|
|
22
|
+
var value = e.value.toString().toLowerCase();
|
|
23
|
+
if (value !== 'video' && value !== 'videoreplace') {
|
|
24
|
+
selectNode = e.item.selectNode[0];
|
|
25
|
+
videoWrapNode = selectNode.closest('.' + classes.CLASS_EMBED_VIDEO_WRAP);
|
|
26
|
+
videoClickElem = selectNode.closest('.' + classes.CLASS_VIDEO_CLICK_ELEM);
|
|
27
|
+
}
|
|
28
|
+
if (selectNode) {
|
|
29
|
+
embededClass = selectNode.classList.contains('e-rte-embed-url') ? 'e-rte-embed-url' : '';
|
|
30
|
+
}
|
|
31
|
+
switch (value) {
|
|
32
|
+
case 'video':
|
|
33
|
+
case 'videoreplace':
|
|
34
|
+
this.createVideo(e);
|
|
35
|
+
break;
|
|
36
|
+
case 'videodimension':
|
|
37
|
+
this.videoDimension(e);
|
|
38
|
+
break;
|
|
39
|
+
case 'inline':
|
|
40
|
+
selectNode.removeAttribute('class');
|
|
41
|
+
if (videoWrapNode) {
|
|
42
|
+
videoWrapNode.style.display = 'inline-block';
|
|
43
|
+
}
|
|
44
|
+
if (videoClickElem) {
|
|
45
|
+
selectNode.parentElement.style.cssFloat = '';
|
|
46
|
+
}
|
|
47
|
+
ej2_base_1.addClass([selectNode], [classes.CLASS_VIDEO, classes.CLASS_VIDEO_INLINE, classes.CLASS_VIDEO_FOCUS]);
|
|
48
|
+
this.callBack(e);
|
|
49
|
+
break;
|
|
50
|
+
case 'break':
|
|
51
|
+
selectNode.removeAttribute('class');
|
|
52
|
+
if (videoWrapNode) {
|
|
53
|
+
videoWrapNode.style.display = 'block';
|
|
54
|
+
}
|
|
55
|
+
if (videoClickElem) {
|
|
56
|
+
selectNode.parentElement.style.cssFloat = '';
|
|
57
|
+
}
|
|
58
|
+
ej2_base_1.addClass([selectNode], [classes.CLASS_VIDEO_BREAK, classes.CLASS_VIDEO, classes.CLASS_VIDEO_FOCUS]);
|
|
59
|
+
this.callBack(e);
|
|
60
|
+
break;
|
|
61
|
+
case 'justifyleft':
|
|
62
|
+
selectNode.removeAttribute('class');
|
|
63
|
+
if (videoWrapNode) {
|
|
64
|
+
videoWrapNode.style.display = 'block';
|
|
65
|
+
}
|
|
66
|
+
if (videoClickElem) {
|
|
67
|
+
selectNode.parentElement.style.cssFloat = 'left';
|
|
68
|
+
}
|
|
69
|
+
else if (selectNode.parentElement.nextElementSibling != null) {
|
|
70
|
+
ej2_base_1.addClass([selectNode], embededClass === '' ? [classes.CLASS_VIDEO, classes.CLASS_VIDEO_LEFT] : [classes.CLASS_VIDEO, classes.CLASS_VIDEO_LEFT, embededClass]);
|
|
71
|
+
selectNode.parentElement.nextElementSibling.style.clear = 'left';
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
ej2_base_1.addClass([selectNode], embededClass === '' ? [classes.CLASS_VIDEO, classes.CLASS_VIDEO_LEFT] : [classes.CLASS_VIDEO, classes.CLASS_VIDEO_LEFT, embededClass]);
|
|
75
|
+
}
|
|
76
|
+
this.callBack(e);
|
|
77
|
+
break;
|
|
78
|
+
case 'justifycenter':
|
|
79
|
+
selectNode.removeAttribute('class');
|
|
80
|
+
if (videoWrapNode) {
|
|
81
|
+
videoWrapNode.style.display = 'block';
|
|
82
|
+
}
|
|
83
|
+
if (videoClickElem) {
|
|
84
|
+
selectNode.parentElement.style.cssFloat = '';
|
|
85
|
+
}
|
|
86
|
+
ej2_base_1.addClass([selectNode], embededClass === '' ? [classes.CLASS_VIDEO, classes.CLASS_VIDEO_CENTER] : [classes.CLASS_VIDEO, classes.CLASS_VIDEO_CENTER, embededClass]);
|
|
87
|
+
this.callBack(e);
|
|
88
|
+
break;
|
|
89
|
+
case 'justifyright':
|
|
90
|
+
selectNode.removeAttribute('class');
|
|
91
|
+
if (videoWrapNode) {
|
|
92
|
+
videoWrapNode.style.display = 'block';
|
|
93
|
+
}
|
|
94
|
+
if (videoClickElem) {
|
|
95
|
+
selectNode.parentElement.style.cssFloat = 'right';
|
|
96
|
+
}
|
|
97
|
+
else if (selectNode.parentElement.nextElementSibling != null) {
|
|
98
|
+
ej2_base_1.addClass([selectNode], embededClass === '' ? [classes.CLASS_VIDEO, classes.CLASS_VIDEO_RIGHT] : [classes.CLASS_VIDEO, classes.CLASS_VIDEO_LEFT, embededClass]);
|
|
99
|
+
selectNode.parentElement.nextElementSibling.style.clear = 'right';
|
|
100
|
+
}
|
|
101
|
+
else {
|
|
102
|
+
ej2_base_1.addClass([selectNode], embededClass === '' ? [classes.CLASS_VIDEO, classes.CLASS_VIDEO_RIGHT] : [classes.CLASS_VIDEO, classes.CLASS_VIDEO_RIGHT, embededClass]);
|
|
103
|
+
}
|
|
104
|
+
this.callBack(e);
|
|
105
|
+
break;
|
|
106
|
+
case 'videoremove':
|
|
107
|
+
ej2_base_1.detach(selectNode.parentElement);
|
|
108
|
+
this.callBack(e);
|
|
109
|
+
break;
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
VideoCommand.prototype.wrapVideo = function (e) {
|
|
113
|
+
var wrapElement;
|
|
114
|
+
var sourceElement;
|
|
115
|
+
if (e.item.isEmbedUrl) {
|
|
116
|
+
wrapElement = ej2_base_1.createElement('span', { className: classes.CLASS_EMBED_VIDEO_WRAP, attrs: { contentEditable: 'false' } });
|
|
117
|
+
var clickElement = ej2_base_1.createElement('span', { className: classes.CLASS_VIDEO_CLICK_ELEM });
|
|
118
|
+
var temp = ej2_base_1.createElement('template');
|
|
119
|
+
temp.innerHTML = e.item.fileName;
|
|
120
|
+
clickElement.appendChild(temp.content);
|
|
121
|
+
this.vidElement = sourceElement = clickElement.firstElementChild;
|
|
122
|
+
this.setStyle(sourceElement, e, this.vidElement);
|
|
123
|
+
wrapElement.style.display = (e.item.cssClass === classes.CLASS_VIDEO_INLINE) ? 'inline-block' : 'block';
|
|
124
|
+
wrapElement.appendChild(clickElement);
|
|
125
|
+
}
|
|
126
|
+
else {
|
|
127
|
+
wrapElement = ej2_base_1.createElement('span', { className: classes.CLASS_VIDEO_WRAP, attrs: { contentEditable: 'false', title: ((!ej2_base_1.isNullOrUndefined(e.item.title)) ? e.item.title : (!ej2_base_1.isNullOrUndefined(e.item.fileName) ? e.item.fileName : '')) } });
|
|
128
|
+
this.vidElement = ej2_base_1.createElement('video', { className: classes.CLASS_VIDEO + ' ' + classes.CLASS_VIDEO_INLINE, attrs: { controls: '' } });
|
|
129
|
+
sourceElement = ej2_base_1.createElement('source');
|
|
130
|
+
this.setStyle(sourceElement, e, this.vidElement);
|
|
131
|
+
this.vidElement.appendChild(sourceElement);
|
|
132
|
+
wrapElement.appendChild(this.vidElement);
|
|
133
|
+
}
|
|
134
|
+
return wrapElement;
|
|
135
|
+
};
|
|
136
|
+
VideoCommand.prototype.createVideo = function (e) {
|
|
137
|
+
var _this = this;
|
|
138
|
+
var isReplaced = false;
|
|
139
|
+
var wrapElement;
|
|
140
|
+
if (e.value === 'VideoReplace' && !ej2_base_1.isNullOrUndefined(e.item.selectParent) && (e.item.selectParent[0].tagName === 'VIDEO')) {
|
|
141
|
+
if (e.item.isEmbedUrl) {
|
|
142
|
+
wrapElement = this.wrapVideo(e);
|
|
143
|
+
var oldEle = e.item.selection.range.startContainer;
|
|
144
|
+
oldEle.parentNode.replaceChild(wrapElement, oldEle);
|
|
145
|
+
}
|
|
146
|
+
else {
|
|
147
|
+
var videoEle = e.item.selectParent[0].querySelector('source');
|
|
148
|
+
this.setStyle(videoEle, e, videoEle);
|
|
149
|
+
isReplaced = true;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
else if (e.value === 'VideoReplace' && !ej2_base_1.isNullOrUndefined(e.item.selectParent) && ej2_base_1.isNullOrUndefined(e.item.selectParent[0].querySelector('iframe')) &&
|
|
153
|
+
e.item.selectParent[0].classList &&
|
|
154
|
+
e.item.selectParent[0].classList.contains(classes.CLASS_VIDEO_CLICK_ELEM)) {
|
|
155
|
+
e.item.selectParent[0].innerHTML = e.item.fileName;
|
|
156
|
+
this.setStyle(e.item.selectParent[0].firstElementChild, e, e.item.selectParent[0].firstElementChild);
|
|
157
|
+
}
|
|
158
|
+
else if (e.value === 'VideoReplace' && !ej2_base_1.isNullOrUndefined(e.item.selectParent) && !ej2_base_1.isNullOrUndefined(e.item.selectParent[0].querySelector('iframe')) &&
|
|
159
|
+
!e.item.isEmbedUrl) {
|
|
160
|
+
wrapElement = this.wrapVideo(e);
|
|
161
|
+
var oldEle = e.item.selection.range.startContainer;
|
|
162
|
+
oldEle.parentNode.replaceChild(wrapElement, oldEle);
|
|
163
|
+
}
|
|
164
|
+
else {
|
|
165
|
+
if (!e.item.isEmbedUrl) {
|
|
166
|
+
if (e.value === 'VideoReplace') {
|
|
167
|
+
var closestEmbedVideoWrap = e.item.selection.range.startContainer.closest('.e-embed-video-wrap');
|
|
168
|
+
if (!ej2_base_1.isNullOrUndefined(closestEmbedVideoWrap)) {
|
|
169
|
+
closestEmbedVideoWrap.remove();
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
wrapElement = this.wrapVideo(e);
|
|
173
|
+
}
|
|
174
|
+
else {
|
|
175
|
+
wrapElement = this.wrapVideo(e);
|
|
176
|
+
}
|
|
177
|
+
if (!ej2_base_1.isNullOrUndefined(e.item.selection)) {
|
|
178
|
+
e.item.selection.restore();
|
|
179
|
+
}
|
|
180
|
+
inserthtml_1.InsertHtml.Insert(this.parent.currentDocument, wrapElement, this.parent.editableElement);
|
|
181
|
+
if (!ej2_base_1.isNullOrUndefined(e.item.selection)) {
|
|
182
|
+
var range = e.item.selection.getRange(this.parent.currentDocument);
|
|
183
|
+
var focusNode = document.createTextNode(' ');
|
|
184
|
+
var node = this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)[0];
|
|
185
|
+
wrapElement.parentNode.insertBefore(focusNode, node.nextSibling);
|
|
186
|
+
var save = e.item.selection.save(range, this.parent.currentDocument);
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
if (e.callBack && (ej2_base_1.isNullOrUndefined(e.selector) || !ej2_base_1.isNullOrUndefined(e.selector) && e.selector !== 'pasteCleanupModule')) {
|
|
190
|
+
var selectedNode = this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)[0];
|
|
191
|
+
var videoElm_1;
|
|
192
|
+
if (e.value === 'VideoReplace' || isReplaced) {
|
|
193
|
+
if (!e.item.isEmbedUrl) {
|
|
194
|
+
videoElm_1 = e.item.selectParent[0];
|
|
195
|
+
}
|
|
196
|
+
else if (e.item.isEmbedUrl) {
|
|
197
|
+
if (!ej2_base_1.isNullOrUndefined(wrapElement)) {
|
|
198
|
+
videoElm_1 = wrapElement.querySelector('iframe');
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
else {
|
|
202
|
+
videoElm_1 = e.item.selectParent[0].querySelector('iframe');
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
else {
|
|
206
|
+
videoElm_1 = !e.item.isEmbedUrl ? selectedNode.tagName === 'VIDEO' ? selectedNode : selectedNode.lastElementChild : selectedNode.querySelector('iframe');
|
|
207
|
+
}
|
|
208
|
+
videoElm_1.addEventListener(videoElm_1.tagName !== 'IFRAME' ? 'loadeddata' : 'load', function () {
|
|
209
|
+
if (e.value !== 'VideoReplace' || !isReplaced) {
|
|
210
|
+
if (e.item.isEmbedUrl && videoElm_1) {
|
|
211
|
+
videoElm_1.classList.add('e-rte-embed-url');
|
|
212
|
+
}
|
|
213
|
+
if (!ej2_base_1.isNullOrUndefined(_this.parent.currentDocument)) {
|
|
214
|
+
if (_this.parent.userAgentData.isSafari()) {
|
|
215
|
+
util_1.scrollToCursor(_this.parent.currentDocument, _this.parent.editableElement);
|
|
216
|
+
}
|
|
217
|
+
e.callBack({
|
|
218
|
+
requestType: 'Videos',
|
|
219
|
+
editorMode: 'HTML',
|
|
220
|
+
event: e.event,
|
|
221
|
+
range: _this.parent.nodeSelection.getRange(_this.parent.currentDocument),
|
|
222
|
+
elements: [videoElm_1]
|
|
223
|
+
});
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
});
|
|
227
|
+
if (isReplaced) {
|
|
228
|
+
videoElm_1.load();
|
|
229
|
+
}
|
|
230
|
+
if (ej2_base_1.Browser.userAgent.indexOf('Firefox') !== -1) {
|
|
231
|
+
this.vidElement.addEventListener('play', function () { _this.editAreaVideoClick(e); });
|
|
232
|
+
this.vidElement.addEventListener('pause', function () { _this.editAreaVideoClick(e); });
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
};
|
|
236
|
+
VideoCommand.prototype.editAreaVideoClick = function (e) {
|
|
237
|
+
e.callBack({
|
|
238
|
+
requestType: 'VideosPlayPause',
|
|
239
|
+
editorMode: 'HTML',
|
|
240
|
+
event: e.event
|
|
241
|
+
});
|
|
242
|
+
};
|
|
243
|
+
VideoCommand.prototype.setStyle = function (sourceElement, e, videoEle) {
|
|
244
|
+
if (e.item.url !== '' && !ej2_base_1.isNullOrUndefined(e.item.url) && ej2_base_1.isNullOrUndefined(sourceElement) ? false : sourceElement.nodeName.toLowerCase() !== 'iframe') {
|
|
245
|
+
sourceElement.setAttribute('src', e.item.url);
|
|
246
|
+
}
|
|
247
|
+
if (!e.item.isEmbedUrl) {
|
|
248
|
+
sourceElement.type = e.item.fileName && e.item.fileName.split('.').length > 0 ?
|
|
249
|
+
'video/' + e.item.fileName.split('.')[e.item.fileName.split('.').length - 1] :
|
|
250
|
+
e.item.url && e.item.url.split('.').length > 0 ? 'video/' + e.item.url.split('.')[e.item.url.split('.').length - 1] : '';
|
|
251
|
+
}
|
|
252
|
+
if (!ej2_base_1.isNullOrUndefined(e.item.width) && !ej2_base_1.isNullOrUndefined(e.item.width.width)) {
|
|
253
|
+
videoEle.setAttribute('width', ej2_base_1.formatUnit(e.item.width.width));
|
|
254
|
+
}
|
|
255
|
+
if (!ej2_base_1.isNullOrUndefined(e.item.height) && !ej2_base_1.isNullOrUndefined(e.item.height.height)) {
|
|
256
|
+
videoEle.setAttribute('height', ej2_base_1.formatUnit(e.item.height.height));
|
|
257
|
+
}
|
|
258
|
+
if (!ej2_base_1.isNullOrUndefined(e.item.width) && !ej2_base_1.isNullOrUndefined(e.item.width.minWidth)) {
|
|
259
|
+
videoEle.style.minWidth = ej2_base_1.formatUnit(e.item.width.minWidth);
|
|
260
|
+
}
|
|
261
|
+
if (!ej2_base_1.isNullOrUndefined(e.item.width) && !ej2_base_1.isNullOrUndefined(e.item.width.maxWidth)) {
|
|
262
|
+
videoEle.style.maxWidth = ej2_base_1.formatUnit(e.item.width.maxWidth);
|
|
263
|
+
}
|
|
264
|
+
if (!ej2_base_1.isNullOrUndefined(e.item.height) && !ej2_base_1.isNullOrUndefined(e.item.height.minHeight)) {
|
|
265
|
+
videoEle.style.minHeight = ej2_base_1.formatUnit(e.item.height.minHeight);
|
|
266
|
+
}
|
|
267
|
+
if (!ej2_base_1.isNullOrUndefined(e.item.height) && !ej2_base_1.isNullOrUndefined(e.item.height.maxHeight)) {
|
|
268
|
+
videoEle.style.maxHeight = ej2_base_1.formatUnit(e.item.height.maxHeight);
|
|
269
|
+
}
|
|
270
|
+
if (!ej2_base_1.isNullOrUndefined(e.item.cssClass)) {
|
|
271
|
+
if (e.item.cssClass === classes.CLASS_VIDEO_BREAK) {
|
|
272
|
+
ej2_base_1.addClass([videoEle], [classes.CLASS_VIDEO_BREAK]);
|
|
273
|
+
ej2_base_1.removeClass([videoEle], [classes.CLASS_VIDEO_INLINE]);
|
|
274
|
+
}
|
|
275
|
+
else {
|
|
276
|
+
ej2_base_1.addClass([videoEle], [classes.CLASS_VIDEO_INLINE]);
|
|
277
|
+
ej2_base_1.removeClass([videoEle], [classes.CLASS_VIDEO_BREAK]);
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
};
|
|
281
|
+
VideoCommand.prototype.videoDimension = function (e) {
|
|
282
|
+
var selectNode = !(e.item.selectNode[0].classList.contains(classes.CLASS_VIDEO_CLICK_ELEM)) ? e.item.selectNode[0] :
|
|
283
|
+
e.item.selectNode[0].querySelector('iframe');
|
|
284
|
+
selectNode.style.height = '';
|
|
285
|
+
selectNode.style.width = '';
|
|
286
|
+
if (e.item.width !== 'auto') {
|
|
287
|
+
selectNode.style.width = ej2_base_1.formatUnit(e.item.width);
|
|
288
|
+
}
|
|
289
|
+
if (e.item.height !== 'auto') {
|
|
290
|
+
selectNode.style.height = ej2_base_1.formatUnit(e.item.height);
|
|
291
|
+
}
|
|
292
|
+
this.callBack(e);
|
|
293
|
+
};
|
|
294
|
+
VideoCommand.prototype.callBack = function (e) {
|
|
295
|
+
if (e.callBack) {
|
|
296
|
+
e.callBack({
|
|
297
|
+
requestType: e.item.subCommand,
|
|
298
|
+
editorMode: 'HTML',
|
|
299
|
+
event: e.event,
|
|
300
|
+
range: this.parent.nodeSelection.getRange(this.parent.currentDocument),
|
|
301
|
+
elements: this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)
|
|
302
|
+
});
|
|
303
|
+
}
|
|
304
|
+
};
|
|
305
|
+
VideoCommand.prototype.destroy = function () {
|
|
306
|
+
this.removeEventListener();
|
|
307
|
+
};
|
|
308
|
+
return VideoCommand;
|
|
309
|
+
}());
|
|
310
|
+
exports.VideoCommand = VideoCommand;
|
|
311
|
+
});
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Base export
|
|
3
|
+
*/
|
|
4
|
+
export * from './plugin/lists';
|
|
5
|
+
export * from './plugin/dom-node';
|
|
6
|
+
export * from './plugin/alignments';
|
|
7
|
+
export * from './plugin/indents';
|
|
8
|
+
export * from './plugin/formats';
|
|
9
|
+
export * from './plugin/link';
|
|
10
|
+
export * from './plugin/insert-methods';
|
|
11
|
+
export * from './plugin/insert-text';
|
|
12
|
+
export * from './plugin/inserthtml-exec';
|
|
13
|
+
export * from './plugin/inserthtml';
|
|
14
|
+
export * from './plugin/isformatted';
|
|
15
|
+
export * from './plugin/ms-word-clean-up';
|
|
16
|
+
export * from './plugin/nodecutter';
|
|
17
|
+
export * from './plugin/image';
|
|
18
|
+
export * from './plugin/audio';
|
|
19
|
+
export * from './plugin/video';
|
|
20
|
+
export * from './plugin/selection-commands';
|
|
21
|
+
export * from './plugin/selection-exec';
|
|
22
|
+
export * from './plugin/clearformat-exec';
|
|
23
|
+
export * from './plugin/undo';
|
|
24
|
+
export * from './plugin/table';
|
|
25
|
+
export * from './plugin/toolbar-status';
|
|
26
|
+
export * from './plugin/format-painter-actions';
|
|
27
|
+
export * from './plugin/emoji-picker-action';
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
define(["require", "exports", "./plugin/lists", "./plugin/dom-node", "./plugin/alignments", "./plugin/indents", "./plugin/formats", "./plugin/link", "./plugin/insert-methods", "./plugin/insert-text", "./plugin/inserthtml-exec", "./plugin/inserthtml", "./plugin/isformatted", "./plugin/ms-word-clean-up", "./plugin/nodecutter", "./plugin/image", "./plugin/audio", "./plugin/video", "./plugin/selection-commands", "./plugin/selection-exec", "./plugin/clearformat-exec", "./plugin/undo", "./plugin/table", "./plugin/toolbar-status", "./plugin/format-painter-actions", "./plugin/emoji-picker-action"], function (require, exports, lists_1, dom_node_1, alignments_1, indents_1, formats_1, link_1, insert_methods_1, insert_text_1, inserthtml_exec_1, inserthtml_1, isformatted_1, ms_word_clean_up_1, nodecutter_1, image_1, audio_1, video_1, selection_commands_1, selection_exec_1, clearformat_exec_1, undo_1, table_1, toolbar_status_1, format_painter_actions_1, emoji_picker_action_1) {
|
|
2
|
+
"use strict";
|
|
3
|
+
function __export(m) {
|
|
4
|
+
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
|
|
5
|
+
}
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
__export(lists_1);
|
|
8
|
+
__export(dom_node_1);
|
|
9
|
+
__export(alignments_1);
|
|
10
|
+
__export(indents_1);
|
|
11
|
+
__export(formats_1);
|
|
12
|
+
__export(link_1);
|
|
13
|
+
__export(insert_methods_1);
|
|
14
|
+
__export(insert_text_1);
|
|
15
|
+
__export(inserthtml_exec_1);
|
|
16
|
+
__export(inserthtml_1);
|
|
17
|
+
__export(isformatted_1);
|
|
18
|
+
__export(ms_word_clean_up_1);
|
|
19
|
+
__export(nodecutter_1);
|
|
20
|
+
__export(image_1);
|
|
21
|
+
__export(audio_1);
|
|
22
|
+
__export(video_1);
|
|
23
|
+
__export(selection_commands_1);
|
|
24
|
+
__export(selection_exec_1);
|
|
25
|
+
__export(clearformat_exec_1);
|
|
26
|
+
__export(undo_1);
|
|
27
|
+
__export(table_1);
|
|
28
|
+
__export(toolbar_status_1);
|
|
29
|
+
__export(format_painter_actions_1);
|
|
30
|
+
__export(emoji_picker_action_1);
|
|
31
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './index';
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import * as index from './index';
|
|
2
|
+
index.RichTextEditor.Inject(index.Toolbar, index.Link, index.Image, index.ImportExport, index.Audio, index.Video, index.Count, index.QuickToolbar, index.HtmlEditor, index.MarkdownEditor, index.Table, index.PasteCleanup, index.Resize, index.FileManager, index.FormatPainter, index.EmojiPicker, index.SlashMenu);
|
|
3
|
+
export * from './index';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
define(["require", "exports", "./rich-text-editor/index", "./editor-manager/index", "./selection/index", "./markdown-parser/index", "./common/index"], function (require, exports, index_1, index_2, index_3, index_4, index_5) {
|
|
2
|
+
"use strict";
|
|
3
|
+
function __export(m) {
|
|
4
|
+
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
|
|
5
|
+
}
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
__export(index_1);
|
|
8
|
+
__export(index_2);
|
|
9
|
+
__export(index_3);
|
|
10
|
+
__export(index_4);
|
|
11
|
+
__export(index_5);
|
|
12
|
+
});
|