@syncfusion/ej2-richtexteditor 29.2.4-760237 → 29.2.4-771571
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 +260 -262
- 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 +22 -2
- package/dist/es6/ej2-richtexteditor.es2015.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es5.js +23 -2
- package/dist/es6/ej2-richtexteditor.es5.js.map +1 -1
- package/package.json +1 -1
- package/src/common/util.js +21 -1
- package/src/editor-manager/plugin/inserthtml.js +2 -1
- package/styles/bds-lite.css +278 -29
- package/styles/bds.css +289 -30
- package/styles/bootstrap-dark-lite.css +276 -27
- package/styles/bootstrap-dark.css +288 -29
- package/styles/bootstrap-lite.css +278 -29
- package/styles/bootstrap.css +290 -31
- package/styles/bootstrap4-lite.css +276 -27
- package/styles/bootstrap4.css +287 -28
- package/styles/bootstrap5-dark-lite.css +278 -29
- package/styles/bootstrap5-dark.css +289 -30
- package/styles/bootstrap5-lite.css +278 -29
- package/styles/bootstrap5.3-lite.css +276 -27
- package/styles/bootstrap5.3.css +288 -29
- package/styles/bootstrap5.css +289 -30
- package/styles/fabric-dark-lite.css +276 -27
- package/styles/fabric-dark.css +287 -28
- package/styles/fabric-lite.css +276 -27
- package/styles/fabric.css +287 -28
- package/styles/fluent-dark-lite.css +278 -29
- package/styles/fluent-dark.css +289 -31
- package/styles/fluent-lite.css +278 -29
- package/styles/fluent.css +289 -31
- package/styles/fluent2-lite.css +280 -31
- package/styles/fluent2.css +292 -33
- package/styles/highcontrast-light-lite.css +276 -27
- package/styles/highcontrast-light.css +287 -28
- package/styles/highcontrast-lite.css +276 -27
- package/styles/highcontrast.css +287 -28
- package/styles/material-dark-lite.css +276 -27
- package/styles/material-dark.css +287 -28
- package/styles/material-lite.css +276 -27
- package/styles/material.css +287 -28
- package/styles/material3-dark-lite.css +278 -27
- package/styles/material3-dark.css +289 -28
- package/styles/material3-lite.css +278 -27
- package/styles/material3.css +289 -28
- package/styles/rich-text-editor/_bds-definition.scss +9 -1
- package/styles/rich-text-editor/_bigger.scss +16 -3
- package/styles/rich-text-editor/_bootstrap-dark-definition.scss +9 -1
- package/styles/rich-text-editor/_bootstrap-definition.scss +10 -2
- package/styles/rich-text-editor/_bootstrap4-definition.scss +9 -1
- package/styles/rich-text-editor/_bootstrap5-definition.scss +10 -2
- package/styles/rich-text-editor/_bootstrap5.3-definition.scss +9 -1
- package/styles/rich-text-editor/_fabric-dark-definition.scss +9 -1
- package/styles/rich-text-editor/_fabric-definition.scss +9 -1
- package/styles/rich-text-editor/_fluent-definition.scss +9 -2
- package/styles/rich-text-editor/_fluent2-definition.scss +10 -2
- package/styles/rich-text-editor/_fusionnew-definition.scss +8 -1
- package/styles/rich-text-editor/_highcontrast-definition.scss +9 -1
- package/styles/rich-text-editor/_highcontrast-light-definition.scss +9 -1
- package/styles/rich-text-editor/_layout.scss +208 -25
- package/styles/rich-text-editor/_material-dark-definition.scss +9 -1
- package/styles/rich-text-editor/_material-definition.scss +9 -1
- package/styles/rich-text-editor/_material3-definition.scss +9 -1
- package/styles/rich-text-editor/_tailwind-definition.scss +9 -1
- package/styles/rich-text-editor/_tailwind3-definition.scss +11 -3
- package/styles/rich-text-editor/_theme.scss +3 -0
- package/styles/rich-text-editor/bds.css +289 -30
- package/styles/rich-text-editor/bootstrap-dark.css +288 -29
- package/styles/rich-text-editor/bootstrap.css +290 -31
- package/styles/rich-text-editor/bootstrap4.css +287 -28
- package/styles/rich-text-editor/bootstrap5-dark.css +289 -30
- package/styles/rich-text-editor/bootstrap5.3.css +288 -29
- package/styles/rich-text-editor/bootstrap5.css +289 -30
- package/styles/rich-text-editor/fabric-dark.css +287 -28
- package/styles/rich-text-editor/fabric.css +287 -28
- package/styles/rich-text-editor/fluent-dark.css +289 -31
- package/styles/rich-text-editor/fluent.css +289 -31
- package/styles/rich-text-editor/fluent2.css +292 -33
- package/styles/rich-text-editor/highcontrast-light.css +287 -28
- package/styles/rich-text-editor/highcontrast.css +287 -28
- package/styles/rich-text-editor/icons/_bds.scss +4 -1
- package/styles/rich-text-editor/icons/_bootstrap-dark.scss +4 -1
- package/styles/rich-text-editor/icons/_bootstrap.scss +4 -2
- package/styles/rich-text-editor/icons/_bootstrap4.scss +4 -2
- package/styles/rich-text-editor/icons/_bootstrap5.3.scss +4 -2
- package/styles/rich-text-editor/icons/_bootstrap5.scss +4 -2
- package/styles/rich-text-editor/icons/_fabric-dark.scss +4 -2
- package/styles/rich-text-editor/icons/_fabric.scss +4 -2
- package/styles/rich-text-editor/icons/_fluent.scss +5 -1
- package/styles/rich-text-editor/icons/_fluent2.scss +4 -2
- package/styles/rich-text-editor/icons/_fusionnew.scss +4 -2
- package/styles/rich-text-editor/icons/_highcontrast-light.scss +5 -1
- package/styles/rich-text-editor/icons/_highcontrast.scss +5 -1
- package/styles/rich-text-editor/icons/_material-dark.scss +5 -1
- package/styles/rich-text-editor/icons/_material.scss +5 -1
- package/styles/rich-text-editor/icons/_material3.scss +5 -1
- package/styles/rich-text-editor/icons/_tailwind.scss +5 -1
- package/styles/rich-text-editor/icons/_tailwind3.scss +5 -1
- package/styles/rich-text-editor/material-dark.css +287 -28
- package/styles/rich-text-editor/material.css +287 -28
- package/styles/rich-text-editor/material3-dark.css +289 -28
- package/styles/rich-text-editor/material3.css +289 -28
- package/styles/rich-text-editor/tailwind-dark.css +289 -30
- package/styles/rich-text-editor/tailwind.css +289 -30
- package/styles/rich-text-editor/tailwind3.css +291 -32
- package/styles/tailwind-dark-lite.css +278 -29
- package/styles/tailwind-dark.css +289 -30
- package/styles/tailwind-lite.css +278 -29
- package/styles/tailwind.css +289 -30
- package/styles/tailwind3-lite.css +280 -31
- package/styles/tailwind3.css +291 -32
- package/aceconfig.js +0 -17
- package/blazorGlobalSrc/common/config.d.ts +0 -63
- package/blazorGlobalSrc/common/config.js +0 -123
- package/blazorGlobalSrc/common/constant.d.ts +0 -117
- package/blazorGlobalSrc/common/constant.js +0 -23
- package/blazorGlobalSrc/common/editor-styles.d.ts +0 -1
- package/blazorGlobalSrc/common/editor-styles.js +0 -5
- package/blazorGlobalSrc/common/index.d.ts +0 -7
- package/blazorGlobalSrc/common/index.js +0 -9
- package/blazorGlobalSrc/common/interface.d.ts +0 -119
- package/blazorGlobalSrc/common/interface.js +0 -4
- package/blazorGlobalSrc/common/types.d.ts +0 -25
- package/blazorGlobalSrc/common/types.js +0 -4
- package/blazorGlobalSrc/common/user-agent.d.ts +0 -41
- package/blazorGlobalSrc/common/user-agent.js +0 -71
- package/blazorGlobalSrc/common/util.d.ts +0 -70
- package/blazorGlobalSrc/common/util.js +0 -222
- package/blazorGlobalSrc/components.d.ts +0 -8
- package/blazorGlobalSrc/components.js +0 -12
- package/blazorGlobalSrc/editor-manager/base/classes.d.ts +0 -31
- package/blazorGlobalSrc/editor-manager/base/classes.js +0 -28
- package/blazorGlobalSrc/editor-manager/base/constant.d.ts +0 -97
- package/blazorGlobalSrc/editor-manager/base/constant.js +0 -41
- package/blazorGlobalSrc/editor-manager/base/editor-manager.d.ts +0 -95
- package/blazorGlobalSrc/editor-manager/base/editor-manager.js +0 -339
- package/blazorGlobalSrc/editor-manager/base/enum.d.ts +0 -17
- package/blazorGlobalSrc/editor-manager/base/enum.js +0 -4
- package/blazorGlobalSrc/editor-manager/base/interface.d.ts +0 -263
- package/blazorGlobalSrc/editor-manager/base/interface.js +0 -4
- package/blazorGlobalSrc/editor-manager/base/types.d.ts +0 -7
- package/blazorGlobalSrc/editor-manager/base/types.js +0 -4
- package/blazorGlobalSrc/editor-manager/base.d.ts +0 -8
- package/blazorGlobalSrc/editor-manager/base.js +0 -10
- package/blazorGlobalSrc/editor-manager/index.d.ts +0 -5
- package/blazorGlobalSrc/editor-manager/index.js +0 -9
- package/blazorGlobalSrc/editor-manager/plugin/alignments.d.ts +0 -26
- package/blazorGlobalSrc/editor-manager/plugin/alignments.js +0 -105
- package/blazorGlobalSrc/editor-manager/plugin/audio.d.ts +0 -34
- package/blazorGlobalSrc/editor-manager/plugin/audio.js +0 -145
- package/blazorGlobalSrc/editor-manager/plugin/clearformat-exec.d.ts +0 -24
- package/blazorGlobalSrc/editor-manager/plugin/clearformat-exec.js +0 -47
- package/blazorGlobalSrc/editor-manager/plugin/clearformat.d.ts +0 -29
- package/blazorGlobalSrc/editor-manager/plugin/clearformat.js +0 -249
- package/blazorGlobalSrc/editor-manager/plugin/dom-node.d.ts +0 -351
- package/blazorGlobalSrc/editor-manager/plugin/dom-node.js +0 -737
- package/blazorGlobalSrc/editor-manager/plugin/dom-tree.d.ts +0 -84
- package/blazorGlobalSrc/editor-manager/plugin/dom-tree.js +0 -164
- package/blazorGlobalSrc/editor-manager/plugin/emoji-picker-action.d.ts +0 -10
- package/blazorGlobalSrc/editor-manager/plugin/emoji-picker-action.js +0 -86
- package/blazorGlobalSrc/editor-manager/plugin/format-painter-actions.d.ts +0 -47
- package/blazorGlobalSrc/editor-manager/plugin/format-painter-actions.js +0 -622
- package/blazorGlobalSrc/editor-manager/plugin/formats.d.ts +0 -43
- package/blazorGlobalSrc/editor-manager/plugin/formats.js +0 -597
- package/blazorGlobalSrc/editor-manager/plugin/image.d.ts +0 -48
- package/blazorGlobalSrc/editor-manager/plugin/image.js +0 -399
- package/blazorGlobalSrc/editor-manager/plugin/indents.d.ts +0 -24
- package/blazorGlobalSrc/editor-manager/plugin/indents.js +0 -106
- package/blazorGlobalSrc/editor-manager/plugin/insert-methods.d.ts +0 -48
- package/blazorGlobalSrc/editor-manager/plugin/insert-methods.js +0 -37
- package/blazorGlobalSrc/editor-manager/plugin/insert-text.d.ts +0 -22
- package/blazorGlobalSrc/editor-manager/plugin/insert-text.js +0 -36
- package/blazorGlobalSrc/editor-manager/plugin/inserthtml-exec.d.ts +0 -22
- package/blazorGlobalSrc/editor-manager/plugin/inserthtml-exec.js +0 -49
- package/blazorGlobalSrc/editor-manager/plugin/inserthtml.d.ts +0 -51
- package/blazorGlobalSrc/editor-manager/plugin/inserthtml.js +0 -985
- package/blazorGlobalSrc/editor-manager/plugin/isformatted.d.ts +0 -89
- package/blazorGlobalSrc/editor-manager/plugin/isformatted.js +0 -199
- package/blazorGlobalSrc/editor-manager/plugin/link.d.ts +0 -41
- package/blazorGlobalSrc/editor-manager/plugin/link.js +0 -550
- package/blazorGlobalSrc/editor-manager/plugin/lists.d.ts +0 -74
- package/blazorGlobalSrc/editor-manager/plugin/lists.js +0 -1503
- package/blazorGlobalSrc/editor-manager/plugin/ms-word-clean-up.d.ts +0 -61
- package/blazorGlobalSrc/editor-manager/plugin/ms-word-clean-up.js +0 -1136
- package/blazorGlobalSrc/editor-manager/plugin/nodecutter.d.ts +0 -64
- package/blazorGlobalSrc/editor-manager/plugin/nodecutter.js +0 -167
- package/blazorGlobalSrc/editor-manager/plugin/selection-commands.d.ts +0 -41
- package/blazorGlobalSrc/editor-manager/plugin/selection-commands.js +0 -1069
- package/blazorGlobalSrc/editor-manager/plugin/selection-exec.d.ts +0 -24
- package/blazorGlobalSrc/editor-manager/plugin/selection-exec.js +0 -49
- package/blazorGlobalSrc/editor-manager/plugin/table-selection.d.ts +0 -26
- package/blazorGlobalSrc/editor-manager/plugin/table-selection.js +0 -210
- package/blazorGlobalSrc/editor-manager/plugin/table.d.ts +0 -56
- package/blazorGlobalSrc/editor-manager/plugin/table.js +0 -1100
- package/blazorGlobalSrc/editor-manager/plugin/toolbar-status.d.ts +0 -39
- package/blazorGlobalSrc/editor-manager/plugin/toolbar-status.js +0 -384
- package/blazorGlobalSrc/editor-manager/plugin/undo.d.ts +0 -85
- package/blazorGlobalSrc/editor-manager/plugin/undo.js +0 -216
- package/blazorGlobalSrc/editor-manager/plugin/video.d.ts +0 -38
- package/blazorGlobalSrc/editor-manager/plugin/video.js +0 -311
- package/blazorGlobalSrc/editor-manager/plugin.d.ts +0 -27
- package/blazorGlobalSrc/editor-manager/plugin.js +0 -31
- package/blazorGlobalSrc/global.d.ts +0 -1
- package/blazorGlobalSrc/global.js +0 -3
- package/blazorGlobalSrc/index.d.ts +0 -8
- package/blazorGlobalSrc/index.js +0 -12
- package/blazorGlobalSrc/markdown-parser/base/constant.d.ts +0 -39
- package/blazorGlobalSrc/markdown-parser/base/constant.js +0 -10
- package/blazorGlobalSrc/markdown-parser/base/interface.d.ts +0 -169
- package/blazorGlobalSrc/markdown-parser/base/interface.js +0 -4
- package/blazorGlobalSrc/markdown-parser/base/markdown-parser.d.ts +0 -69
- package/blazorGlobalSrc/markdown-parser/base/markdown-parser.js +0 -87
- package/blazorGlobalSrc/markdown-parser/base/types.d.ts +0 -7
- package/blazorGlobalSrc/markdown-parser/base/types.js +0 -4
- package/blazorGlobalSrc/markdown-parser/base.d.ts +0 -7
- package/blazorGlobalSrc/markdown-parser/base.js +0 -9
- package/blazorGlobalSrc/markdown-parser/index.d.ts +0 -5
- package/blazorGlobalSrc/markdown-parser/index.js +0 -9
- package/blazorGlobalSrc/markdown-parser/plugin/clearformat.d.ts +0 -28
- package/blazorGlobalSrc/markdown-parser/plugin/clearformat.js +0 -110
- package/blazorGlobalSrc/markdown-parser/plugin/formats.d.ts +0 -32
- package/blazorGlobalSrc/markdown-parser/plugin/formats.js +0 -225
- package/blazorGlobalSrc/markdown-parser/plugin/insert-text.d.ts +0 -24
- package/blazorGlobalSrc/markdown-parser/plugin/insert-text.js +0 -49
- package/blazorGlobalSrc/markdown-parser/plugin/link.d.ts +0 -24
- package/blazorGlobalSrc/markdown-parser/plugin/link.js +0 -50
- package/blazorGlobalSrc/markdown-parser/plugin/lists.d.ts +0 -39
- package/blazorGlobalSrc/markdown-parser/plugin/lists.js +0 -462
- package/blazorGlobalSrc/markdown-parser/plugin/markdown-selection.d.ts +0 -140
- package/blazorGlobalSrc/markdown-parser/plugin/markdown-selection.js +0 -104
- package/blazorGlobalSrc/markdown-parser/plugin/md-selection-formats.d.ts +0 -31
- package/blazorGlobalSrc/markdown-parser/plugin/md-selection-formats.js +0 -335
- package/blazorGlobalSrc/markdown-parser/plugin/table.d.ts +0 -52
- package/blazorGlobalSrc/markdown-parser/plugin/table.js +0 -216
- package/blazorGlobalSrc/markdown-parser/plugin/undo.d.ts +0 -83
- package/blazorGlobalSrc/markdown-parser/plugin/undo.js +0 -147
- package/blazorGlobalSrc/markdown-parser/plugin.d.ts +0 -11
- package/blazorGlobalSrc/markdown-parser/plugin.js +0 -15
- package/blazorGlobalSrc/rich-text-editor/actions/base-quick-toolbar.d.ts +0 -114
- package/blazorGlobalSrc/rich-text-editor/actions/base-quick-toolbar.js +0 -465
- package/blazorGlobalSrc/rich-text-editor/actions/base-toolbar.d.ts +0 -58
- package/blazorGlobalSrc/rich-text-editor/actions/base-toolbar.js +0 -216
- package/blazorGlobalSrc/rich-text-editor/actions/color-picker.d.ts +0 -52
- package/blazorGlobalSrc/rich-text-editor/actions/color-picker.js +0 -241
- package/blazorGlobalSrc/rich-text-editor/actions/count.d.ts +0 -55
- package/blazorGlobalSrc/rich-text-editor/actions/count.js +0 -117
- package/blazorGlobalSrc/rich-text-editor/actions/dropdown-buttons.d.ts +0 -72
- package/blazorGlobalSrc/rich-text-editor/actions/dropdown-buttons.js +0 -552
- package/blazorGlobalSrc/rich-text-editor/actions/emoji-picker.d.ts +0 -51
- package/blazorGlobalSrc/rich-text-editor/actions/emoji-picker.js +0 -853
- package/blazorGlobalSrc/rich-text-editor/actions/enter-key.d.ts +0 -28
- package/blazorGlobalSrc/rich-text-editor/actions/enter-key.js +0 -821
- package/blazorGlobalSrc/rich-text-editor/actions/execute-command-callback.d.ts +0 -11
- package/blazorGlobalSrc/rich-text-editor/actions/execute-command-callback.js +0 -28
- package/blazorGlobalSrc/rich-text-editor/actions/file-manager.d.ts +0 -45
- package/blazorGlobalSrc/rich-text-editor/actions/file-manager.js +0 -249
- package/blazorGlobalSrc/rich-text-editor/actions/format-painter.d.ts +0 -25
- package/blazorGlobalSrc/rich-text-editor/actions/format-painter.js +0 -156
- package/blazorGlobalSrc/rich-text-editor/actions/full-screen.d.ts +0 -40
- package/blazorGlobalSrc/rich-text-editor/actions/full-screen.js +0 -148
- package/blazorGlobalSrc/rich-text-editor/actions/html-attributes.d.ts +0 -15
- package/blazorGlobalSrc/rich-text-editor/actions/html-attributes.js +0 -50
- package/blazorGlobalSrc/rich-text-editor/actions/html-editor.d.ts +0 -120
- package/blazorGlobalSrc/rich-text-editor/actions/html-editor.js +0 -1244
- package/blazorGlobalSrc/rich-text-editor/actions/html-toolbar-status.d.ts +0 -14
- package/blazorGlobalSrc/rich-text-editor/actions/html-toolbar-status.js +0 -47
- package/blazorGlobalSrc/rich-text-editor/actions/import-export.d.ts +0 -21
- package/blazorGlobalSrc/rich-text-editor/actions/import-export.js +0 -117
- package/blazorGlobalSrc/rich-text-editor/actions/keyboard-model.d.ts +0 -30
- package/blazorGlobalSrc/rich-text-editor/actions/keyboard.d.ts +0 -110
- package/blazorGlobalSrc/rich-text-editor/actions/keyboard.js +0 -163
- package/blazorGlobalSrc/rich-text-editor/actions/markdown-editor.d.ts +0 -66
- package/blazorGlobalSrc/rich-text-editor/actions/markdown-editor.js +0 -142
- package/blazorGlobalSrc/rich-text-editor/actions/markdown-toolbar-status.d.ts +0 -23
- package/blazorGlobalSrc/rich-text-editor/actions/markdown-toolbar-status.js +0 -124
- package/blazorGlobalSrc/rich-text-editor/actions/paste-clean-up.d.ts +0 -86
- package/blazorGlobalSrc/rich-text-editor/actions/paste-clean-up.js +0 -1071
- package/blazorGlobalSrc/rich-text-editor/actions/quick-toolbar.d.ts +0 -151
- package/blazorGlobalSrc/rich-text-editor/actions/quick-toolbar.js +0 -548
- package/blazorGlobalSrc/rich-text-editor/actions/resize.d.ts +0 -37
- package/blazorGlobalSrc/rich-text-editor/actions/resize.js +0 -188
- package/blazorGlobalSrc/rich-text-editor/actions/sanitize-helper.d.ts +0 -11
- package/blazorGlobalSrc/rich-text-editor/actions/sanitize-helper.js +0 -168
- package/blazorGlobalSrc/rich-text-editor/actions/toolbar-action.d.ts +0 -18
- package/blazorGlobalSrc/rich-text-editor/actions/toolbar-action.js +0 -76
- package/blazorGlobalSrc/rich-text-editor/actions/toolbar.d.ts +0 -185
- package/blazorGlobalSrc/rich-text-editor/actions/toolbar.js +0 -512
- package/blazorGlobalSrc/rich-text-editor/actions/xhtml-validation.d.ts +0 -25
- package/blazorGlobalSrc/rich-text-editor/actions/xhtml-validation.js +0 -166
- package/blazorGlobalSrc/rich-text-editor/actions.d.ts +0 -26
- package/blazorGlobalSrc/rich-text-editor/actions.js +0 -30
- package/blazorGlobalSrc/rich-text-editor/audio.d.ts +0 -4
- package/blazorGlobalSrc/rich-text-editor/audio.js +0 -8
- package/blazorGlobalSrc/rich-text-editor/base/classes.d.ts +0 -628
- package/blazorGlobalSrc/rich-text-editor/base/classes.js +0 -129
- package/blazorGlobalSrc/rich-text-editor/base/constant.d.ts +0 -808
- package/blazorGlobalSrc/rich-text-editor/base/constant.js +0 -334
- package/blazorGlobalSrc/rich-text-editor/base/enum.d.ts +0 -81
- package/blazorGlobalSrc/rich-text-editor/base/enum.js +0 -37
- package/blazorGlobalSrc/rich-text-editor/base/interface.d.ts +0 -1577
- package/blazorGlobalSrc/rich-text-editor/base/interface.js +0 -194
- package/blazorGlobalSrc/rich-text-editor/base/rich-text-editor-model.d.ts +0 -1032
- package/blazorGlobalSrc/rich-text-editor/base/rich-text-editor.d.ts +0 -1699
- package/blazorGlobalSrc/rich-text-editor/base/rich-text-editor.js +0 -2645
- package/blazorGlobalSrc/rich-text-editor/base/util.d.ts +0 -212
- package/blazorGlobalSrc/rich-text-editor/base/util.js +0 -610
- package/blazorGlobalSrc/rich-text-editor/base.d.ts +0 -10
- package/blazorGlobalSrc/rich-text-editor/base.js +0 -13
- package/blazorGlobalSrc/rich-text-editor/formatter/formatter.d.ts +0 -87
- package/blazorGlobalSrc/rich-text-editor/formatter/formatter.js +0 -223
- package/blazorGlobalSrc/rich-text-editor/formatter/html-formatter.d.ts +0 -34
- package/blazorGlobalSrc/rich-text-editor/formatter/html-formatter.js +0 -44
- package/blazorGlobalSrc/rich-text-editor/formatter/markdown-formatter.d.ts +0 -39
- package/blazorGlobalSrc/rich-text-editor/formatter/markdown-formatter.js +0 -48
- package/blazorGlobalSrc/rich-text-editor/formatter.d.ts +0 -6
- package/blazorGlobalSrc/rich-text-editor/formatter.js +0 -10
- package/blazorGlobalSrc/rich-text-editor/html-editor.d.ts +0 -4
- package/blazorGlobalSrc/rich-text-editor/html-editor.js +0 -8
- package/blazorGlobalSrc/rich-text-editor/image.d.ts +0 -4
- package/blazorGlobalSrc/rich-text-editor/image.js +0 -8
- package/blazorGlobalSrc/rich-text-editor/index.d.ts +0 -9
- package/blazorGlobalSrc/rich-text-editor/index.js +0 -12
- package/blazorGlobalSrc/rich-text-editor/link.d.ts +0 -4
- package/blazorGlobalSrc/rich-text-editor/link.js +0 -8
- package/blazorGlobalSrc/rich-text-editor/markdown-editor.d.ts +0 -4
- package/blazorGlobalSrc/rich-text-editor/markdown-editor.js +0 -8
- package/blazorGlobalSrc/rich-text-editor/models/default-locale.d.ts +0 -25
- package/blazorGlobalSrc/rich-text-editor/models/default-locale.js +0 -391
- package/blazorGlobalSrc/rich-text-editor/models/iframe-settings-model.d.ts +0 -68
- package/blazorGlobalSrc/rich-text-editor/models/iframe-settings.d.ts +0 -61
- package/blazorGlobalSrc/rich-text-editor/models/iframe-settings.js +0 -60
- package/blazorGlobalSrc/rich-text-editor/models/inline-mode-model.d.ts +0 -24
- package/blazorGlobalSrc/rich-text-editor/models/inline-mode.d.ts +0 -20
- package/blazorGlobalSrc/rich-text-editor/models/inline-mode.js +0 -37
- package/blazorGlobalSrc/rich-text-editor/models/items.d.ts +0 -36
- package/blazorGlobalSrc/rich-text-editor/models/items.js +0 -1011
- package/blazorGlobalSrc/rich-text-editor/models/models.d.ts +0 -7
- package/blazorGlobalSrc/rich-text-editor/models/models.js +0 -4
- package/blazorGlobalSrc/rich-text-editor/models/slash-menu-settings-model.d.ts +0 -40
- package/blazorGlobalSrc/rich-text-editor/models/slash-menu-settings.d.ts +0 -50
- package/blazorGlobalSrc/rich-text-editor/models/slash-menu-settings.js +0 -143
- package/blazorGlobalSrc/rich-text-editor/models/toolbar-settings-model.d.ts +0 -1130
- package/blazorGlobalSrc/rich-text-editor/models/toolbar-settings.d.ts +0 -992
- package/blazorGlobalSrc/rich-text-editor/models/toolbar-settings.js +0 -510
- package/blazorGlobalSrc/rich-text-editor/models.d.ts +0 -4
- package/blazorGlobalSrc/rich-text-editor/models.js +0 -4
- package/blazorGlobalSrc/rich-text-editor/quick-toolbar.d.ts +0 -4
- package/blazorGlobalSrc/rich-text-editor/quick-toolbar.js +0 -8
- package/blazorGlobalSrc/rich-text-editor/renderer/audio-module.d.ts +0 -82
- package/blazorGlobalSrc/rich-text-editor/renderer/audio-module.js +0 -886
- package/blazorGlobalSrc/rich-text-editor/renderer/content-renderer.d.ts +0 -65
- package/blazorGlobalSrc/rich-text-editor/renderer/content-renderer.js +0 -49
- package/blazorGlobalSrc/rich-text-editor/renderer/dialog-renderer.d.ts +0 -39
- package/blazorGlobalSrc/rich-text-editor/renderer/dialog-renderer.js +0 -111
- package/blazorGlobalSrc/rich-text-editor/renderer/iframe-content-renderer.d.ts +0 -33
- package/blazorGlobalSrc/rich-text-editor/renderer/iframe-content-renderer.js +0 -101
- package/blazorGlobalSrc/rich-text-editor/renderer/image-module.d.ts +0 -199
- package/blazorGlobalSrc/rich-text-editor/renderer/image-module.js +0 -2494
- package/blazorGlobalSrc/rich-text-editor/renderer/link-module.d.ts +0 -63
- package/blazorGlobalSrc/rich-text-editor/renderer/link-module.js +0 -596
- package/blazorGlobalSrc/rich-text-editor/renderer/markdown-renderer.d.ts +0 -65
- package/blazorGlobalSrc/rich-text-editor/renderer/markdown-renderer.js +0 -38
- package/blazorGlobalSrc/rich-text-editor/renderer/popup-renderer.d.ts +0 -54
- package/blazorGlobalSrc/rich-text-editor/renderer/popup-renderer.js +0 -35
- package/blazorGlobalSrc/rich-text-editor/renderer/render.d.ts +0 -46
- package/blazorGlobalSrc/rich-text-editor/renderer/render.js +0 -70
- package/blazorGlobalSrc/rich-text-editor/renderer/slash-menu.d.ts +0 -20
- package/blazorGlobalSrc/rich-text-editor/renderer/slash-menu.js +0 -224
- package/blazorGlobalSrc/rich-text-editor/renderer/table-module.d.ts +0 -155
- package/blazorGlobalSrc/rich-text-editor/renderer/table-module.js +0 -2206
- package/blazorGlobalSrc/rich-text-editor/renderer/toolbar-renderer.d.ts +0 -131
- package/blazorGlobalSrc/rich-text-editor/renderer/toolbar-renderer.js +0 -747
- package/blazorGlobalSrc/rich-text-editor/renderer/video-module.d.ts +0 -120
- package/blazorGlobalSrc/rich-text-editor/renderer/video-module.js +0 -1507
- package/blazorGlobalSrc/rich-text-editor/renderer/view-source.d.ts +0 -74
- package/blazorGlobalSrc/rich-text-editor/renderer/view-source.js +0 -225
- package/blazorGlobalSrc/rich-text-editor/renderer.d.ts +0 -17
- package/blazorGlobalSrc/rich-text-editor/renderer.js +0 -21
- package/blazorGlobalSrc/rich-text-editor/services/renderer-factory.d.ts +0 -33
- package/blazorGlobalSrc/rich-text-editor/services/renderer-factory.js +0 -29
- package/blazorGlobalSrc/rich-text-editor/services/service-locator.d.ts +0 -29
- package/blazorGlobalSrc/rich-text-editor/services/service-locator.js +0 -25
- package/blazorGlobalSrc/rich-text-editor/services.d.ts +0 -5
- package/blazorGlobalSrc/rich-text-editor/services.js +0 -9
- package/blazorGlobalSrc/rich-text-editor/toolbar.d.ts +0 -4
- package/blazorGlobalSrc/rich-text-editor/toolbar.js +0 -8
- package/blazorGlobalSrc/rich-text-editor/video.d.ts +0 -4
- package/blazorGlobalSrc/rich-text-editor/video.js +0 -8
- package/blazorGlobalSrc/rich-text-editor.d.ts +0 -4
- package/blazorGlobalSrc/rich-text-editor.js +0 -8
- package/blazorGlobalSrc/selection/index.d.ts +0 -4
- package/blazorGlobalSrc/selection/index.js +0 -8
- package/blazorGlobalSrc/selection/selection.d.ts +0 -244
- package/blazorGlobalSrc/selection/selection.js +0 -309
- package/helpers/e2e/index.d.ts +0 -1
- package/helpers/e2e/index.js +0 -8
- package/helpers/e2e/rte-helper.d.ts +0 -79
- package/helpers/e2e/rte-helper.js +0 -81
- package/src/global.d.ts +0 -1
- package/tslint.json +0 -111
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { EditorManager } from './../base/editor-manager';
|
|
2
|
-
/**
|
|
3
|
-
* Formats internal component
|
|
4
|
-
*
|
|
5
|
-
* @hidden
|
|
6
|
-
* @deprecated
|
|
7
|
-
*/
|
|
8
|
-
export declare class Alignments {
|
|
9
|
-
private parent;
|
|
10
|
-
private alignments;
|
|
11
|
-
/**
|
|
12
|
-
* Constructor for creating the Formats plugin
|
|
13
|
-
*
|
|
14
|
-
* @param {EditorManager} parent - specifies the parent element.
|
|
15
|
-
* @returns {void}
|
|
16
|
-
* @hidden
|
|
17
|
-
* @deprecated
|
|
18
|
-
*/
|
|
19
|
-
constructor(parent: EditorManager);
|
|
20
|
-
private addEventListener;
|
|
21
|
-
private removeEventListener;
|
|
22
|
-
private onKeyDown;
|
|
23
|
-
private getTableNode;
|
|
24
|
-
private applyAlignment;
|
|
25
|
-
destroy(): void;
|
|
26
|
-
}
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
define(["require", "exports", "./../base/constant", "@syncfusion/ej2-base", "./../../common/constant", "../../common/util"], function (require, exports, CONSTANT, ej2_base_1, EVENTS, util_1) {
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
var Alignments = (function () {
|
|
5
|
-
function Alignments(parent) {
|
|
6
|
-
this.alignments = {
|
|
7
|
-
'JustifyLeft': 'left',
|
|
8
|
-
'JustifyCenter': 'center',
|
|
9
|
-
'JustifyRight': 'right',
|
|
10
|
-
'JustifyFull': 'justify'
|
|
11
|
-
};
|
|
12
|
-
this.parent = parent;
|
|
13
|
-
this.addEventListener();
|
|
14
|
-
}
|
|
15
|
-
Alignments.prototype.addEventListener = function () {
|
|
16
|
-
this.parent.observer.on(CONSTANT.ALIGNMENT_TYPE, this.applyAlignment, this);
|
|
17
|
-
this.parent.observer.on(EVENTS.KEY_DOWN_HANDLER, this.onKeyDown, this);
|
|
18
|
-
this.parent.observer.on(EVENTS.INTERNAL_DESTROY, this.destroy, this);
|
|
19
|
-
};
|
|
20
|
-
Alignments.prototype.removeEventListener = function () {
|
|
21
|
-
this.parent.observer.off(CONSTANT.ALIGNMENT_TYPE, this.applyAlignment);
|
|
22
|
-
this.parent.observer.off(EVENTS.KEY_DOWN_HANDLER, this.onKeyDown);
|
|
23
|
-
this.parent.observer.off(EVENTS.INTERNAL_DESTROY, this.destroy);
|
|
24
|
-
};
|
|
25
|
-
Alignments.prototype.onKeyDown = function (e) {
|
|
26
|
-
switch (e.event.action) {
|
|
27
|
-
case 'justify-center':
|
|
28
|
-
this.applyAlignment({ subCommand: 'JustifyCenter', callBack: e.callBack });
|
|
29
|
-
e.event.preventDefault();
|
|
30
|
-
break;
|
|
31
|
-
case 'justify-full':
|
|
32
|
-
this.applyAlignment({ subCommand: 'JustifyFull', callBack: e.callBack });
|
|
33
|
-
e.event.preventDefault();
|
|
34
|
-
break;
|
|
35
|
-
case 'justify-left':
|
|
36
|
-
this.applyAlignment({ subCommand: 'JustifyLeft', callBack: e.callBack });
|
|
37
|
-
e.event.preventDefault();
|
|
38
|
-
break;
|
|
39
|
-
case 'justify-right':
|
|
40
|
-
this.applyAlignment({ subCommand: 'JustifyRight', callBack: e.callBack });
|
|
41
|
-
e.event.preventDefault();
|
|
42
|
-
break;
|
|
43
|
-
}
|
|
44
|
-
};
|
|
45
|
-
Alignments.prototype.getTableNode = function (range) {
|
|
46
|
-
var startNode = range.startContainer.nodeType === Node.ELEMENT_NODE
|
|
47
|
-
? range.startContainer : range.startContainer.parentNode;
|
|
48
|
-
var cellNode = ej2_base_1.closest(startNode, 'td,th');
|
|
49
|
-
return [cellNode];
|
|
50
|
-
};
|
|
51
|
-
Alignments.prototype.applyAlignment = function (e) {
|
|
52
|
-
var isTableAlign = e.value === 'Table' ? true : false;
|
|
53
|
-
var range = this.parent.nodeSelection.getRange(this.parent.currentDocument);
|
|
54
|
-
var save = this.parent.nodeSelection.save(range, this.parent.currentDocument);
|
|
55
|
-
if (!isTableAlign) {
|
|
56
|
-
this.parent.domNode.setMarker(save);
|
|
57
|
-
var alignmentNodes = this.parent.domNode.blockNodes();
|
|
58
|
-
if (e.enterAction === 'BR') {
|
|
59
|
-
alignmentNodes = this.parent.domNode.convertToBlockNodes(alignmentNodes, false);
|
|
60
|
-
}
|
|
61
|
-
for (var i = 0; i < alignmentNodes.length; i++) {
|
|
62
|
-
var parentNode = alignmentNodes[i];
|
|
63
|
-
ej2_base_1.setStyleAttribute(parentNode, { 'text-align': this.alignments[e.subCommand] });
|
|
64
|
-
}
|
|
65
|
-
var imageTags = this.parent.domNode.getImageTagInSelection();
|
|
66
|
-
for (var i = 0; i < imageTags.length; i++) {
|
|
67
|
-
var elementNode = [];
|
|
68
|
-
elementNode.push(imageTags[i]);
|
|
69
|
-
this.parent.imgObj.imageCommand({
|
|
70
|
-
item: {
|
|
71
|
-
selectNode: elementNode
|
|
72
|
-
},
|
|
73
|
-
subCommand: e.subCommand,
|
|
74
|
-
value: e.subCommand,
|
|
75
|
-
callBack: e.callBack,
|
|
76
|
-
selector: e.selector
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
this.parent.editableElement.focus({ preventScroll: true });
|
|
80
|
-
save = this.parent.domNode.saveMarker(save);
|
|
81
|
-
if (util_1.isIDevice()) {
|
|
82
|
-
util_1.setEditFrameFocus(this.parent.editableElement, e.selector);
|
|
83
|
-
}
|
|
84
|
-
save.restore();
|
|
85
|
-
}
|
|
86
|
-
else {
|
|
87
|
-
ej2_base_1.setStyleAttribute(this.getTableNode(range)[0], { 'text-align': this.alignments[e.subCommand] });
|
|
88
|
-
}
|
|
89
|
-
if (e.callBack) {
|
|
90
|
-
e.callBack({
|
|
91
|
-
requestType: e.subCommand,
|
|
92
|
-
editorMode: 'HTML',
|
|
93
|
-
event: e.event,
|
|
94
|
-
range: this.parent.nodeSelection.getRange(this.parent.currentDocument),
|
|
95
|
-
elements: (isTableAlign ? this.getTableNode(range) : this.parent.domNode.blockNodes())
|
|
96
|
-
});
|
|
97
|
-
}
|
|
98
|
-
};
|
|
99
|
-
Alignments.prototype.destroy = function () {
|
|
100
|
-
this.removeEventListener();
|
|
101
|
-
};
|
|
102
|
-
return Alignments;
|
|
103
|
-
}());
|
|
104
|
-
exports.Alignments = Alignments;
|
|
105
|
-
});
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { EditorManager } from './../base/editor-manager';
|
|
2
|
-
import { IHtmlItem } from './../base/interface';
|
|
3
|
-
/**
|
|
4
|
-
* Audio internal component
|
|
5
|
-
*
|
|
6
|
-
* @hidden
|
|
7
|
-
* @deprecated
|
|
8
|
-
*/
|
|
9
|
-
export declare class AudioCommand {
|
|
10
|
-
private parent;
|
|
11
|
-
/**
|
|
12
|
-
* Constructor for creating the Audio plugin
|
|
13
|
-
*
|
|
14
|
-
* @param {EditorManager} parent - specifies the parent element
|
|
15
|
-
* @hidden
|
|
16
|
-
* @deprecated
|
|
17
|
-
*/
|
|
18
|
-
constructor(parent: EditorManager);
|
|
19
|
-
private addEventListener;
|
|
20
|
-
private removeEventListener;
|
|
21
|
-
/**
|
|
22
|
-
* audioCommand method
|
|
23
|
-
*
|
|
24
|
-
* @param {IHtmlItem} e - specifies the element
|
|
25
|
-
* @returns {void}
|
|
26
|
-
* @hidden
|
|
27
|
-
* @deprecated
|
|
28
|
-
*/
|
|
29
|
-
audioCommand(e: IHtmlItem): void;
|
|
30
|
-
private createAudio;
|
|
31
|
-
private setStyle;
|
|
32
|
-
private callBack;
|
|
33
|
-
destroy(): void;
|
|
34
|
-
}
|
|
@@ -1,145 +0,0 @@
|
|
|
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 AudioCommand = (function () {
|
|
5
|
-
function AudioCommand(parent) {
|
|
6
|
-
this.parent = parent;
|
|
7
|
-
this.addEventListener();
|
|
8
|
-
}
|
|
9
|
-
AudioCommand.prototype.addEventListener = function () {
|
|
10
|
-
this.parent.observer.on(CONSTANT.AUDIO, this.audioCommand, this);
|
|
11
|
-
this.parent.observer.on(EVENTS.INTERNAL_DESTROY, this.destroy, this);
|
|
12
|
-
};
|
|
13
|
-
AudioCommand.prototype.removeEventListener = function () {
|
|
14
|
-
this.parent.observer.off(CONSTANT.AUDIO, this.audioCommand);
|
|
15
|
-
this.parent.observer.off(EVENTS.INTERNAL_DESTROY, this.destroy);
|
|
16
|
-
};
|
|
17
|
-
AudioCommand.prototype.audioCommand = function (e) {
|
|
18
|
-
var selectNode;
|
|
19
|
-
var audiowrapper;
|
|
20
|
-
var value = e.value.toString().toLowerCase();
|
|
21
|
-
if (value === 'inline' || value === 'break' || value === 'audioremove') {
|
|
22
|
-
selectNode = e.item.selectNode[0];
|
|
23
|
-
audiowrapper = selectNode.closest('.' + classes.CLASS_AUDIO_WRAP);
|
|
24
|
-
}
|
|
25
|
-
switch (value) {
|
|
26
|
-
case 'audio':
|
|
27
|
-
case 'audioreplace':
|
|
28
|
-
this.createAudio(e);
|
|
29
|
-
break;
|
|
30
|
-
case 'inline':
|
|
31
|
-
selectNode.removeAttribute('class');
|
|
32
|
-
audiowrapper.style.display = 'inline-block';
|
|
33
|
-
ej2_base_1.addClass([selectNode], [classes.CLASS_AUDIO, classes.CLASS_AUDIO_INLINE, classes.CLASS_AUDIO_FOCUS]);
|
|
34
|
-
this.callBack(e);
|
|
35
|
-
break;
|
|
36
|
-
case 'break':
|
|
37
|
-
selectNode.removeAttribute('class');
|
|
38
|
-
audiowrapper.style.display = 'block';
|
|
39
|
-
ej2_base_1.addClass([selectNode], [classes.CLASS_AUDIO_BREAK, classes.CLASS_AUDIO, classes.CLASS_AUDIO_FOCUS]);
|
|
40
|
-
this.callBack(e);
|
|
41
|
-
break;
|
|
42
|
-
case 'audioremove':
|
|
43
|
-
if (audiowrapper) {
|
|
44
|
-
ej2_base_1.detach(audiowrapper);
|
|
45
|
-
}
|
|
46
|
-
else {
|
|
47
|
-
ej2_base_1.detach(selectNode);
|
|
48
|
-
}
|
|
49
|
-
this.callBack(e);
|
|
50
|
-
break;
|
|
51
|
-
}
|
|
52
|
-
};
|
|
53
|
-
AudioCommand.prototype.createAudio = function (e) {
|
|
54
|
-
var _this = this;
|
|
55
|
-
var isReplaced = false;
|
|
56
|
-
var wrapElement;
|
|
57
|
-
if (!ej2_base_1.isNullOrUndefined(e.item.selectParent) && e.item.selectParent[0].classList &&
|
|
58
|
-
(e.item.selectParent[0].classList.contains(classes.CLASS_CLICK_ELEM) ||
|
|
59
|
-
e.item.selectParent[0].classList.contains(classes.CLASS_AUDIO_WRAP) || e.item.selectParent[0].tagName === 'AUDIO')) {
|
|
60
|
-
var audioEle = e.item.selectParent[0].querySelector('source');
|
|
61
|
-
this.setStyle(audioEle, e);
|
|
62
|
-
isReplaced = true;
|
|
63
|
-
}
|
|
64
|
-
else {
|
|
65
|
-
wrapElement = ej2_base_1.createElement('span', { className: classes.CLASS_AUDIO_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 : '')) } });
|
|
66
|
-
var audElement = ej2_base_1.createElement('audio', { className: classes.CLASS_AUDIO + ' ' + classes.CLASS_AUDIO_INLINE, attrs: { controls: '' } });
|
|
67
|
-
var sourceElement = ej2_base_1.createElement('source');
|
|
68
|
-
var clickElement = ej2_base_1.createElement('span', { className: classes.CLASS_CLICK_ELEM });
|
|
69
|
-
this.setStyle(sourceElement, e);
|
|
70
|
-
audElement.appendChild(sourceElement);
|
|
71
|
-
clickElement.appendChild(audElement);
|
|
72
|
-
wrapElement.appendChild(clickElement);
|
|
73
|
-
if (!ej2_base_1.isNullOrUndefined(e.item.selection)) {
|
|
74
|
-
e.item.selection.restore();
|
|
75
|
-
}
|
|
76
|
-
inserthtml_1.InsertHtml.Insert(this.parent.currentDocument, wrapElement, this.parent.editableElement);
|
|
77
|
-
if (!ej2_base_1.isNullOrUndefined(e.item.selection)) {
|
|
78
|
-
var range = e.item.selection.getRange(this.parent.currentDocument);
|
|
79
|
-
var focusNode = document.createTextNode(' ');
|
|
80
|
-
var node = this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)[0];
|
|
81
|
-
wrapElement.parentNode.insertBefore(focusNode, node.nextSibling);
|
|
82
|
-
var save = e.item.selection.save(range, this.parent.currentDocument);
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
if (e.callBack && (ej2_base_1.isNullOrUndefined(e.selector) || !ej2_base_1.isNullOrUndefined(e.selector) && e.selector !== 'pasteCleanupModule')) {
|
|
86
|
-
var selectedNode = this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)[0];
|
|
87
|
-
var audioElm_1 = (e.value === 'AudioReplace' || isReplaced) ? ((e.item.selectParent[0].tagName.toLowerCase() === 'audio') ? e.item.selectParent[0] : e.item.selectParent[0].querySelector('audio'))
|
|
88
|
-
: (ej2_base_1.Browser.isIE ? selectedNode : selectedNode.querySelector('audio'));
|
|
89
|
-
audioElm_1.addEventListener('loadeddata', function () {
|
|
90
|
-
if (e.value !== 'AudioReplace' || !isReplaced) {
|
|
91
|
-
if (!ej2_base_1.isNullOrUndefined(_this.parent.currentDocument)) {
|
|
92
|
-
if (_this.parent.userAgentData.isSafari()) {
|
|
93
|
-
util_1.scrollToCursor(_this.parent.currentDocument, _this.parent.editableElement);
|
|
94
|
-
}
|
|
95
|
-
e.callBack({
|
|
96
|
-
requestType: 'Audios',
|
|
97
|
-
editorMode: 'HTML',
|
|
98
|
-
event: e.event,
|
|
99
|
-
range: _this.parent.nodeSelection.getRange(_this.parent.currentDocument),
|
|
100
|
-
elements: [audioElm_1]
|
|
101
|
-
});
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
});
|
|
105
|
-
if (isReplaced) {
|
|
106
|
-
audioElm_1.load();
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
};
|
|
110
|
-
AudioCommand.prototype.setStyle = function (sourceElement, e) {
|
|
111
|
-
if (!ej2_base_1.isNullOrUndefined(e.item.url)) {
|
|
112
|
-
sourceElement.setAttribute('src', e.item.url);
|
|
113
|
-
}
|
|
114
|
-
var fileExtension = e.item.fileName ? e.item.fileName.split('.').pop().toLowerCase() :
|
|
115
|
-
e.item.url ? e.item.url.split('.').pop().toLowerCase() : '';
|
|
116
|
-
if (fileExtension === 'opus') {
|
|
117
|
-
sourceElement.type = 'audio/ogg';
|
|
118
|
-
}
|
|
119
|
-
else if (fileExtension === 'm4a') {
|
|
120
|
-
sourceElement.type = 'audio/mp4';
|
|
121
|
-
}
|
|
122
|
-
else {
|
|
123
|
-
sourceElement.type = e.item.fileName && e.item.fileName.split('.').length > 0 ?
|
|
124
|
-
'audio/' + e.item.fileName.split('.')[e.item.fileName.split('.').length - 1] :
|
|
125
|
-
e.item.url && e.item.url.split('.').length > 0 ? 'audio/' + e.item.url.split('.')[e.item.url.split('.').length - 1] : '';
|
|
126
|
-
}
|
|
127
|
-
};
|
|
128
|
-
AudioCommand.prototype.callBack = function (e) {
|
|
129
|
-
if (e.callBack) {
|
|
130
|
-
e.callBack({
|
|
131
|
-
requestType: e.item.subCommand,
|
|
132
|
-
editorMode: 'HTML',
|
|
133
|
-
event: e.event,
|
|
134
|
-
range: this.parent.nodeSelection.getRange(this.parent.currentDocument),
|
|
135
|
-
elements: this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)
|
|
136
|
-
});
|
|
137
|
-
}
|
|
138
|
-
};
|
|
139
|
-
AudioCommand.prototype.destroy = function () {
|
|
140
|
-
this.removeEventListener();
|
|
141
|
-
};
|
|
142
|
-
return AudioCommand;
|
|
143
|
-
}());
|
|
144
|
-
exports.AudioCommand = AudioCommand;
|
|
145
|
-
});
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { EditorManager } from './../base/editor-manager';
|
|
2
|
-
/**
|
|
3
|
-
* Clear Format EXEC internal component
|
|
4
|
-
*
|
|
5
|
-
* @hidden
|
|
6
|
-
* @deprecated
|
|
7
|
-
*/
|
|
8
|
-
export declare class ClearFormatExec {
|
|
9
|
-
private parent;
|
|
10
|
-
/**
|
|
11
|
-
* Constructor for creating the Formats plugin
|
|
12
|
-
*
|
|
13
|
-
* @param {EditorManager} parent - specifies the parent element.
|
|
14
|
-
* @returns {void}
|
|
15
|
-
* @hidden
|
|
16
|
-
* @deprecated
|
|
17
|
-
*/
|
|
18
|
-
constructor(parent: EditorManager);
|
|
19
|
-
private addEventListener;
|
|
20
|
-
private removeEventListener;
|
|
21
|
-
private onKeyDown;
|
|
22
|
-
private applyClear;
|
|
23
|
-
destroy(): void;
|
|
24
|
-
}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
define(["require", "exports", "./../base/constant", "./clearformat", "./../../common/constant"], function (require, exports, CONSTANT, clearformat_1, EVENTS) {
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
var ClearFormatExec = (function () {
|
|
5
|
-
function ClearFormatExec(parent) {
|
|
6
|
-
this.parent = parent;
|
|
7
|
-
this.addEventListener();
|
|
8
|
-
}
|
|
9
|
-
ClearFormatExec.prototype.addEventListener = function () {
|
|
10
|
-
this.parent.observer.on(CONSTANT.CLEAR_TYPE, this.applyClear, this);
|
|
11
|
-
this.parent.observer.on(EVENTS.KEY_DOWN_HANDLER, this.onKeyDown, this);
|
|
12
|
-
this.parent.observer.on(EVENTS.INTERNAL_DESTROY, this.destroy, this);
|
|
13
|
-
};
|
|
14
|
-
ClearFormatExec.prototype.removeEventListener = function () {
|
|
15
|
-
this.parent.observer.off(CONSTANT.CLEAR_TYPE, this.applyClear);
|
|
16
|
-
this.parent.observer.off(EVENTS.KEY_DOWN_HANDLER, this.onKeyDown);
|
|
17
|
-
this.parent.observer.off(EVENTS.INTERNAL_DESTROY, this.destroy);
|
|
18
|
-
};
|
|
19
|
-
ClearFormatExec.prototype.onKeyDown = function (e) {
|
|
20
|
-
switch (e.event.action) {
|
|
21
|
-
case 'clear-format':
|
|
22
|
-
this.applyClear({ subCommand: 'ClearFormat', callBack: e.callBack, enterAction: e.enterAction });
|
|
23
|
-
e.event.preventDefault();
|
|
24
|
-
break;
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
ClearFormatExec.prototype.applyClear = function (e) {
|
|
28
|
-
if (e.subCommand === 'ClearFormat') {
|
|
29
|
-
clearformat_1.ClearFormat.clear(this.parent.currentDocument, this.parent.editableElement, e.enterAction, e.selector, e.subCommand);
|
|
30
|
-
if (e.callBack) {
|
|
31
|
-
e.callBack({
|
|
32
|
-
requestType: e.subCommand,
|
|
33
|
-
event: e.event,
|
|
34
|
-
editorMode: 'HTML',
|
|
35
|
-
range: this.parent.nodeSelection.getRange(this.parent.currentDocument),
|
|
36
|
-
elements: this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
ClearFormatExec.prototype.destroy = function () {
|
|
42
|
-
this.removeEventListener();
|
|
43
|
-
};
|
|
44
|
-
return ClearFormatExec;
|
|
45
|
-
}());
|
|
46
|
-
exports.ClearFormatExec = ClearFormatExec;
|
|
47
|
-
});
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
export declare class ClearFormat {
|
|
2
|
-
private static BLOCK_TAGS;
|
|
3
|
-
private static NONVALID_PARENT_TAGS;
|
|
4
|
-
private static IGNORE_PARENT_TAGS;
|
|
5
|
-
private static NONVALID_TAGS;
|
|
6
|
-
private static defaultTag;
|
|
7
|
-
private static domNode;
|
|
8
|
-
/**
|
|
9
|
-
* clear method
|
|
10
|
-
*
|
|
11
|
-
* @param {Document} docElement - specifies the document element.
|
|
12
|
-
* @param {Node} endNode - specifies the end node
|
|
13
|
-
* @param {string} enterAction - specifies the enter key action
|
|
14
|
-
* @param {string} selector - specifies the string value
|
|
15
|
-
* @param {string} command - specifies the command value
|
|
16
|
-
* @returns {void}
|
|
17
|
-
* @hidden
|
|
18
|
-
* @deprecated
|
|
19
|
-
*/
|
|
20
|
-
static clear(docElement: Document, endNode: Node, enterAction: string, selector?: string, command?: string): void;
|
|
21
|
-
private static reSelection;
|
|
22
|
-
private static clearBlocks;
|
|
23
|
-
private static spliceParent;
|
|
24
|
-
private static removeChild;
|
|
25
|
-
private static removeParent;
|
|
26
|
-
private static unWrap;
|
|
27
|
-
private static clearInlines;
|
|
28
|
-
private static removeInlineParent;
|
|
29
|
-
}
|
|
@@ -1,249 +0,0 @@
|
|
|
1
|
-
define(["require", "exports", "@syncfusion/ej2-base", "./../../selection/index", "./nodecutter", "./dom-node", "./insert-methods", "./isformatted", "../../common/util"], function (require, exports, ej2_base_1, index_1, nodecutter_1, dom_node_1, insert_methods_1, isformatted_1, util_1) {
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
var ClearFormat = (function () {
|
|
5
|
-
function ClearFormat() {
|
|
6
|
-
}
|
|
7
|
-
ClearFormat.clear = function (docElement, endNode, enterAction, selector, command) {
|
|
8
|
-
this.domNode = new dom_node_1.DOMNode(endNode, docElement);
|
|
9
|
-
this.defaultTag = enterAction === 'P' ? 'p' : 'div';
|
|
10
|
-
var nodeSelection = new index_1.NodeSelection(endNode);
|
|
11
|
-
var nodeCutter = new nodecutter_1.NodeCutter();
|
|
12
|
-
var range = nodeSelection.getRange(docElement);
|
|
13
|
-
var nodes = range.collapsed ? nodeSelection.getSelectionNodeCollection(range) :
|
|
14
|
-
nodeSelection.getSelectionNodeCollectionBr(range);
|
|
15
|
-
var save = nodeSelection.save(range, docElement);
|
|
16
|
-
var cursorRange = false;
|
|
17
|
-
if (range.collapsed && command !== 'ClearFormat') {
|
|
18
|
-
cursorRange = true;
|
|
19
|
-
range = nodeCutter.GetCursorRange(docElement, range, nodes[0]);
|
|
20
|
-
}
|
|
21
|
-
var isCollapsed = range.collapsed;
|
|
22
|
-
if (!isCollapsed) {
|
|
23
|
-
var preNode = void 0;
|
|
24
|
-
if (nodes.length > 0 && nodes[0].nodeName === 'BR' && ej2_base_1.closest(nodes[0], 'table')) {
|
|
25
|
-
preNode = nodeCutter.GetSpliceNode(range, ej2_base_1.closest(nodes[0], 'table'));
|
|
26
|
-
}
|
|
27
|
-
else {
|
|
28
|
-
preNode = nodeCutter.GetSpliceNode(range, nodes[nodes.length > 1 && nodes[0].nodeName === 'IMG' ? 1 : 0]);
|
|
29
|
-
}
|
|
30
|
-
if (nodes.length === 1) {
|
|
31
|
-
nodeSelection.setSelectionContents(docElement, preNode);
|
|
32
|
-
range = nodeSelection.getRange(docElement);
|
|
33
|
-
}
|
|
34
|
-
else if (nodes.length > 1) {
|
|
35
|
-
var i = 1;
|
|
36
|
-
var lastText = nodes[nodes.length - i];
|
|
37
|
-
while (nodes.length <= i && nodes[nodes.length - i].nodeName === 'BR') {
|
|
38
|
-
i++;
|
|
39
|
-
lastText = nodes[nodes.length - i];
|
|
40
|
-
}
|
|
41
|
-
var lasNode = nodeCutter.GetSpliceNode(range, lastText);
|
|
42
|
-
if (lasNode) {
|
|
43
|
-
nodeSelection.setSelectionText(docElement, preNode, lasNode, 0, (lasNode.nodeType === 3) ?
|
|
44
|
-
lasNode.textContent.length : lasNode.childNodes.length);
|
|
45
|
-
}
|
|
46
|
-
range = nodeSelection.getRange(docElement);
|
|
47
|
-
}
|
|
48
|
-
var exactNodes = nodeSelection.getNodeCollection(range);
|
|
49
|
-
var cloneSelectNodes = exactNodes.slice();
|
|
50
|
-
this.clearInlines(nodeSelection.getSelectionNodes(cloneSelectNodes), cloneSelectNodes, nodeSelection.getRange(docElement), nodeCutter, endNode);
|
|
51
|
-
this.reSelection(docElement, save, exactNodes);
|
|
52
|
-
range = nodeSelection.getRange(docElement);
|
|
53
|
-
exactNodes = nodeSelection.getNodeCollection(range);
|
|
54
|
-
var cloneParentNodes = exactNodes.slice();
|
|
55
|
-
this.clearBlocks(docElement, cloneParentNodes, endNode, nodeCutter, nodeSelection);
|
|
56
|
-
if (util_1.isIDevice()) {
|
|
57
|
-
util_1.setEditFrameFocus(endNode, selector);
|
|
58
|
-
}
|
|
59
|
-
this.reSelection(docElement, save, exactNodes);
|
|
60
|
-
}
|
|
61
|
-
if (cursorRange) {
|
|
62
|
-
nodeSelection.setCursorPoint(docElement, range.endContainer, range.endOffset);
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
ClearFormat.reSelection = function (docElement, save, exactNodes) {
|
|
66
|
-
var selectionNodes = save.getInsertNodes(exactNodes);
|
|
67
|
-
save.startContainer = save.getNodeArray(selectionNodes[0], true, docElement);
|
|
68
|
-
save.startOffset = 0;
|
|
69
|
-
save.endContainer = save.getNodeArray(selectionNodes[selectionNodes.length - 1], false, docElement);
|
|
70
|
-
var endIndexNode = selectionNodes[selectionNodes.length - 1];
|
|
71
|
-
save.endOffset = (endIndexNode.nodeType === 3) ? endIndexNode.textContent.length
|
|
72
|
-
: endIndexNode.childNodes.length;
|
|
73
|
-
save.restore();
|
|
74
|
-
};
|
|
75
|
-
ClearFormat.clearBlocks = function (docElement, nodes, endNode, nodeCutter, nodeSelection) {
|
|
76
|
-
var parentNodes = [];
|
|
77
|
-
for (var index = 0; index < nodes.length; index++) {
|
|
78
|
-
if (this.BLOCK_TAGS.indexOf(nodes[index].nodeName.toLocaleLowerCase()) > -1
|
|
79
|
-
&& parentNodes.indexOf(nodes[index]) === -1) {
|
|
80
|
-
parentNodes.push(nodes[index]);
|
|
81
|
-
}
|
|
82
|
-
else if ((this.BLOCK_TAGS.indexOf(nodes[index].parentNode.nodeName.toLocaleLowerCase()) > -1)
|
|
83
|
-
&& parentNodes.indexOf(nodes[index].parentNode) === -1
|
|
84
|
-
&& endNode !== nodes[index].parentNode) {
|
|
85
|
-
parentNodes.push(nodes[index].parentNode);
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
parentNodes = this.spliceParent(parentNodes, nodes)[0];
|
|
89
|
-
parentNodes = this.removeParent(parentNodes);
|
|
90
|
-
this.unWrap(docElement, parentNodes, nodeCutter, nodeSelection);
|
|
91
|
-
};
|
|
92
|
-
ClearFormat.spliceParent = function (parentNodes, nodes) {
|
|
93
|
-
for (var index1 = 0; index1 < parentNodes.length; index1++) {
|
|
94
|
-
var len = parentNodes[index1].childNodes.length;
|
|
95
|
-
for (var index2 = 0; index2 < len; index2++) {
|
|
96
|
-
if ((nodes.indexOf(parentNodes[index1].childNodes[index2]) > 0)
|
|
97
|
-
&& (parentNodes[index1].childNodes[index2].childNodes.length > 0)) {
|
|
98
|
-
nodes = this.spliceParent([parentNodes[index1].childNodes[index2]], nodes)[1];
|
|
99
|
-
}
|
|
100
|
-
if ((nodes.indexOf(parentNodes[index1].childNodes[index2]) <= -1) &&
|
|
101
|
-
(parentNodes[index1].childNodes[index2].textContent.trim() !== '')) {
|
|
102
|
-
for (var index3 = 0; index3 < len; index3++) {
|
|
103
|
-
if (nodes.indexOf(parentNodes[index1].childNodes[index3]) > -1) {
|
|
104
|
-
nodes.splice(nodes.indexOf(parentNodes[index1].childNodes[index3]), 1);
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
index2 = parentNodes[index1].childNodes.length;
|
|
108
|
-
var parentIndex = parentNodes.indexOf(parentNodes[index1].parentNode);
|
|
109
|
-
var nodeIndex = nodes.indexOf(parentNodes[index1].parentNode);
|
|
110
|
-
if (parentIndex > -1) {
|
|
111
|
-
parentNodes.splice(parentIndex, 1);
|
|
112
|
-
}
|
|
113
|
-
if (nodeIndex > -1) {
|
|
114
|
-
nodes.splice(nodeIndex, 1);
|
|
115
|
-
}
|
|
116
|
-
var elementIndex = nodes.indexOf(parentNodes[index1]);
|
|
117
|
-
if (elementIndex > -1) {
|
|
118
|
-
nodes.splice(elementIndex, 1);
|
|
119
|
-
}
|
|
120
|
-
parentNodes.splice(index1, 1);
|
|
121
|
-
index1--;
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
return [parentNodes, nodes];
|
|
126
|
-
};
|
|
127
|
-
ClearFormat.removeChild = function (parentNodes, parentNode) {
|
|
128
|
-
var count = parentNode.childNodes.length;
|
|
129
|
-
if (count > 0) {
|
|
130
|
-
for (var index = 0; index < count; index++) {
|
|
131
|
-
if (parentNodes.indexOf(parentNode.childNodes[index]) > -1) {
|
|
132
|
-
parentNodes = this.removeChild(parentNodes, parentNode.childNodes[index]);
|
|
133
|
-
parentNodes.splice(parentNodes.indexOf(parentNode.childNodes[index]), 1);
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
return parentNodes;
|
|
138
|
-
};
|
|
139
|
-
ClearFormat.removeParent = function (parentNodes) {
|
|
140
|
-
for (var index = 0; index < parentNodes.length; index++) {
|
|
141
|
-
if (parentNodes.indexOf(parentNodes[index].parentNode) > -1) {
|
|
142
|
-
parentNodes = this.removeChild(parentNodes, parentNodes[index]);
|
|
143
|
-
parentNodes.splice(index, 1);
|
|
144
|
-
index--;
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
return parentNodes;
|
|
148
|
-
};
|
|
149
|
-
ClearFormat.unWrap = function (docElement, parentNodes, nodeCutter, nodeSelection) {
|
|
150
|
-
for (var index1 = 0; index1 < parentNodes.length; index1++) {
|
|
151
|
-
parentNodes[index1] = (ej2_base_1.closest(parentNodes[index1], 'li') && parentNodes[index1].nodeName !== 'UL' && parentNodes[index1].nodeName !== 'OL')
|
|
152
|
-
? ej2_base_1.closest(parentNodes[index1], 'li')
|
|
153
|
-
: parentNodes[index1];
|
|
154
|
-
if (this.NONVALID_TAGS.indexOf(parentNodes[index1].nodeName.toLowerCase()) > -1
|
|
155
|
-
&& parentNodes[index1].parentNode
|
|
156
|
-
&& this.NONVALID_PARENT_TAGS.indexOf(parentNodes[index1].parentNode.nodeName.toLowerCase()) > -1) {
|
|
157
|
-
nodeSelection.setSelectionText(docElement, parentNodes[index1], parentNodes[index1], 0, parentNodes[index1].childNodes.length);
|
|
158
|
-
insert_methods_1.InsertMethods.unwrap(nodeCutter.GetSpliceNode(nodeSelection.getRange(docElement), parentNodes[index1].parentNode));
|
|
159
|
-
}
|
|
160
|
-
var blockquoteNode = ej2_base_1.closest(parentNodes[index1], 'blockquote');
|
|
161
|
-
if (parentNodes[index1].nodeName.toLocaleLowerCase() !== 'blockquote' && !ej2_base_1.isNullOrUndefined(blockquoteNode) && blockquoteNode.textContent === parentNodes[index1].textContent) {
|
|
162
|
-
var blockNodes = this.removeParent([blockquoteNode]);
|
|
163
|
-
this.unWrap(docElement, blockNodes, nodeCutter, nodeSelection);
|
|
164
|
-
}
|
|
165
|
-
if (parentNodes[index1].nodeName.toLocaleLowerCase() !== 'p') {
|
|
166
|
-
if (this.NONVALID_PARENT_TAGS.indexOf(parentNodes[index1].nodeName.toLowerCase()) < 0
|
|
167
|
-
&& !((parentNodes[index1].nodeName.toLocaleLowerCase() === 'blockquote'
|
|
168
|
-
|| parentNodes[index1].nodeName.toLocaleLowerCase() === 'li')
|
|
169
|
-
&& this.IGNORE_PARENT_TAGS.indexOf(parentNodes[index1].childNodes[0].nodeName.toLocaleLowerCase()) > -1)
|
|
170
|
-
&& !(parentNodes[index1].childNodes.length === 1
|
|
171
|
-
&& parentNodes[index1].childNodes[0].nodeName.toLocaleLowerCase() === 'p')) {
|
|
172
|
-
insert_methods_1.InsertMethods.Wrap(parentNodes[index1], docElement.createElement(this.defaultTag));
|
|
173
|
-
}
|
|
174
|
-
var childNodes = insert_methods_1.InsertMethods.unwrap(parentNodes[index1]);
|
|
175
|
-
if (childNodes.length === 1
|
|
176
|
-
&& childNodes[0].parentNode.nodeName.toLocaleLowerCase() === 'p') {
|
|
177
|
-
insert_methods_1.InsertMethods.Wrap(parentNodes[index1], docElement.createElement(this.defaultTag));
|
|
178
|
-
insert_methods_1.InsertMethods.unwrap(parentNodes[index1]);
|
|
179
|
-
}
|
|
180
|
-
for (var index2 = 0; index2 < childNodes.length; index2++) {
|
|
181
|
-
if (this.NONVALID_TAGS.indexOf(childNodes[index2].nodeName.toLowerCase()) > -1) {
|
|
182
|
-
this.unWrap(docElement, [childNodes[index2]], nodeCutter, nodeSelection);
|
|
183
|
-
}
|
|
184
|
-
else if (this.BLOCK_TAGS.indexOf(childNodes[index2].nodeName.toLocaleLowerCase()) > -1 &&
|
|
185
|
-
childNodes[index2].nodeName.toLocaleLowerCase() !== 'p') {
|
|
186
|
-
var blockNodes = this.removeParent([childNodes[index2]]);
|
|
187
|
-
this.unWrap(docElement, blockNodes, nodeCutter, nodeSelection);
|
|
188
|
-
}
|
|
189
|
-
else if (this.BLOCK_TAGS.indexOf(childNodes[index2].nodeName.toLocaleLowerCase()) > -1 &&
|
|
190
|
-
childNodes[index2].nodeName.toLocaleLowerCase() === 'p') {
|
|
191
|
-
if (childNodes[index2].parentNode.nodeName.toLocaleLowerCase() === 'p') {
|
|
192
|
-
insert_methods_1.InsertMethods.unwrap(childNodes[index2].parentNode);
|
|
193
|
-
}
|
|
194
|
-
insert_methods_1.InsertMethods.Wrap(childNodes[index2], docElement.createElement(this.defaultTag));
|
|
195
|
-
insert_methods_1.InsertMethods.unwrap(childNodes[index2]);
|
|
196
|
-
}
|
|
197
|
-
else if (this.BLOCK_TAGS.indexOf(childNodes[index2].nodeName.toLocaleLowerCase()) > -1 &&
|
|
198
|
-
childNodes[index2].parentNode.nodeName.toLocaleLowerCase() ===
|
|
199
|
-
childNodes[index2].nodeName.toLocaleLowerCase()) {
|
|
200
|
-
insert_methods_1.InsertMethods.unwrap(childNodes[index2]);
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
else {
|
|
205
|
-
insert_methods_1.InsertMethods.Wrap(parentNodes[index1], docElement.createElement(this.defaultTag));
|
|
206
|
-
insert_methods_1.InsertMethods.unwrap(parentNodes[index1]);
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
};
|
|
210
|
-
ClearFormat.clearInlines = function (textNodes, nodes, range, nodeCutter, endNode) {
|
|
211
|
-
for (var index = 0; index < textNodes.length; index++) {
|
|
212
|
-
var currentInlineNode = textNodes[index];
|
|
213
|
-
var currentNode = void 0;
|
|
214
|
-
while (!this.domNode.isBlockNode(currentInlineNode) &&
|
|
215
|
-
(currentInlineNode.parentElement && !currentInlineNode.parentElement.classList.contains('e-img-inner'))) {
|
|
216
|
-
currentNode = currentInlineNode;
|
|
217
|
-
currentInlineNode = currentInlineNode.parentElement;
|
|
218
|
-
}
|
|
219
|
-
if (currentNode &&
|
|
220
|
-
isformatted_1.IsFormatted.inlineTags.indexOf(currentNode.nodeName.toLocaleLowerCase()) > -1) {
|
|
221
|
-
nodeCutter.GetSpliceNode(range, currentNode);
|
|
222
|
-
this.removeInlineParent(currentNode);
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
};
|
|
226
|
-
ClearFormat.removeInlineParent = function (textNodes) {
|
|
227
|
-
var nodes = insert_methods_1.InsertMethods.unwrap(textNodes);
|
|
228
|
-
for (var index = 0; index < nodes.length; index++) {
|
|
229
|
-
if (nodes[index].parentNode.childNodes.length === 1 && !nodes[index].parentNode.classList.contains('e-img-inner')
|
|
230
|
-
&& isformatted_1.IsFormatted.inlineTags.indexOf(nodes[index].parentNode.nodeName.toLocaleLowerCase()) > -1) {
|
|
231
|
-
this.removeInlineParent(nodes[index].parentNode);
|
|
232
|
-
}
|
|
233
|
-
else if (isformatted_1.IsFormatted.inlineTags.indexOf(nodes[index].nodeName.toLocaleLowerCase()) > -1) {
|
|
234
|
-
this.removeInlineParent(nodes[index]);
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
};
|
|
238
|
-
ClearFormat.BLOCK_TAGS = ['address', 'article', 'aside', 'blockquote',
|
|
239
|
-
'details', 'dd', 'div', 'dl', 'dt', 'fieldset', 'figcaption', 'figure', 'footer',
|
|
240
|
-
'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'header', 'hgroup', 'li', 'main', 'nav',
|
|
241
|
-
'noscript', 'ol', 'p', 'pre', 'section', 'ul'];
|
|
242
|
-
ClearFormat.NONVALID_PARENT_TAGS = ['thead', 'tbody', 'ul', 'ol', 'table', 'tfoot', 'tr'];
|
|
243
|
-
ClearFormat.IGNORE_PARENT_TAGS = ['ul', 'ol', 'table'];
|
|
244
|
-
ClearFormat.NONVALID_TAGS = ['thead', 'tbody', 'figcaption', 'td', 'tr', 'th', 'tfoot', 'figcaption', 'li'];
|
|
245
|
-
ClearFormat.defaultTag = 'p';
|
|
246
|
-
return ClearFormat;
|
|
247
|
-
}());
|
|
248
|
-
exports.ClearFormat = ClearFormat;
|
|
249
|
-
});
|