@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,462 +0,0 @@
|
|
|
1
|
-
define(["require", "exports", "./../base/constant", "@syncfusion/ej2-base", "./../../common/constant", "@syncfusion/ej2-base"], function (require, exports, CONSTANT, ej2_base_1, EVENTS, ej2_base_2) {
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
var MDLists = (function () {
|
|
5
|
-
function MDLists(options) {
|
|
6
|
-
ej2_base_1.extend(this, this, options, true);
|
|
7
|
-
this.selection = this.parent.markdownSelection;
|
|
8
|
-
this.addEventListener();
|
|
9
|
-
}
|
|
10
|
-
MDLists.prototype.addEventListener = function () {
|
|
11
|
-
this.parent.observer.on(CONSTANT.LISTS_COMMAND, this.applyListsHandler, this);
|
|
12
|
-
this.parent.observer.on(EVENTS.KEY_DOWN_HANDLER, this.keyDownHandler, this);
|
|
13
|
-
this.parent.observer.on(EVENTS.KEY_UP_HANDLER, this.keyUpHandler, this);
|
|
14
|
-
this.parent.observer.on(EVENTS.INTERNAL_DESTROY, this.destroy, this);
|
|
15
|
-
};
|
|
16
|
-
MDLists.prototype.removeEventListener = function () {
|
|
17
|
-
this.parent.observer.off(CONSTANT.LISTS_COMMAND, this.applyListsHandler);
|
|
18
|
-
this.parent.observer.off(EVENTS.KEY_DOWN_HANDLER, this.keyDownHandler);
|
|
19
|
-
this.parent.observer.off(EVENTS.KEY_UP_HANDLER, this.keyUpHandler);
|
|
20
|
-
this.parent.observer.off(EVENTS.INTERNAL_DESTROY, this.destroy);
|
|
21
|
-
};
|
|
22
|
-
MDLists.prototype.keyDownHandler = function (event) {
|
|
23
|
-
switch (event.event.which) {
|
|
24
|
-
case 9:
|
|
25
|
-
this.tabKey(event);
|
|
26
|
-
break;
|
|
27
|
-
}
|
|
28
|
-
switch (event.event.action) {
|
|
29
|
-
case 'ordered-list':
|
|
30
|
-
this.applyListsHandler({ subCommand: 'OL', callBack: event.callBack });
|
|
31
|
-
event.event.preventDefault();
|
|
32
|
-
break;
|
|
33
|
-
case 'unordered-list':
|
|
34
|
-
this.applyListsHandler({ subCommand: 'UL', callBack: event.callBack });
|
|
35
|
-
event.event.preventDefault();
|
|
36
|
-
break;
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
MDLists.prototype.keyUpHandler = function (event) {
|
|
40
|
-
switch (event.event.which) {
|
|
41
|
-
case 13:
|
|
42
|
-
this.enterKey(event);
|
|
43
|
-
break;
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
MDLists.prototype.tabKey = function (event) {
|
|
47
|
-
var textArea = this.parent.element;
|
|
48
|
-
this.selection.save(textArea.selectionStart, textArea.selectionEnd);
|
|
49
|
-
var start = textArea.selectionStart;
|
|
50
|
-
var end = textArea.selectionEnd;
|
|
51
|
-
var parents = this.selection.getSelectedParentPoints(textArea);
|
|
52
|
-
var addedLength = 0;
|
|
53
|
-
var isNotFirst = this.isNotFirstLine(textArea, parents[0]);
|
|
54
|
-
if (!isNotFirst && !event.event.shiftKey) {
|
|
55
|
-
this.restore(textArea, start, end + addedLength, event);
|
|
56
|
-
return;
|
|
57
|
-
}
|
|
58
|
-
var listFormat = this.olListType();
|
|
59
|
-
var regex = this.getListRegex();
|
|
60
|
-
this.currentAction = this.getAction(parents[0].text);
|
|
61
|
-
for (var i = 0; i < parents.length; i++) {
|
|
62
|
-
var prevIndex = event.event.shiftKey ? parents[i].line - 1 : parents[i].line - 1;
|
|
63
|
-
var prevLine = this.selection.getLine(textArea, prevIndex);
|
|
64
|
-
if (prevLine && (!event.event.shiftKey && isNotFirst || (event.event.shiftKey))) {
|
|
65
|
-
var prevLineSplit = prevLine.split('. ');
|
|
66
|
-
var tabSpace = '\t';
|
|
67
|
-
var tabSpaceLength = event.event.shiftKey ? -tabSpace.length : tabSpace.length;
|
|
68
|
-
var splitTab = parents[i].text.split('\t');
|
|
69
|
-
if (event.event.shiftKey && splitTab.length === 1) {
|
|
70
|
-
break;
|
|
71
|
-
}
|
|
72
|
-
if (this.currentAction === 'OL' && /^\d+$/.test(prevLineSplit[0].trim()) && listFormat) {
|
|
73
|
-
event.event.preventDefault();
|
|
74
|
-
parents[i].text = event.event.shiftKey ? splitTab.splice(1, splitTab.length).join('\t') : tabSpace + parents[i].text;
|
|
75
|
-
var curTabSpace = this.getTabSpace(parents[i].text);
|
|
76
|
-
var prevTabSpace = this.getTabSpace(prevLine);
|
|
77
|
-
var splitText = parents[i].text.split('. ');
|
|
78
|
-
if (curTabSpace === prevTabSpace) {
|
|
79
|
-
this.changeTextAreaValue(splitText, this.nextOrderedListValue(prevLineSplit[0].trim()), event, textArea, parents, i, end);
|
|
80
|
-
}
|
|
81
|
-
else if (prevTabSpace < curTabSpace) {
|
|
82
|
-
this.changeTextAreaValue(splitText, '1. ', event, textArea, parents, i, end);
|
|
83
|
-
}
|
|
84
|
-
else {
|
|
85
|
-
for (; prevTabSpace.length > curTabSpace.length; null) {
|
|
86
|
-
prevIndex = prevIndex - 1;
|
|
87
|
-
prevLine = this.selection.getLine(textArea, prevIndex);
|
|
88
|
-
var prevLineSplit_1 = prevLine.trim().split('. ');
|
|
89
|
-
if (/^\d+$/.test(prevLineSplit_1[0])) {
|
|
90
|
-
prevTabSpace = this.getTabSpace(prevLine);
|
|
91
|
-
if (prevTabSpace.length <= curTabSpace.length) {
|
|
92
|
-
this.changeTextAreaValue(splitText, this.nextOrderedListValue(prevLineSplit_1[0]), event, textArea, parents, i, end);
|
|
93
|
-
break;
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
else if (this.currentAction === 'UL' && regex.test(prevLine.trim()) || !listFormat) {
|
|
100
|
-
event.event.preventDefault();
|
|
101
|
-
parents[i].text = event.event.shiftKey ? splitTab.splice(1, splitTab.length).join('\t') : tabSpace + parents[i].text;
|
|
102
|
-
textArea.value = textArea.value.substr(0, parents[i].start) + parents[i].text + '\n' +
|
|
103
|
-
textArea.value.substr(parents[i].end, textArea.value.length);
|
|
104
|
-
}
|
|
105
|
-
start = i === 0 ? start + tabSpaceLength : start;
|
|
106
|
-
addedLength += tabSpaceLength;
|
|
107
|
-
if (parents.length !== 1) {
|
|
108
|
-
for (var j = i; j < parents.length; j++) {
|
|
109
|
-
parents[j].start = j !== 0 ? parents[j].start + tabSpaceLength : parents[j].start;
|
|
110
|
-
parents[j].end = parents[j].end + tabSpaceLength;
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
this.restore(textArea, start, end + addedLength, event);
|
|
116
|
-
};
|
|
117
|
-
MDLists.prototype.changeTextAreaValue = function (splitText, prefixValue, event, textArea, parents, k, end) {
|
|
118
|
-
var prefix = prefixValue;
|
|
119
|
-
splitText.splice(0, 1);
|
|
120
|
-
var textAreaLength = this.selection.getAllParents(textArea.value).length;
|
|
121
|
-
var changedList = '';
|
|
122
|
-
var curTabSpace = this.getTabSpace(parents[k].text);
|
|
123
|
-
var prefixNumber = parseInt(prefix.split('.')[0], null);
|
|
124
|
-
var nestedTabSpace = this.getTabSpace(parents[k].text);
|
|
125
|
-
var nestedlistorder = true;
|
|
126
|
-
var nestedListStart = true;
|
|
127
|
-
var curTabSpaceLength;
|
|
128
|
-
var nextPrefixValue = -1;
|
|
129
|
-
var traversIncreased = true;
|
|
130
|
-
var nextLineLength = 0;
|
|
131
|
-
var lineBreak = '';
|
|
132
|
-
changedList = (this.selection.getLine(textArea, parents[0].line + 1) !== '') ?
|
|
133
|
-
'' : changedList + textArea.value.substr(parents[0].end, textArea.value.length);
|
|
134
|
-
for (var i = 1; i < textAreaLength &&
|
|
135
|
-
!ej2_base_2.isNullOrUndefined(this.selection.getLine(textArea, parents[0].line + i))
|
|
136
|
-
&& this.selection.getLine(textArea, parents[0].line + i) !== ''; i++) {
|
|
137
|
-
var nextLine = this.selection.getLine(textArea, parents[0].line + i);
|
|
138
|
-
var nextTabSpace = this.getTabSpace(nextLine);
|
|
139
|
-
var nextLineSplit = nextLine.split('. ');
|
|
140
|
-
if (nextLineSplit.length === 1) {
|
|
141
|
-
changedList += textArea.value.substr(parents[0].end + nextLineLength, textArea.value.length);
|
|
142
|
-
break;
|
|
143
|
-
}
|
|
144
|
-
else {
|
|
145
|
-
nextLineLength += nextLine.length;
|
|
146
|
-
var shiftTabTargetList = false;
|
|
147
|
-
curTabSpaceLength = event.event.shiftKey ? curTabSpace.length + 1 : curTabSpace.length - 1;
|
|
148
|
-
if (nextTabSpace.length > nestedTabSpace.length) {
|
|
149
|
-
traversIncreased = false;
|
|
150
|
-
}
|
|
151
|
-
if (curTabSpace.length !== nextTabSpace.length && nextTabSpace.length < nestedTabSpace.length) {
|
|
152
|
-
nestedListStart = true;
|
|
153
|
-
nestedlistorder = false;
|
|
154
|
-
shiftTabTargetList = event.event.shiftKey &&
|
|
155
|
-
curTabSpace.length === nextTabSpace.length ? (nestedListStart = false, true) : false;
|
|
156
|
-
}
|
|
157
|
-
else if (traversIncreased && event.event.shiftKey &&
|
|
158
|
-
curTabSpace.length === nextTabSpace.length && nextTabSpace.length === nestedTabSpace.length) {
|
|
159
|
-
nestedListStart = false;
|
|
160
|
-
shiftTabTargetList = true;
|
|
161
|
-
}
|
|
162
|
-
lineBreak = changedList === '' ? '' : '\n';
|
|
163
|
-
if (curTabSpaceLength === nextTabSpace.length && nestedListStart) {
|
|
164
|
-
var nextPrefix = event.event.shiftKey ?
|
|
165
|
-
(nextPrefixValue++, this.nextOrderedListValue(nextPrefixValue.toString()))
|
|
166
|
-
: this.previousOrderedListValue(nextLineSplit[0]);
|
|
167
|
-
nextLineSplit.splice(0, 1);
|
|
168
|
-
changedList = changedList + lineBreak + nextTabSpace + nextPrefix + nextLineSplit.join('. ');
|
|
169
|
-
}
|
|
170
|
-
else if (curTabSpace.length === nextTabSpace.length && nestedlistorder || shiftTabTargetList) {
|
|
171
|
-
var nextPrefix = this.nextOrderedListValue(prefixNumber.toString());
|
|
172
|
-
prefixNumber++;
|
|
173
|
-
nextLineSplit.splice(0, 1);
|
|
174
|
-
changedList = changedList + lineBreak + nextTabSpace + nextPrefix + nextLineSplit.join('. ');
|
|
175
|
-
}
|
|
176
|
-
else {
|
|
177
|
-
changedList = changedList + lineBreak + nextLine;
|
|
178
|
-
nestedListStart = false;
|
|
179
|
-
}
|
|
180
|
-
nestedTabSpace = this.getTabSpace(nextLine);
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
parents[k].text = this.getTabSpace(parents[k].text) + prefix + splitText.join('. ') + '\n';
|
|
184
|
-
textArea.value = textArea.value.substr(0, parents[k].start) + parents[k].text + changedList;
|
|
185
|
-
};
|
|
186
|
-
MDLists.prototype.getTabSpace = function (line) {
|
|
187
|
-
var split = line.split('\t');
|
|
188
|
-
var tabs = '';
|
|
189
|
-
for (var i = 0; i < split.length; i++) {
|
|
190
|
-
if (split[i] === '') {
|
|
191
|
-
tabs += '\t';
|
|
192
|
-
}
|
|
193
|
-
else {
|
|
194
|
-
break;
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
return tabs;
|
|
198
|
-
};
|
|
199
|
-
MDLists.prototype.isNotFirstLine = function (textArea, points) {
|
|
200
|
-
var currentLine = points.text;
|
|
201
|
-
var prevIndex = points.line - 1;
|
|
202
|
-
var prevLine = this.selection.getLine(textArea, prevIndex);
|
|
203
|
-
var regex = this.getListRegex();
|
|
204
|
-
var isNotFirst = false;
|
|
205
|
-
var regexFirstCondition;
|
|
206
|
-
if (prevLine) {
|
|
207
|
-
this.currentAction = this.getAction(prevLine);
|
|
208
|
-
var prevLineSplit = prevLine.split('. ');
|
|
209
|
-
regexFirstCondition = this.currentAction === 'OL' ? /^\d+$/.test(prevLineSplit[0].trim()) : regex.test(prevLine.trim());
|
|
210
|
-
}
|
|
211
|
-
if (prevLine && regexFirstCondition) {
|
|
212
|
-
var curTabSpace = this.getTabSpace(currentLine);
|
|
213
|
-
var prevTabSpace = this.getTabSpace(prevLine);
|
|
214
|
-
isNotFirst = curTabSpace === prevTabSpace ? true : isNotFirst;
|
|
215
|
-
for (; prevTabSpace.length > curTabSpace.length; null) {
|
|
216
|
-
prevIndex = prevIndex - 1;
|
|
217
|
-
prevLine = this.selection.getLine(textArea, prevIndex);
|
|
218
|
-
var prevLineSplit = prevLine.trim().split('. ');
|
|
219
|
-
var regexSecondCondition = this.currentAction === 'OL' ?
|
|
220
|
-
/^\d+$/.test(prevLineSplit[0]) : regex.test(prevLine.trim());
|
|
221
|
-
if (regexSecondCondition) {
|
|
222
|
-
prevTabSpace = this.getTabSpace(prevLine);
|
|
223
|
-
if (prevTabSpace.length <= curTabSpace.length) {
|
|
224
|
-
isNotFirst = true;
|
|
225
|
-
break;
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
return isNotFirst;
|
|
231
|
-
};
|
|
232
|
-
MDLists.prototype.getAction = function (line) {
|
|
233
|
-
var ol = line.split('. ')[0];
|
|
234
|
-
var currentState = /^\d+$/.test(ol.trim());
|
|
235
|
-
var ul = line.trim().split(new RegExp('^(' + this.selection.replaceSpecialChar(this.syntax.UL).trim() + ')'))[1];
|
|
236
|
-
return (currentState ? 'OL' : ul ? 'UL' : 'NOTLIST');
|
|
237
|
-
};
|
|
238
|
-
MDLists.prototype.nextOrderedListValue = function (previousLine) {
|
|
239
|
-
var currentValue = parseInt(previousLine, null);
|
|
240
|
-
var nextValue = currentValue + 1;
|
|
241
|
-
return nextValue.toString() + '. ';
|
|
242
|
-
};
|
|
243
|
-
MDLists.prototype.previousOrderedListValue = function (previousLine) {
|
|
244
|
-
var currentValue = parseInt(previousLine, null);
|
|
245
|
-
var nextValue = currentValue - 1;
|
|
246
|
-
return nextValue.toString() + '. ';
|
|
247
|
-
};
|
|
248
|
-
MDLists.prototype.enterKey = function (event) {
|
|
249
|
-
var textArea = this.parent.element;
|
|
250
|
-
this.selection.save(textArea.selectionStart, textArea.selectionEnd);
|
|
251
|
-
var start = textArea.selectionStart;
|
|
252
|
-
var end = textArea.selectionEnd;
|
|
253
|
-
var parents = this.selection.getSelectedParentPoints(textArea);
|
|
254
|
-
var prevLine = this.selection.getLine(textArea, parents[0].line - 1);
|
|
255
|
-
var listFormat = this.olListType();
|
|
256
|
-
var regex = this.getListRegex();
|
|
257
|
-
var prevLineSplit = [];
|
|
258
|
-
if (!ej2_base_2.isNullOrUndefined(prevLine)) {
|
|
259
|
-
prevLineSplit = prevLine.split('. ');
|
|
260
|
-
this.currentAction = this.getAction(prevLine);
|
|
261
|
-
}
|
|
262
|
-
var addedLength = 0;
|
|
263
|
-
if (this.currentAction === 'OL' && prevLineSplit.length > 1 && /^\d+$/.test(prevLineSplit[0].trim()) && listFormat
|
|
264
|
-
&& prevLineSplit[1] !== '') {
|
|
265
|
-
var tabSpace = this.getTabSpace(prevLine);
|
|
266
|
-
this.currentAction = this.getAction(prevLine);
|
|
267
|
-
var prefix = this.nextOrderedListValue(prevLineSplit[0]);
|
|
268
|
-
parents[0].text = tabSpace + prefix + parents[0].text;
|
|
269
|
-
var textAreaLength = this.selection.getAllParents(textArea.value).length;
|
|
270
|
-
var changedList = '\n';
|
|
271
|
-
var curTabSpace = this.getTabSpace(prevLine);
|
|
272
|
-
var nestedTabSpace = this.getTabSpace(parents[0].text);
|
|
273
|
-
var nestedListOrder = true;
|
|
274
|
-
for (var i = 1; i < textAreaLength &&
|
|
275
|
-
textArea.value.substr(parents[0].end, textArea.value.length) !== ''; i++) {
|
|
276
|
-
var nextLine = this.selection.getLine(textArea, parents[0].line + i);
|
|
277
|
-
if (ej2_base_2.isNullOrUndefined(nextLine)) {
|
|
278
|
-
changedList = changedList + '';
|
|
279
|
-
}
|
|
280
|
-
else {
|
|
281
|
-
var nextLineSplit = nextLine.split('. ');
|
|
282
|
-
var nextTabSpace = this.getTabSpace(nextLine);
|
|
283
|
-
if (nextTabSpace.length < nestedTabSpace.length) {
|
|
284
|
-
nestedListOrder = false;
|
|
285
|
-
}
|
|
286
|
-
if (nextLineSplit.length > 1 && /^\d+$/.test(nextLineSplit[0].trim()) &&
|
|
287
|
-
curTabSpace.length === nextTabSpace.length && nestedListOrder) {
|
|
288
|
-
var nextPrefix = this.nextOrderedListValue(nextLineSplit[0]);
|
|
289
|
-
nextLineSplit.splice(0, 1);
|
|
290
|
-
changedList = changedList + nextTabSpace + nextPrefix + nextLineSplit.join('. ') + '\n';
|
|
291
|
-
}
|
|
292
|
-
else {
|
|
293
|
-
changedList = changedList + nextLine + '\n';
|
|
294
|
-
nestedTabSpace = this.getTabSpace(nextLine);
|
|
295
|
-
}
|
|
296
|
-
}
|
|
297
|
-
}
|
|
298
|
-
textArea.value = textArea.value.substr(0, parents[0].start) + curTabSpace +
|
|
299
|
-
prefix + this.selection.getLine(textArea, parents[0].line) + changedList;
|
|
300
|
-
start = start + prefix.length + tabSpace.length;
|
|
301
|
-
addedLength += prefix.length + tabSpace.length;
|
|
302
|
-
}
|
|
303
|
-
else if (this.currentAction === 'UL' && (prevLine && regex.test(prevLine.trim())) &&
|
|
304
|
-
prevLine.trim().replace(regex, '') !== '' || this.currentAction === 'OL' && !listFormat && prevLineSplit[1] !== '') {
|
|
305
|
-
var tabSpace = this.getTabSpace(prevLine);
|
|
306
|
-
var prefix = this.syntax[this.currentAction];
|
|
307
|
-
parents[0].text = tabSpace + prefix + parents[0].text +
|
|
308
|
-
(parents[0].text.trim().length > 0 ? '\n' : '');
|
|
309
|
-
textArea.value = textArea.value.substr(0, parents[0].start) + parents[0].text +
|
|
310
|
-
textArea.value.substr(parents[0].end, textArea.value.length);
|
|
311
|
-
start = start + prefix.length + tabSpace.length;
|
|
312
|
-
addedLength += prefix.length + tabSpace.length;
|
|
313
|
-
}
|
|
314
|
-
this.restore(textArea, start, end + addedLength, event);
|
|
315
|
-
};
|
|
316
|
-
MDLists.prototype.olListType = function () {
|
|
317
|
-
var olSyntaxList = this.syntax.OL.split('.,');
|
|
318
|
-
var listType = olSyntaxList.length === 1 ? null :
|
|
319
|
-
parseInt(olSyntaxList[2].trim(), null) - parseInt(olSyntaxList[0].trim(), null);
|
|
320
|
-
if (listType) {
|
|
321
|
-
return 1;
|
|
322
|
-
}
|
|
323
|
-
else {
|
|
324
|
-
return 0;
|
|
325
|
-
}
|
|
326
|
-
};
|
|
327
|
-
MDLists.prototype.applyListsHandler = function (e) {
|
|
328
|
-
var textArea = this.parent.element;
|
|
329
|
-
this.selection.save(textArea.selectionStart, textArea.selectionEnd);
|
|
330
|
-
this.currentAction = e.subCommand;
|
|
331
|
-
var start = textArea.selectionStart;
|
|
332
|
-
var end = textArea.selectionEnd;
|
|
333
|
-
var addedLength = 0;
|
|
334
|
-
var startLength = 0;
|
|
335
|
-
var endLength = 0;
|
|
336
|
-
var parents = this.selection.getSelectedParentPoints(textArea);
|
|
337
|
-
var prefix = '';
|
|
338
|
-
var listFormat = this.olListType();
|
|
339
|
-
var regex;
|
|
340
|
-
var perfixObj = {};
|
|
341
|
-
for (var i = 0; i < parents.length; i++) {
|
|
342
|
-
if (listFormat) {
|
|
343
|
-
regex = this.currentAction === 'OL' ? i + listFormat + '. ' : this.syntax[this.currentAction];
|
|
344
|
-
}
|
|
345
|
-
else {
|
|
346
|
-
regex = this.currentAction === 'OL' ? this.syntax.OL : this.syntax[this.currentAction];
|
|
347
|
-
}
|
|
348
|
-
if (!this.selection.isStartWith(parents[i].text, regex)) {
|
|
349
|
-
if (parents[i].text === '' && i === 0) {
|
|
350
|
-
this.selection.save(start, end);
|
|
351
|
-
if (parents.length !== 1) {
|
|
352
|
-
for (var j = i; j < parents.length; j++) {
|
|
353
|
-
parents[j].start = j !== 0 ? 1 + parents[j].start : parents[j].start;
|
|
354
|
-
parents[j].end = 1 + parents[j].end;
|
|
355
|
-
}
|
|
356
|
-
}
|
|
357
|
-
}
|
|
358
|
-
var preLineTabSpaceLength = !ej2_base_2.isNullOrUndefined(parents[i - 1]) ?
|
|
359
|
-
this.getTabSpace(parents[i - 1].text).length : 0;
|
|
360
|
-
var replace = this.appliedLine(parents[i].text, regex, perfixObj, preLineTabSpaceLength);
|
|
361
|
-
prefix = replace.line ? prefix : regex;
|
|
362
|
-
parents[i].text = replace.line ? replace.line : prefix + parents[i].text;
|
|
363
|
-
replace.space = replace.space ? replace.space : 0;
|
|
364
|
-
textArea.value = textArea.value.substr(0, parents[i].start + endLength) + parents[i].text + '\n' +
|
|
365
|
-
textArea.value.substr(parents[i].end, textArea.value.length);
|
|
366
|
-
start = i === 0 ? (start + prefix.length + replace.space) > 0 ?
|
|
367
|
-
start + prefix.length + replace.space : 0 : start;
|
|
368
|
-
addedLength += prefix.length + replace.space;
|
|
369
|
-
if (parents.length !== 1) {
|
|
370
|
-
for (var j = i; j < parents.length; j++) {
|
|
371
|
-
parents[j].start = j !== 0 ? prefix.length +
|
|
372
|
-
parents[j].start + replace.space : parents[j].start;
|
|
373
|
-
parents[j].end = prefix.length + parents[j].end + replace.space;
|
|
374
|
-
}
|
|
375
|
-
}
|
|
376
|
-
this.restore(textArea, start <= regex.length ? 0 : start, end + addedLength, null);
|
|
377
|
-
}
|
|
378
|
-
else {
|
|
379
|
-
parents[i].text = parents[i].text.replace(regex, '');
|
|
380
|
-
textArea.value = textArea.value.substr(0, parents[i].start + endLength) + parents[i].text + '\n' +
|
|
381
|
-
textArea.value.substr(parents[i].end + endLength, textArea.value.length);
|
|
382
|
-
endLength -= regex.length;
|
|
383
|
-
startLength = regex.length;
|
|
384
|
-
this.restore(textArea, start - startLength, end + endLength, null);
|
|
385
|
-
}
|
|
386
|
-
}
|
|
387
|
-
this.restore(textArea, null, null, e);
|
|
388
|
-
};
|
|
389
|
-
MDLists.prototype.appliedLine = function (line, prefixPattern, perfixObj, preTabSpaceLength) {
|
|
390
|
-
var points = {};
|
|
391
|
-
var regex = new RegExp('^[' + this.syntax.UL.trim() + ']');
|
|
392
|
-
var lineSplit = line.split('. ');
|
|
393
|
-
var currentPrefix = lineSplit[0] + '. ';
|
|
394
|
-
var isExist = regex.test(line.trim()) || line.trim() === this.syntax.OL.trim()
|
|
395
|
-
|| line.trim() === this.syntax.UL.trim() || /^\d+$/.test(lineSplit[0].trim());
|
|
396
|
-
var listFormat = this.olListType();
|
|
397
|
-
var curTabSpaceLength = this.getTabSpace(line).length;
|
|
398
|
-
if (this.currentAction === 'OL' && listFormat) {
|
|
399
|
-
perfixObj[curTabSpaceLength.toString()] = !ej2_base_2.isNullOrUndefined(perfixObj[curTabSpaceLength.toString()]) ?
|
|
400
|
-
perfixObj[curTabSpaceLength.toString()].valueOf() + 1 : 1;
|
|
401
|
-
prefixPattern = perfixObj[curTabSpaceLength.toString()].valueOf().toString() + '. ';
|
|
402
|
-
if (!ej2_base_2.isNullOrUndefined(preTabSpaceLength) && preTabSpaceLength > curTabSpaceLength) {
|
|
403
|
-
perfixObj[preTabSpaceLength.toString()] = 0;
|
|
404
|
-
}
|
|
405
|
-
}
|
|
406
|
-
if (isExist) {
|
|
407
|
-
var replace = void 0;
|
|
408
|
-
var pattern = void 0;
|
|
409
|
-
var space = 0;
|
|
410
|
-
if (regex.test(line.trim())) {
|
|
411
|
-
pattern = this.syntax.UL;
|
|
412
|
-
replace = prefixPattern;
|
|
413
|
-
points.space = prefixPattern.trim().length - this.syntax.UL.trim().length;
|
|
414
|
-
}
|
|
415
|
-
else if (/^\d+$/.test(lineSplit[0].trim()) && listFormat) {
|
|
416
|
-
pattern = lineSplit[0].trim() + '. ';
|
|
417
|
-
replace = prefixPattern;
|
|
418
|
-
points.space = this.syntax.UL.trim().length - currentPrefix.trim().length;
|
|
419
|
-
}
|
|
420
|
-
else if (/^\d+$/.test(lineSplit[0].trim())) {
|
|
421
|
-
pattern = lineSplit[0].trim() + '. ';
|
|
422
|
-
replace = this.syntax.UL;
|
|
423
|
-
points.space = this.syntax.UL.trim().length - currentPrefix.trim().length;
|
|
424
|
-
}
|
|
425
|
-
points.line = line.replace(pattern, replace);
|
|
426
|
-
}
|
|
427
|
-
return points;
|
|
428
|
-
};
|
|
429
|
-
MDLists.prototype.restore = function (textArea, start, end, event) {
|
|
430
|
-
if (!ej2_base_2.isNullOrUndefined(start) && !ej2_base_2.isNullOrUndefined(start)) {
|
|
431
|
-
this.selection.save(start, end);
|
|
432
|
-
}
|
|
433
|
-
if (!ej2_base_2.isNullOrUndefined(event)) {
|
|
434
|
-
this.selection.restore(textArea);
|
|
435
|
-
}
|
|
436
|
-
if (event && event.callBack) {
|
|
437
|
-
event.callBack({
|
|
438
|
-
requestType: this.currentAction,
|
|
439
|
-
selectedText: this.selection.getSelectedText(textArea),
|
|
440
|
-
editorMode: 'Markdown',
|
|
441
|
-
event: event.event
|
|
442
|
-
});
|
|
443
|
-
}
|
|
444
|
-
};
|
|
445
|
-
MDLists.prototype.getListRegex = function () {
|
|
446
|
-
var regex = '';
|
|
447
|
-
var configKey = Object.keys(this.syntax);
|
|
448
|
-
var regExp = RegExp;
|
|
449
|
-
for (var j = 0; j < configKey.length; j++) {
|
|
450
|
-
var syntax = this.selection.replaceSpecialChar(this.syntax[configKey[j]]);
|
|
451
|
-
regex += regex === '' ? '^(' + syntax + ')|^(' + syntax.trim() + ')' :
|
|
452
|
-
'|^(' + syntax + ')|^(' + syntax.trim() + ')';
|
|
453
|
-
}
|
|
454
|
-
return new regExp(regex);
|
|
455
|
-
};
|
|
456
|
-
MDLists.prototype.destroy = function () {
|
|
457
|
-
this.removeEventListener();
|
|
458
|
-
};
|
|
459
|
-
return MDLists;
|
|
460
|
-
}());
|
|
461
|
-
exports.MDLists = MDLists;
|
|
462
|
-
});
|
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* MarkdownSelection internal module
|
|
3
|
-
*
|
|
4
|
-
* @hidden
|
|
5
|
-
* @deprecated
|
|
6
|
-
*/
|
|
7
|
-
export declare class MarkdownSelection {
|
|
8
|
-
selectionStart: number;
|
|
9
|
-
selectionEnd: number;
|
|
10
|
-
/**
|
|
11
|
-
* markdown getLineNumber method
|
|
12
|
-
*
|
|
13
|
-
* @param {HTMLTextAreaElement} textarea - specifies the text area element
|
|
14
|
-
* @param {number} point - specifies the number value
|
|
15
|
-
* @returns {number} - returns the value
|
|
16
|
-
* @hidden
|
|
17
|
-
* @deprecated
|
|
18
|
-
*/
|
|
19
|
-
getLineNumber(textarea: HTMLTextAreaElement, point: number): number;
|
|
20
|
-
/**
|
|
21
|
-
* markdown getSelectedText method
|
|
22
|
-
*
|
|
23
|
-
* @param {HTMLTextAreaElement} textarea - specifies the text area element
|
|
24
|
-
* @returns {string} - specifies the string value
|
|
25
|
-
* @hidden
|
|
26
|
-
* @deprecated
|
|
27
|
-
*/
|
|
28
|
-
getSelectedText(textarea: HTMLTextAreaElement): string;
|
|
29
|
-
/**
|
|
30
|
-
* markdown getAllParents method
|
|
31
|
-
*
|
|
32
|
-
* @param {string} value - specifies the string value
|
|
33
|
-
* @returns {string[]} - returns the string value
|
|
34
|
-
* @hidden
|
|
35
|
-
* @deprecated
|
|
36
|
-
*/
|
|
37
|
-
getAllParents(value: string): string[];
|
|
38
|
-
/**
|
|
39
|
-
* markdown getSelectedLine method
|
|
40
|
-
*
|
|
41
|
-
* @param {HTMLTextAreaElement} textarea - specifies the text area element
|
|
42
|
-
* @returns {string} - returns the string value
|
|
43
|
-
* @hidden
|
|
44
|
-
* @deprecated
|
|
45
|
-
*/
|
|
46
|
-
getSelectedLine(textarea: HTMLTextAreaElement): string;
|
|
47
|
-
/**
|
|
48
|
-
* markdown getLine method
|
|
49
|
-
*
|
|
50
|
-
* @param {HTMLTextAreaElement} textarea - specifies the text area element
|
|
51
|
-
* @param {number} index - specifies the number value
|
|
52
|
-
* @returns {string} - returns the string value
|
|
53
|
-
* @hidden
|
|
54
|
-
* @deprecated
|
|
55
|
-
*/
|
|
56
|
-
getLine(textarea: HTMLTextAreaElement, index: number): string;
|
|
57
|
-
/**
|
|
58
|
-
* markdown getSelectedParentPoints method
|
|
59
|
-
*
|
|
60
|
-
* @param {HTMLTextAreaElement} textarea - specifies the text area element
|
|
61
|
-
* @returns {string} - returns the string value
|
|
62
|
-
* @hidden
|
|
63
|
-
* @deprecated
|
|
64
|
-
*/
|
|
65
|
-
getSelectedParentPoints(textarea: HTMLTextAreaElement): {
|
|
66
|
-
[key: string]: string | number;
|
|
67
|
-
}[];
|
|
68
|
-
/**
|
|
69
|
-
* markdown setSelection method
|
|
70
|
-
*
|
|
71
|
-
* @param {HTMLTextAreaElement} textarea - specifies the text area element
|
|
72
|
-
* @param {number} start - specifies the start vaulue
|
|
73
|
-
* @param {number} end - specifies the end value
|
|
74
|
-
* @returns {void}
|
|
75
|
-
* @hidden
|
|
76
|
-
* @deprecated
|
|
77
|
-
*/
|
|
78
|
-
setSelection(textarea: HTMLTextAreaElement, start: number, end: number): void;
|
|
79
|
-
/**
|
|
80
|
-
* markdown save method
|
|
81
|
-
*
|
|
82
|
-
* @param {number} start - specifies the start vaulue
|
|
83
|
-
* @param {number} end - specifies the end value
|
|
84
|
-
* @returns {void}
|
|
85
|
-
* @hidden
|
|
86
|
-
* @deprecated
|
|
87
|
-
*/
|
|
88
|
-
save(start: number, end: number): void;
|
|
89
|
-
/**
|
|
90
|
-
* markdown restore method
|
|
91
|
-
*
|
|
92
|
-
* @param {HTMLTextAreaElement} textArea - specifies the text area element
|
|
93
|
-
* @returns {void}
|
|
94
|
-
* @hidden
|
|
95
|
-
* @deprecated
|
|
96
|
-
*/
|
|
97
|
-
restore(textArea: HTMLTextAreaElement): void;
|
|
98
|
-
/**
|
|
99
|
-
* markdown isStartWith method
|
|
100
|
-
*
|
|
101
|
-
* @param {string} line - specifies the string value
|
|
102
|
-
* @param {string} command - specifies the string value
|
|
103
|
-
* @returns {boolean} - returns the boolean value
|
|
104
|
-
* @hidden
|
|
105
|
-
* @deprecated
|
|
106
|
-
*/
|
|
107
|
-
isStartWith(line: string, command: string): boolean;
|
|
108
|
-
/**
|
|
109
|
-
* markdown replaceSpecialChar method
|
|
110
|
-
*
|
|
111
|
-
* @param {string} value - specifies the string value
|
|
112
|
-
* @returns {string} - returns the value
|
|
113
|
-
* @hidden
|
|
114
|
-
* @deprecated
|
|
115
|
-
*/
|
|
116
|
-
replaceSpecialChar(value: string): string;
|
|
117
|
-
/**
|
|
118
|
-
* markdown isClear method
|
|
119
|
-
*
|
|
120
|
-
* @param {string} parents - specifies the parent element
|
|
121
|
-
* @param {string} regex - specifies the regex value
|
|
122
|
-
* @returns {boolean} - returns the boolean value
|
|
123
|
-
* @hidden
|
|
124
|
-
* @deprecated
|
|
125
|
-
*/
|
|
126
|
-
isClear(parents: {
|
|
127
|
-
[key: string]: string | number;
|
|
128
|
-
}[], regex: string): boolean;
|
|
129
|
-
/**
|
|
130
|
-
* markdown getSelectedInlinePoints method
|
|
131
|
-
*
|
|
132
|
-
* @param {HTMLTextAreaElement} textarea - specifies the text area
|
|
133
|
-
* @returns {void}
|
|
134
|
-
* @hidden
|
|
135
|
-
* @deprecated
|
|
136
|
-
*/
|
|
137
|
-
getSelectedInlinePoints(textarea: HTMLTextAreaElement): {
|
|
138
|
-
[key: string]: string | number;
|
|
139
|
-
};
|
|
140
|
-
}
|