@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,622 +0,0 @@
|
|
|
1
|
-
define(["require", "exports", "@syncfusion/ej2-base", "../../common/constant", "../plugin"], function (require, exports, ej2_base_1, EVENTS, plugin_1) {
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
var FormatPainterActions = (function () {
|
|
5
|
-
function FormatPainterActions(parent, options) {
|
|
6
|
-
this.INVALID_TAGS = ['A', 'AUDIO', 'IMG', 'VIDEO', 'IFRAME'];
|
|
7
|
-
this.parent = parent;
|
|
8
|
-
this.settings = options;
|
|
9
|
-
this.addEventListener();
|
|
10
|
-
this.setDeniedFormats();
|
|
11
|
-
}
|
|
12
|
-
FormatPainterActions.prototype.addEventListener = function () {
|
|
13
|
-
this.parent.observer.on(EVENTS.FORMAT_PAINTER_ACTIONS, this.actionHandler, this);
|
|
14
|
-
this.parent.observer.on(EVENTS.MODEL_CHANGED_PLUGIN, this.onPropertyChanged, this);
|
|
15
|
-
this.parent.observer.on(EVENTS.INTERNAL_DESTROY, this.destroy, this);
|
|
16
|
-
};
|
|
17
|
-
FormatPainterActions.prototype.onPropertyChanged = function (prop) {
|
|
18
|
-
if (prop && prop.module === 'formatPainter') {
|
|
19
|
-
if (!ej2_base_1.isNullOrUndefined(prop.newProp.formatPainterSettings.allowedFormats)) {
|
|
20
|
-
this.settings.allowedFormats = prop.newProp.formatPainterSettings.allowedFormats;
|
|
21
|
-
}
|
|
22
|
-
if (!ej2_base_1.isNullOrUndefined(prop.newProp.formatPainterSettings.deniedFormats)) {
|
|
23
|
-
this.settings.deniedFormats = prop.newProp.formatPainterSettings.deniedFormats;
|
|
24
|
-
this.setDeniedFormats();
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
FormatPainterActions.prototype.removeEventListener = function () {
|
|
29
|
-
this.parent.observer.off(EVENTS.FORMAT_PAINTER_ACTIONS, this.actionHandler);
|
|
30
|
-
this.parent.observer.off(EVENTS.MODEL_CHANGED_PLUGIN, this.onPropertyChanged);
|
|
31
|
-
this.parent.observer.off(EVENTS.INTERNAL_DESTROY, this.destroy);
|
|
32
|
-
};
|
|
33
|
-
FormatPainterActions.prototype.destroy = function () {
|
|
34
|
-
this.removeEventListener();
|
|
35
|
-
this.INVALID_TAGS = null;
|
|
36
|
-
this.copyCollection = null;
|
|
37
|
-
this.deniedFormatsCollection = null;
|
|
38
|
-
this.newElem = null;
|
|
39
|
-
this.newElemLastChild = null;
|
|
40
|
-
this.settings = null;
|
|
41
|
-
this.parent = null;
|
|
42
|
-
};
|
|
43
|
-
FormatPainterActions.prototype.actionHandler = function (args) {
|
|
44
|
-
this.settings.allowedContext = ['Text', 'List', 'Table'];
|
|
45
|
-
if (!ej2_base_1.isNullOrUndefined(args) && !ej2_base_1.isNullOrUndefined(args.item) && !ej2_base_1.isNullOrUndefined(args.item.formatPainterAction)) {
|
|
46
|
-
switch (args.item.formatPainterAction) {
|
|
47
|
-
case 'format-copy':
|
|
48
|
-
this.copyAction();
|
|
49
|
-
break;
|
|
50
|
-
case 'format-paste':
|
|
51
|
-
this.pasteAction();
|
|
52
|
-
break;
|
|
53
|
-
case 'escape':
|
|
54
|
-
this.escapeAction();
|
|
55
|
-
break;
|
|
56
|
-
}
|
|
57
|
-
this.callBack(args);
|
|
58
|
-
}
|
|
59
|
-
};
|
|
60
|
-
FormatPainterActions.prototype.callBack = function (event) {
|
|
61
|
-
if (event.callBack) {
|
|
62
|
-
event.callBack({
|
|
63
|
-
requestType: 'FormatPainter',
|
|
64
|
-
action: event.item.formatPainterAction,
|
|
65
|
-
event: event.event,
|
|
66
|
-
editorMode: 'HTML',
|
|
67
|
-
range: this.parent.nodeSelection.getRange(this.parent.currentDocument),
|
|
68
|
-
elements: this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
};
|
|
72
|
-
FormatPainterActions.prototype.generateElement = function () {
|
|
73
|
-
var copyCollection = this.copyCollection.slice();
|
|
74
|
-
copyCollection.reverse();
|
|
75
|
-
var length = copyCollection.length;
|
|
76
|
-
var elemCollection = ej2_base_1.createElement('div', { className: 'e-format-paste-wrapper' });
|
|
77
|
-
var lastAppendChild;
|
|
78
|
-
for (var i = 0; i < length; i++) {
|
|
79
|
-
var _a = copyCollection[i], attrs = _a.attrs, className = _a.className, styles = _a.styles, tagName = _a.tagName;
|
|
80
|
-
var elem = ej2_base_1.createElement(tagName);
|
|
81
|
-
if (className !== '') {
|
|
82
|
-
elem.className = className;
|
|
83
|
-
}
|
|
84
|
-
for (var i_1 = 0; i_1 < attrs.length; i_1++) {
|
|
85
|
-
var property = attrs[i_1].name;
|
|
86
|
-
var value = attrs[i_1].value;
|
|
87
|
-
elem.setAttribute(property, value);
|
|
88
|
-
}
|
|
89
|
-
for (var i_2 = 0; i_2 < styles.length; i_2++) {
|
|
90
|
-
var property = styles[i_2].property;
|
|
91
|
-
var value = styles[i_2].value;
|
|
92
|
-
var priority = styles[i_2].priority;
|
|
93
|
-
elem.style.setProperty(property, value, priority);
|
|
94
|
-
}
|
|
95
|
-
if (elemCollection.childElementCount === 0) {
|
|
96
|
-
elemCollection.append(elem);
|
|
97
|
-
lastAppendChild = elem;
|
|
98
|
-
}
|
|
99
|
-
else {
|
|
100
|
-
lastAppendChild.append(elem);
|
|
101
|
-
lastAppendChild = elem;
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
var elemChild = this.removeDeniedFormats(elemCollection);
|
|
105
|
-
var currentElem = elemChild;
|
|
106
|
-
while (currentElem) {
|
|
107
|
-
if (currentElem.firstChild === null) {
|
|
108
|
-
lastAppendChild = currentElem;
|
|
109
|
-
currentElem = undefined;
|
|
110
|
-
}
|
|
111
|
-
else {
|
|
112
|
-
currentElem = currentElem.firstChild;
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
this.newElem = elemChild;
|
|
116
|
-
this.newElemLastChild = lastAppendChild;
|
|
117
|
-
};
|
|
118
|
-
FormatPainterActions.prototype.pasteAction = function () {
|
|
119
|
-
if (ej2_base_1.isNullOrUndefined(this.copyCollection) || this.copyCollection.length === 0) {
|
|
120
|
-
this.paintPlainTextFormat();
|
|
121
|
-
return;
|
|
122
|
-
}
|
|
123
|
-
this.insertFormatNode(this.newElem, this.newElemLastChild);
|
|
124
|
-
};
|
|
125
|
-
FormatPainterActions.prototype.removeDeniedFormats = function (parentElement) {
|
|
126
|
-
if (!ej2_base_1.isNullOrUndefined(this.deniedFormatsCollection) && this.deniedFormatsCollection.length > 0) {
|
|
127
|
-
var deniedPropArray = this.deniedFormatsCollection;
|
|
128
|
-
var length_1 = deniedPropArray.length;
|
|
129
|
-
for (var i = 0; i < length_1; i++) {
|
|
130
|
-
var tag = deniedPropArray[i].tag;
|
|
131
|
-
if (deniedPropArray[i].tag) {
|
|
132
|
-
var elementsList = parentElement.querySelectorAll(tag);
|
|
133
|
-
for (var j = 0; j < elementsList.length; j++) {
|
|
134
|
-
if (deniedPropArray[i].classes.length > 0) {
|
|
135
|
-
var classes = deniedPropArray[i].classes;
|
|
136
|
-
var classLength = classes.length;
|
|
137
|
-
for (var k = 0; k < classLength; k++) {
|
|
138
|
-
if (elementsList[j].classList.contains(classes[k])) {
|
|
139
|
-
ej2_base_1.removeClass([elementsList[j]], classes[k].trim());
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
if (elementsList[j].classList.length === 0) {
|
|
143
|
-
elementsList[j].removeAttribute('class');
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
if (deniedPropArray[i].styles.length > 0) {
|
|
147
|
-
var styles = deniedPropArray[i].styles;
|
|
148
|
-
var styleLength = styles.length;
|
|
149
|
-
for (var k = 0; k < styleLength; k++) {
|
|
150
|
-
elementsList[j].style.removeProperty(styles[k].trim());
|
|
151
|
-
}
|
|
152
|
-
if (elementsList[j].style.length === 0) {
|
|
153
|
-
elementsList[j].removeAttribute('style');
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
if (deniedPropArray[i].attributes.length > 0) {
|
|
157
|
-
var attributes = deniedPropArray[i].attributes;
|
|
158
|
-
var attributeLength = attributes.length;
|
|
159
|
-
for (var k = 0; k < attributeLength; k++) {
|
|
160
|
-
elementsList[j].removeAttribute(attributes[k].trim());
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
return parentElement.firstElementChild;
|
|
168
|
-
};
|
|
169
|
-
FormatPainterActions.prototype.copyAction = function () {
|
|
170
|
-
var copyCollection = [];
|
|
171
|
-
var range = this.parent.nodeSelection.getRange(this.parent.currentDocument);
|
|
172
|
-
var domSelection = this.parent.nodeSelection;
|
|
173
|
-
var nodes = range.collapsed ? domSelection.getSelectionNodeCollection(range) :
|
|
174
|
-
domSelection.getSelectionNodeCollectionBr(range);
|
|
175
|
-
if (nodes.length === 0 && domSelection.getSelectionNodeCollectionBr(range).length === 0) {
|
|
176
|
-
return;
|
|
177
|
-
}
|
|
178
|
-
else {
|
|
179
|
-
nodes = nodes.length === 0 ? domSelection.getSelectionNodeCollectionBr(range) : nodes;
|
|
180
|
-
}
|
|
181
|
-
var parentElem = nodes[0].parentElement;
|
|
182
|
-
var currentContext = this.findCurrentContext(parentElem);
|
|
183
|
-
var allowedRulesArray = this.settings.allowedFormats.indexOf(';') > -1 ? this.settings.allowedFormats.split(';') :
|
|
184
|
-
[this.settings.allowedFormats];
|
|
185
|
-
for (var i = 0; i < allowedRulesArray.length; i++) {
|
|
186
|
-
allowedRulesArray[i] = allowedRulesArray[i].trim();
|
|
187
|
-
}
|
|
188
|
-
var _a = this.getRangeParentElem(currentContext, parentElem), rangeParentElem = _a[0], context = _a[1];
|
|
189
|
-
if (currentContext === null) {
|
|
190
|
-
currentContext = context;
|
|
191
|
-
}
|
|
192
|
-
if (!ej2_base_1.isNullOrUndefined(currentContext) && this.settings.allowedContext.indexOf(currentContext) > -1) {
|
|
193
|
-
if (range.startContainer.nodeName === '#text') {
|
|
194
|
-
parentElem = range.startContainer.parentElement;
|
|
195
|
-
}
|
|
196
|
-
var lastElement = parentElem;
|
|
197
|
-
do {
|
|
198
|
-
if (allowedRulesArray.indexOf(parentElem.nodeName.toLowerCase()) > -1) {
|
|
199
|
-
var allAttributes = parentElem.attributes;
|
|
200
|
-
var attribute = [];
|
|
201
|
-
for (var i = 0; i < allAttributes.length; i++) {
|
|
202
|
-
if (allAttributes[i].name !== 'class' && allAttributes[i].name !== 'style') {
|
|
203
|
-
attribute.push(allAttributes[i]);
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
var classes = parentElem.className;
|
|
207
|
-
var allStyles = parentElem.style;
|
|
208
|
-
var styleProp = [];
|
|
209
|
-
for (var i = 0; i < allStyles.length; i++) {
|
|
210
|
-
var property = allStyles[i];
|
|
211
|
-
var value = allStyles.getPropertyValue(property);
|
|
212
|
-
var priority = allStyles.getPropertyPriority(property);
|
|
213
|
-
styleProp.push({ property: property, value: value, priority: priority });
|
|
214
|
-
}
|
|
215
|
-
copyCollection.push({
|
|
216
|
-
attrs: attribute, className: classes, styles: styleProp, tagName: parentElem.nodeName
|
|
217
|
-
});
|
|
218
|
-
}
|
|
219
|
-
if (rangeParentElem === parentElem) {
|
|
220
|
-
parentElem = undefined;
|
|
221
|
-
}
|
|
222
|
-
else if (!ej2_base_1.isNullOrUndefined(parentElem.parentElement)) {
|
|
223
|
-
parentElem = parentElem.parentElement;
|
|
224
|
-
}
|
|
225
|
-
if (lastElement === parentElem) {
|
|
226
|
-
break;
|
|
227
|
-
}
|
|
228
|
-
} while (!ej2_base_1.isNullOrUndefined(parentElem) || parentElem === this.parent.editableElement);
|
|
229
|
-
this.copyCollection = copyCollection;
|
|
230
|
-
}
|
|
231
|
-
this.generateElement();
|
|
232
|
-
};
|
|
233
|
-
FormatPainterActions.prototype.getRangeParentElem = function (currentContext, rangeParent) {
|
|
234
|
-
var startContainer = rangeParent;
|
|
235
|
-
var rangeParentELem;
|
|
236
|
-
if (startContainer.nodeType === 3) {
|
|
237
|
-
startContainer = startContainer.parentElement;
|
|
238
|
-
}
|
|
239
|
-
switch (currentContext) {
|
|
240
|
-
case 'Table':
|
|
241
|
-
rangeParentELem = ej2_base_1.closest(startContainer, 'td');
|
|
242
|
-
if (ej2_base_1.isNullOrUndefined(rangeParentELem)) {
|
|
243
|
-
rangeParentELem = ej2_base_1.closest(startContainer, 'th');
|
|
244
|
-
}
|
|
245
|
-
break;
|
|
246
|
-
case 'List':
|
|
247
|
-
rangeParentELem = ej2_base_1.closest(startContainer, 'li');
|
|
248
|
-
break;
|
|
249
|
-
case 'Text':
|
|
250
|
-
rangeParentELem = ej2_base_1.closest(startContainer, 'p');
|
|
251
|
-
break;
|
|
252
|
-
}
|
|
253
|
-
if (ej2_base_1.isNullOrUndefined(rangeParentELem)) {
|
|
254
|
-
var nearBlockParentName = this.getNearestBlockParentElement(rangeParent);
|
|
255
|
-
if (!ej2_base_1.isNullOrUndefined(nearBlockParentName) && nearBlockParentName !== 'UL' &&
|
|
256
|
-
nearBlockParentName !== 'OL' && nearBlockParentName !== 'LI') {
|
|
257
|
-
rangeParentELem = ej2_base_1.closest(startContainer, nearBlockParentName);
|
|
258
|
-
currentContext = 'Text';
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
if (currentContext === 'List') {
|
|
262
|
-
rangeParentELem = rangeParentELem.parentElement;
|
|
263
|
-
}
|
|
264
|
-
return [rangeParentELem, currentContext];
|
|
265
|
-
};
|
|
266
|
-
FormatPainterActions.prototype.getNearestBlockParentElement = function (rangeParent) {
|
|
267
|
-
var node = rangeParent;
|
|
268
|
-
if (node.nodeType === 3) {
|
|
269
|
-
node = node.parentNode;
|
|
270
|
-
}
|
|
271
|
-
while (node && node !== this.parent.editableElement) {
|
|
272
|
-
if (!ej2_base_1.isNullOrUndefined(node) && this.isBlockElement(node)) {
|
|
273
|
-
return node.nodeName;
|
|
274
|
-
}
|
|
275
|
-
node = node.parentNode;
|
|
276
|
-
}
|
|
277
|
-
return null;
|
|
278
|
-
};
|
|
279
|
-
FormatPainterActions.prototype.isBlockElement = function (node) {
|
|
280
|
-
var blockTags = ['P', 'DIV', 'UL', 'OL', 'LI', 'H1', 'H2', 'H3', 'H4', 'H5', 'H6',
|
|
281
|
-
'ADDRESS', 'ARTICLE', 'ASIDE', 'BLOCKQUOTE', 'FIGCAPTION', 'FIGURE', 'FOOTER', 'HEADER',
|
|
282
|
-
'HR', 'MAIN', 'NAV', 'SECTION', 'SUMMARY', 'PRE'];
|
|
283
|
-
return blockTags.indexOf(node.nodeName) > -1;
|
|
284
|
-
};
|
|
285
|
-
FormatPainterActions.prototype.escapeAction = function () {
|
|
286
|
-
this.copyCollection = [];
|
|
287
|
-
};
|
|
288
|
-
FormatPainterActions.prototype.paintPlainTextFormat = function () {
|
|
289
|
-
var range = this.parent.nodeSelection.getRange(this.parent.currentDocument);
|
|
290
|
-
var domSelection = this.parent.nodeSelection;
|
|
291
|
-
var nodes = range.collapsed ? domSelection.getSelectionNodeCollection(range) :
|
|
292
|
-
domSelection.getSelectionNodeCollectionBr(range);
|
|
293
|
-
var isInValid;
|
|
294
|
-
if (nodes.length > 1) {
|
|
295
|
-
for (var i = 0; i < nodes.length; i++) {
|
|
296
|
-
isInValid = this.validateELementTag(nodes[i]);
|
|
297
|
-
}
|
|
298
|
-
}
|
|
299
|
-
else {
|
|
300
|
-
isInValid = this.validateELementTag(range.startContainer) && this.validateELementTag(range.endContainer);
|
|
301
|
-
}
|
|
302
|
-
if (!isInValid) {
|
|
303
|
-
this.parent.execCommand('Clear', 'ClearFormat', null, null);
|
|
304
|
-
}
|
|
305
|
-
};
|
|
306
|
-
FormatPainterActions.prototype.validateELementTag = function (node) {
|
|
307
|
-
if (node.nodeType === 3) {
|
|
308
|
-
node = node.parentElement;
|
|
309
|
-
}
|
|
310
|
-
return this.INVALID_TAGS.indexOf(node.tagName) > -1;
|
|
311
|
-
};
|
|
312
|
-
FormatPainterActions.prototype.findCurrentContext = function (parentElem) {
|
|
313
|
-
var closestParagraph = ej2_base_1.closest(parentElem, 'p');
|
|
314
|
-
var closestList = ej2_base_1.closest(parentElem, 'li');
|
|
315
|
-
if (closestParagraph && !closestList) {
|
|
316
|
-
return 'Text';
|
|
317
|
-
}
|
|
318
|
-
else if (ej2_base_1.closest(parentElem, 'li')) {
|
|
319
|
-
if (!ej2_base_1.isNullOrUndefined(closestParagraph) && !ej2_base_1.isNullOrUndefined(closestList) && closestParagraph.textContent.trim() !== closestList.textContent.trim()) {
|
|
320
|
-
return 'Text';
|
|
321
|
-
}
|
|
322
|
-
return 'List';
|
|
323
|
-
}
|
|
324
|
-
else if (ej2_base_1.closest(parentElem, 'td') || ej2_base_1.closest(parentElem, 'tr') || ej2_base_1.closest(parentElem, 'th')) {
|
|
325
|
-
return 'Table';
|
|
326
|
-
}
|
|
327
|
-
return null;
|
|
328
|
-
};
|
|
329
|
-
FormatPainterActions.prototype.insertFormatNode = function (elem, lastChild) {
|
|
330
|
-
var clonedElem = elem.cloneNode(true);
|
|
331
|
-
if (!this.isBlockElement(elem)) {
|
|
332
|
-
var newBlockElem = ej2_base_1.createElement('P');
|
|
333
|
-
newBlockElem.appendChild(elem);
|
|
334
|
-
clonedElem = newBlockElem.cloneNode(true);
|
|
335
|
-
}
|
|
336
|
-
var endNode = this.parent.editableElement;
|
|
337
|
-
var docElement = this.parent.currentDocument;
|
|
338
|
-
var childElem = clonedElem.firstChild;
|
|
339
|
-
var inlineElement;
|
|
340
|
-
while (childElem) {
|
|
341
|
-
if (this.isBlockElement(childElem)) {
|
|
342
|
-
childElem = childElem.firstChild;
|
|
343
|
-
}
|
|
344
|
-
else {
|
|
345
|
-
inlineElement = childElem.parentNode.removeChild(childElem);
|
|
346
|
-
break;
|
|
347
|
-
}
|
|
348
|
-
}
|
|
349
|
-
var formatValues = {
|
|
350
|
-
element: inlineElement,
|
|
351
|
-
lastChild: lastChild
|
|
352
|
-
};
|
|
353
|
-
plugin_1.SelectionCommands.applyFormat(docElement, null, endNode, 'P', null, 'formatPainter', null, formatValues);
|
|
354
|
-
var range = this.parent.nodeSelection.getRange(docElement);
|
|
355
|
-
var isCollapsed = range.collapsed;
|
|
356
|
-
var blockNodes = this.parent.domNode.blockNodes();
|
|
357
|
-
var isListCopied = this.isListCopied();
|
|
358
|
-
if (isListCopied) {
|
|
359
|
-
for (var i = 0; i < blockNodes.length; i++) {
|
|
360
|
-
if (ej2_base_1.closest(blockNodes[i], 'li')) {
|
|
361
|
-
blockNodes[i] = ej2_base_1.closest(blockNodes[i], 'li');
|
|
362
|
-
}
|
|
363
|
-
}
|
|
364
|
-
}
|
|
365
|
-
var isFullNodeSelected = false;
|
|
366
|
-
if (blockNodes.length === 1) {
|
|
367
|
-
isFullNodeSelected = blockNodes[0].textContent.trim() === range.toString().trim();
|
|
368
|
-
}
|
|
369
|
-
if (this.isBlockElement(clonedElem) && isCollapsed || blockNodes.length > 1 || isFullNodeSelected) {
|
|
370
|
-
this.insertBlockNode(clonedElem, range, docElement, blockNodes);
|
|
371
|
-
}
|
|
372
|
-
};
|
|
373
|
-
FormatPainterActions.prototype.isListCopied = function () {
|
|
374
|
-
var isListCopied = false;
|
|
375
|
-
for (var i = 0; i < this.copyCollection.length; i++) {
|
|
376
|
-
if (this.copyCollection[i].tagName === 'OL' || this.copyCollection[i].tagName === 'UL') {
|
|
377
|
-
isListCopied = true;
|
|
378
|
-
break;
|
|
379
|
-
}
|
|
380
|
-
}
|
|
381
|
-
return isListCopied;
|
|
382
|
-
};
|
|
383
|
-
FormatPainterActions.prototype.insertBlockNode = function (element, range, docElement, nodes) {
|
|
384
|
-
var domSelection = this.parent.nodeSelection;
|
|
385
|
-
var saveSelection = domSelection.save(range, docElement);
|
|
386
|
-
this.parent.domNode.setMarker(saveSelection);
|
|
387
|
-
var listElement;
|
|
388
|
-
var cloneListParentNode;
|
|
389
|
-
var sameListType = false;
|
|
390
|
-
if (element.nodeName === 'UL' || element.nodeName === 'OL') {
|
|
391
|
-
cloneListParentNode = element.cloneNode(true);
|
|
392
|
-
listElement = cloneListParentNode.firstChild;
|
|
393
|
-
}
|
|
394
|
-
var cloneElementNode = ej2_base_1.isNullOrUndefined(cloneListParentNode) ? element : element.firstChild;
|
|
395
|
-
for (var index = 0; index < nodes.length; index++) {
|
|
396
|
-
if (this.INVALID_TAGS.indexOf(nodes[index].nodeName) > -1 ||
|
|
397
|
-
nodes[index].querySelectorAll('img,audio,video,iframe').length > 0) {
|
|
398
|
-
continue;
|
|
399
|
-
}
|
|
400
|
-
var cloneParentNode = cloneElementNode.cloneNode(false);
|
|
401
|
-
while (nodes[index].firstChild) {
|
|
402
|
-
if (nodes[index].textContent.trim().length !== 0) {
|
|
403
|
-
cloneParentNode.appendChild(nodes[index].firstChild);
|
|
404
|
-
}
|
|
405
|
-
else {
|
|
406
|
-
nodes[index].removeChild(nodes[index].firstChild);
|
|
407
|
-
}
|
|
408
|
-
}
|
|
409
|
-
if (nodes[index].nodeName === 'TD' || nodes[index].nodeName === 'TH') {
|
|
410
|
-
if (ej2_base_1.isNullOrUndefined(cloneListParentNode)) {
|
|
411
|
-
nodes[index].appendChild(cloneParentNode);
|
|
412
|
-
continue;
|
|
413
|
-
}
|
|
414
|
-
else if (index === 0 && !ej2_base_1.isNullOrUndefined(cloneListParentNode)) {
|
|
415
|
-
nodes[index].appendChild(cloneListParentNode);
|
|
416
|
-
cloneListParentNode.appendChild(cloneParentNode);
|
|
417
|
-
continue;
|
|
418
|
-
}
|
|
419
|
-
else {
|
|
420
|
-
nodes[index].appendChild(cloneParentNode);
|
|
421
|
-
continue;
|
|
422
|
-
}
|
|
423
|
-
}
|
|
424
|
-
if (!ej2_base_1.isNullOrUndefined(cloneListParentNode)) {
|
|
425
|
-
sameListType = this.isSameListType(element, nodes[index]);
|
|
426
|
-
}
|
|
427
|
-
if (cloneParentNode.nodeName === 'LI' && !sameListType) {
|
|
428
|
-
this.insertNewList(range, nodes, index, cloneListParentNode, cloneParentNode);
|
|
429
|
-
}
|
|
430
|
-
else if (sameListType) {
|
|
431
|
-
this.insertSameList(nodes, index, cloneListParentNode, cloneParentNode);
|
|
432
|
-
}
|
|
433
|
-
else {
|
|
434
|
-
nodes[index].parentNode.replaceChild(cloneParentNode, nodes[index]);
|
|
435
|
-
}
|
|
436
|
-
if (cloneParentNode.nodeName !== 'LI' && (cloneParentNode.parentElement.nodeName === 'OL' ||
|
|
437
|
-
cloneParentNode.parentElement.nodeName === 'UL')) {
|
|
438
|
-
var parent_1 = cloneParentNode.parentElement;
|
|
439
|
-
this.parent.nodeCutter.SplitNode(range, parent_1, true);
|
|
440
|
-
if (!ej2_base_1.isNullOrUndefined(parent_1.previousElementSibling)) {
|
|
441
|
-
parent_1.previousElementSibling.after(cloneParentNode);
|
|
442
|
-
if (cloneParentNode.childNodes.length > 1) {
|
|
443
|
-
for (var j = 0; j < cloneParentNode.childNodes.length; j++) {
|
|
444
|
-
var currentChild = cloneParentNode.childNodes[j];
|
|
445
|
-
if (currentChild.nodeName === 'OL' || currentChild.nodeName === 'UL') {
|
|
446
|
-
cloneParentNode.after(currentChild);
|
|
447
|
-
}
|
|
448
|
-
}
|
|
449
|
-
}
|
|
450
|
-
}
|
|
451
|
-
else {
|
|
452
|
-
parent_1.parentElement.prepend(cloneParentNode);
|
|
453
|
-
}
|
|
454
|
-
}
|
|
455
|
-
}
|
|
456
|
-
!ej2_base_1.isNullOrUndefined(listElement) ? ej2_base_1.detach(listElement) : false;
|
|
457
|
-
this.cleanEmptyLists();
|
|
458
|
-
var save = this.parent.domNode.saveMarker(saveSelection);
|
|
459
|
-
save.restore();
|
|
460
|
-
};
|
|
461
|
-
FormatPainterActions.prototype.insertNewList = function (range, nodes, index, cloneListParentNode, cloneParentNode) {
|
|
462
|
-
if (index === 0) {
|
|
463
|
-
var nodeName = nodes[index].nodeName;
|
|
464
|
-
nodes[index] = nodes[index].parentNode.replaceChild(cloneListParentNode, nodes[index]);
|
|
465
|
-
var parent_2 = nodeName === 'LI' ? cloneListParentNode.parentElement
|
|
466
|
-
: cloneListParentNode;
|
|
467
|
-
this.parent.nodeCutter.SplitNode(range, parent_2, true);
|
|
468
|
-
if (nodes[index].nodeName === 'LI' && !ej2_base_1.isNullOrUndefined(parent_2)) {
|
|
469
|
-
cloneListParentNode.append(cloneParentNode);
|
|
470
|
-
if (!ej2_base_1.isNullOrUndefined(parent_2.parentNode)) {
|
|
471
|
-
parent_2.parentNode.insertBefore(cloneListParentNode, parent_2);
|
|
472
|
-
}
|
|
473
|
-
}
|
|
474
|
-
else {
|
|
475
|
-
if (!ej2_base_1.isNullOrUndefined(parent_2)) {
|
|
476
|
-
if (!ej2_base_1.isNullOrUndefined(parent_2.previousElementSibling) && parent_2.previousElementSibling.nodeName === cloneListParentNode.nodeName) {
|
|
477
|
-
var currentParent = parent_2.previousElementSibling;
|
|
478
|
-
currentParent.append(cloneParentNode);
|
|
479
|
-
while (currentParent.firstChild) {
|
|
480
|
-
cloneListParentNode.append(currentParent.firstChild);
|
|
481
|
-
}
|
|
482
|
-
}
|
|
483
|
-
else if (!ej2_base_1.isNullOrUndefined(parent_2.nextElementSibling) && parent_2.nextElementSibling.nodeName === cloneListParentNode.nodeName) {
|
|
484
|
-
var currentParent = parent_2.nextElementSibling;
|
|
485
|
-
currentParent.prepend(cloneParentNode);
|
|
486
|
-
while (currentParent.firstChild) {
|
|
487
|
-
cloneListParentNode.append(currentParent.firstChild);
|
|
488
|
-
}
|
|
489
|
-
}
|
|
490
|
-
else {
|
|
491
|
-
cloneListParentNode.append(cloneParentNode);
|
|
492
|
-
}
|
|
493
|
-
}
|
|
494
|
-
else {
|
|
495
|
-
cloneListParentNode.append(cloneParentNode);
|
|
496
|
-
}
|
|
497
|
-
}
|
|
498
|
-
}
|
|
499
|
-
else {
|
|
500
|
-
cloneListParentNode.append(cloneParentNode);
|
|
501
|
-
}
|
|
502
|
-
this.detachEmptyBlockNodes(nodes[index]);
|
|
503
|
-
};
|
|
504
|
-
FormatPainterActions.prototype.insertSameList = function (nodes, index, cloneListParentNode, cloneParentNode) {
|
|
505
|
-
if (index === 0) {
|
|
506
|
-
if (!ej2_base_1.isNullOrUndefined(nodes[index].parentNode) && (nodes[index].parentNode.nodeName === 'UL' || nodes[index].parentNode.nodeName === 'OL')) {
|
|
507
|
-
if (nodes.length === 1) {
|
|
508
|
-
while (cloneParentNode.firstChild) {
|
|
509
|
-
nodes[index].append(cloneParentNode.firstChild);
|
|
510
|
-
}
|
|
511
|
-
for (var i = 0; i < nodes[index].parentNode.childNodes.length; i++) {
|
|
512
|
-
var currentChild = nodes[index].parentNode.childNodes[i];
|
|
513
|
-
cloneListParentNode.append(currentChild.cloneNode(true));
|
|
514
|
-
}
|
|
515
|
-
}
|
|
516
|
-
else {
|
|
517
|
-
cloneListParentNode.append(cloneParentNode);
|
|
518
|
-
}
|
|
519
|
-
nodes[index].parentNode.parentNode.replaceChild(cloneListParentNode, nodes[index].parentNode);
|
|
520
|
-
}
|
|
521
|
-
}
|
|
522
|
-
else {
|
|
523
|
-
cloneListParentNode.append(cloneParentNode);
|
|
524
|
-
}
|
|
525
|
-
this.detachEmptyBlockNodes(nodes[index]);
|
|
526
|
-
};
|
|
527
|
-
FormatPainterActions.prototype.isSameListType = function (element, node) {
|
|
528
|
-
var isSameListType = false;
|
|
529
|
-
var nearestListNode = ej2_base_1.closest(node, 'ol, ul');
|
|
530
|
-
if (!ej2_base_1.isNullOrUndefined(nearestListNode) && nearestListNode.querySelectorAll('li').length > 0) {
|
|
531
|
-
if (nearestListNode.nodeName === element.nodeName) {
|
|
532
|
-
isSameListType = true;
|
|
533
|
-
}
|
|
534
|
-
else {
|
|
535
|
-
isSameListType = false;
|
|
536
|
-
}
|
|
537
|
-
}
|
|
538
|
-
return isSameListType;
|
|
539
|
-
};
|
|
540
|
-
FormatPainterActions.prototype.cleanEmptyLists = function () {
|
|
541
|
-
var listElem = this.parent.editableElement.querySelectorAll('ol, ul');
|
|
542
|
-
for (var i = 0; i < listElem.length; i++) {
|
|
543
|
-
if (listElem[i].textContent.trim() === '') {
|
|
544
|
-
ej2_base_1.detach(listElem[i]);
|
|
545
|
-
}
|
|
546
|
-
}
|
|
547
|
-
};
|
|
548
|
-
FormatPainterActions.prototype.setDeniedFormats = function () {
|
|
549
|
-
var deniedFormatsCollection = [];
|
|
550
|
-
if (ej2_base_1.isNullOrUndefined(this.settings) || ej2_base_1.isNullOrUndefined(this.settings.deniedFormats)) {
|
|
551
|
-
return;
|
|
552
|
-
}
|
|
553
|
-
var deniedFormats = this.settings.deniedFormats.indexOf(';') > -1 ? this.settings.deniedFormats.split(';') :
|
|
554
|
-
[this.settings.deniedFormats];
|
|
555
|
-
var length = deniedFormats.length;
|
|
556
|
-
for (var i = 0; i < length; i++) {
|
|
557
|
-
var formatString = deniedFormats[i];
|
|
558
|
-
if (formatString !== '') {
|
|
559
|
-
formatString.trim();
|
|
560
|
-
var collection = this.makeDeniedFormatsCollection(formatString);
|
|
561
|
-
if (!ej2_base_1.isNullOrUndefined(collection)) {
|
|
562
|
-
deniedFormatsCollection.push(collection);
|
|
563
|
-
}
|
|
564
|
-
}
|
|
565
|
-
}
|
|
566
|
-
this.deniedFormatsCollection = deniedFormatsCollection;
|
|
567
|
-
};
|
|
568
|
-
FormatPainterActions.prototype.detachEmptyBlockNodes = function (node) {
|
|
569
|
-
if (!ej2_base_1.isNullOrUndefined(node) && node.textContent.trim() === '') {
|
|
570
|
-
ej2_base_1.detach(node);
|
|
571
|
-
}
|
|
572
|
-
};
|
|
573
|
-
FormatPainterActions.prototype.makeDeniedFormatsCollection = function (value) {
|
|
574
|
-
var openParenIndex = value.indexOf('(');
|
|
575
|
-
var closeParenIndex = value.indexOf(')');
|
|
576
|
-
var openBracketIndex = value.indexOf('[');
|
|
577
|
-
var closeBracketIndex = value.indexOf(']');
|
|
578
|
-
var openBraceIndex = value.indexOf('{');
|
|
579
|
-
var closeBraceIndex = value.indexOf('}');
|
|
580
|
-
var classes = [];
|
|
581
|
-
var attributes = '';
|
|
582
|
-
var styles = '';
|
|
583
|
-
var tagName = '';
|
|
584
|
-
var classList = [];
|
|
585
|
-
var attributesList = [];
|
|
586
|
-
var stylesList = [];
|
|
587
|
-
if (openParenIndex > -1 && closeParenIndex > -1) {
|
|
588
|
-
classes = value.substring(openParenIndex + 1, closeParenIndex).split(' ');
|
|
589
|
-
classList = classes[0].split(')')[0].split(',');
|
|
590
|
-
}
|
|
591
|
-
if (openBracketIndex > -1 && closeBracketIndex > -1) {
|
|
592
|
-
attributes = value.substring(openBracketIndex + 1, closeBracketIndex);
|
|
593
|
-
attributesList = attributes.split(',');
|
|
594
|
-
}
|
|
595
|
-
if (openBraceIndex > -1 && closeBraceIndex > -1) {
|
|
596
|
-
styles = value.substring(openBraceIndex + 1, closeBraceIndex);
|
|
597
|
-
stylesList = styles.split(',');
|
|
598
|
-
}
|
|
599
|
-
var openIndexArray = [openParenIndex, openBracketIndex, openBraceIndex];
|
|
600
|
-
openIndexArray = openIndexArray.filter(function (index) { return index > -1; });
|
|
601
|
-
var len = openIndexArray.length;
|
|
602
|
-
var min;
|
|
603
|
-
if (len === 1) {
|
|
604
|
-
min = openIndexArray[0];
|
|
605
|
-
}
|
|
606
|
-
else if (len === 2) {
|
|
607
|
-
min = Math.min(openIndexArray[0], openIndexArray[1]);
|
|
608
|
-
}
|
|
609
|
-
else if (len === 3) {
|
|
610
|
-
min = Math.min(openIndexArray[0], openIndexArray[1], openIndexArray[2]);
|
|
611
|
-
}
|
|
612
|
-
tagName = value.substring(0, min);
|
|
613
|
-
tagName = tagName.trim();
|
|
614
|
-
return ({
|
|
615
|
-
tag: tagName, styles: stylesList, classes: classList,
|
|
616
|
-
attributes: attributesList
|
|
617
|
-
});
|
|
618
|
-
};
|
|
619
|
-
return FormatPainterActions;
|
|
620
|
-
}());
|
|
621
|
-
exports.FormatPainterActions = FormatPainterActions;
|
|
622
|
-
});
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { EditorManager } from './../base/editor-manager';
|
|
2
|
-
/**
|
|
3
|
-
* Formats internal component
|
|
4
|
-
*
|
|
5
|
-
* @hidden
|
|
6
|
-
* @deprecated
|
|
7
|
-
*/
|
|
8
|
-
export declare class Formats {
|
|
9
|
-
private parent;
|
|
10
|
-
private blockquotePrevent;
|
|
11
|
-
/**
|
|
12
|
-
* Constructor for creating the Formats 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
|
-
private getParentNode;
|
|
22
|
-
private blockQuotesHandled;
|
|
23
|
-
private onKeyUp;
|
|
24
|
-
private getBlockParent;
|
|
25
|
-
private onKeyDown;
|
|
26
|
-
private removeCodeContent;
|
|
27
|
-
private deleteContent;
|
|
28
|
-
private paraFocus;
|
|
29
|
-
private isNotEndCursor;
|
|
30
|
-
private setCursorPosition;
|
|
31
|
-
private focusSelectionParent;
|
|
32
|
-
private insertMarker;
|
|
33
|
-
private applyFormats;
|
|
34
|
-
private hasOnlyBlockquotes;
|
|
35
|
-
private getNode;
|
|
36
|
-
private createBlockquoteSpan;
|
|
37
|
-
private setSelectionBRConfig;
|
|
38
|
-
private preFormatMerge;
|
|
39
|
-
private blockquotesFormatMerge;
|
|
40
|
-
private cleanFormats;
|
|
41
|
-
private applyTableSidesFormat;
|
|
42
|
-
destroy(): void;
|
|
43
|
-
}
|