@syncfusion/ej2-richtexteditor 23.2.7 → 24.1.41-569781
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 +259 -259
- package/CHANGELOG.md +1927 -1749
- package/README.md +76 -76
- package/dist/ej2-richtexteditor.umd.min.js +1 -10
- package/dist/ej2-richtexteditor.umd.min.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es2015.js +3069 -1283
- package/dist/es6/ej2-richtexteditor.es2015.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es5.js +3173 -1386
- package/dist/es6/ej2-richtexteditor.es5.js.map +1 -1
- package/helpers/e2e/index.js +3 -3
- package/helpers/e2e/rte-helper.js +13 -13
- package/license +9 -9
- package/package.json +74 -74
- package/src/common/config.d.ts +7 -0
- package/src/common/config.js +12 -1
- package/src/common/constant.d.ts +6 -0
- package/src/common/constant.js +6 -0
- package/src/common/interface.d.ts +19 -7
- package/src/common/types.d.ts +6 -0
- package/src/common/util.d.ts +6 -0
- package/src/common/util.js +61 -20
- package/src/editor-manager/base/classes.d.ts +1 -1
- package/src/editor-manager/base/classes.js +1 -1
- package/src/editor-manager/base/constant.d.ts +6 -0
- package/src/editor-manager/base/constant.js +6 -0
- package/src/editor-manager/base/editor-manager.d.ts +8 -3
- package/src/editor-manager/base/editor-manager.js +62 -3
- package/src/editor-manager/base/enum.d.ts +2 -2
- package/src/editor-manager/base/interface.d.ts +17 -9
- package/src/editor-manager/base/types.d.ts +1 -1
- package/src/editor-manager/plugin/alignments.d.ts +2 -2
- package/src/editor-manager/plugin/alignments.js +2 -2
- package/src/editor-manager/plugin/audio.d.ts +3 -3
- package/src/editor-manager/plugin/audio.js +16 -6
- package/src/editor-manager/plugin/clearformat-exec.d.ts +2 -2
- package/src/editor-manager/plugin/clearformat-exec.js +2 -2
- package/src/editor-manager/plugin/clearformat.d.ts +1 -1
- package/src/editor-manager/plugin/clearformat.js +1 -1
- package/src/editor-manager/plugin/dom-node.d.ts +39 -35
- package/src/editor-manager/plugin/dom-node.js +203 -62
- package/src/editor-manager/plugin/format-painter-actions.d.ts +2 -1
- package/src/editor-manager/plugin/format-painter-actions.js +20 -2
- package/src/editor-manager/plugin/formats.d.ts +3 -2
- package/src/editor-manager/plugin/formats.js +40 -5
- package/src/editor-manager/plugin/image.d.ts +3 -3
- package/src/editor-manager/plugin/image.js +41 -18
- package/src/editor-manager/plugin/indents.d.ts +2 -2
- package/src/editor-manager/plugin/indents.js +2 -2
- package/src/editor-manager/plugin/insert-methods.d.ts +4 -4
- package/src/editor-manager/plugin/insert-methods.js +4 -4
- package/src/editor-manager/plugin/insert-text.d.ts +2 -2
- package/src/editor-manager/plugin/insert-text.js +2 -2
- package/src/editor-manager/plugin/inserthtml-exec.d.ts +2 -2
- package/src/editor-manager/plugin/inserthtml-exec.js +2 -2
- package/src/editor-manager/plugin/inserthtml.d.ts +3 -2
- package/src/editor-manager/plugin/inserthtml.js +69 -9
- package/src/editor-manager/plugin/isformatted.d.ts +8 -8
- package/src/editor-manager/plugin/isformatted.js +8 -8
- package/src/editor-manager/plugin/link.d.ts +2 -2
- package/src/editor-manager/plugin/link.js +6 -3
- package/src/editor-manager/plugin/lists.d.ts +2 -2
- package/src/editor-manager/plugin/lists.js +123 -67
- package/src/editor-manager/plugin/ms-word-clean-up.d.ts +4 -1
- package/src/editor-manager/plugin/ms-word-clean-up.js +216 -86
- package/src/editor-manager/plugin/nodecutter.d.ts +6 -6
- package/src/editor-manager/plugin/nodecutter.js +8 -8
- package/src/editor-manager/plugin/selection-commands.d.ts +2 -1
- package/src/editor-manager/plugin/selection-commands.js +166 -4
- package/src/editor-manager/plugin/selection-exec.d.ts +2 -2
- package/src/editor-manager/plugin/selection-exec.js +2 -2
- package/src/editor-manager/plugin/table.d.ts +2 -3
- package/src/editor-manager/plugin/table.js +35 -32
- package/src/editor-manager/plugin/toolbar-status.d.ts +4 -4
- package/src/editor-manager/plugin/toolbar-status.js +22 -12
- package/src/editor-manager/plugin/undo.d.ts +7 -6
- package/src/editor-manager/plugin/undo.js +27 -7
- package/src/editor-manager/plugin/video.d.ts +3 -3
- package/src/editor-manager/plugin/video.js +3 -3
- package/src/markdown-parser/base/interface.d.ts +10 -10
- package/src/markdown-parser/base/markdown-parser.d.ts +3 -3
- package/src/markdown-parser/base/markdown-parser.js +3 -3
- package/src/markdown-parser/base/types.d.ts +1 -1
- package/src/markdown-parser/plugin/clearformat.d.ts +2 -2
- package/src/markdown-parser/plugin/clearformat.js +2 -2
- package/src/markdown-parser/plugin/formats.d.ts +2 -2
- package/src/markdown-parser/plugin/formats.js +2 -2
- package/src/markdown-parser/plugin/insert-text.d.ts +2 -2
- package/src/markdown-parser/plugin/insert-text.js +2 -2
- package/src/markdown-parser/plugin/link.d.ts +2 -2
- package/src/markdown-parser/plugin/link.js +2 -2
- package/src/markdown-parser/plugin/markdown-selection.d.ts +14 -14
- package/src/markdown-parser/plugin/markdown-selection.js +14 -14
- package/src/markdown-parser/plugin/md-selection-formats.d.ts +1 -1
- package/src/markdown-parser/plugin/md-selection-formats.js +1 -1
- package/src/markdown-parser/plugin/table.d.ts +3 -3
- package/src/markdown-parser/plugin/table.js +3 -3
- package/src/markdown-parser/plugin/undo.d.ts +6 -6
- package/src/markdown-parser/plugin/undo.js +6 -6
- package/src/rich-text-editor/actions/base-quick-toolbar.d.ts +12 -12
- package/src/rich-text-editor/actions/base-quick-toolbar.js +75 -24
- package/src/rich-text-editor/actions/base-toolbar.d.ts +3 -3
- package/src/rich-text-editor/actions/base-toolbar.js +35 -37
- package/src/rich-text-editor/actions/color-picker.d.ts +3 -2
- package/src/rich-text-editor/actions/color-picker.js +15 -5
- package/src/rich-text-editor/actions/count.d.ts +3 -3
- package/src/rich-text-editor/actions/count.js +4 -4
- package/src/rich-text-editor/actions/dropdown-buttons.d.ts +2 -2
- package/src/rich-text-editor/actions/dropdown-buttons.js +27 -6
- package/src/rich-text-editor/actions/emoji-picker.d.ts +1 -1
- package/src/rich-text-editor/actions/emoji-picker.js +16 -7
- package/src/rich-text-editor/actions/enter-key.js +6 -4
- package/src/rich-text-editor/actions/file-manager.js +1 -1
- package/src/rich-text-editor/actions/format-painter.js +1 -1
- package/src/rich-text-editor/actions/full-screen.d.ts +3 -3
- package/src/rich-text-editor/actions/full-screen.js +8 -7
- package/src/rich-text-editor/actions/html-editor.d.ts +5 -3
- package/src/rich-text-editor/actions/html-editor.js +137 -22
- package/src/rich-text-editor/actions/keyboard-model.d.ts +16 -16
- package/src/rich-text-editor/actions/keyboard.d.ts +1 -1
- package/src/rich-text-editor/actions/keyboard.js +23 -21
- package/src/rich-text-editor/actions/markdown-editor.d.ts +2 -2
- package/src/rich-text-editor/actions/markdown-editor.js +5 -3
- package/src/rich-text-editor/actions/paste-clean-up.d.ts +6 -1
- package/src/rich-text-editor/actions/paste-clean-up.js +157 -29
- package/src/rich-text-editor/actions/quick-toolbar.d.ts +16 -9
- package/src/rich-text-editor/actions/quick-toolbar.js +54 -20
- package/src/rich-text-editor/actions/resize.js +2 -1
- package/src/rich-text-editor/actions/toolbar-action.js +1 -1
- package/src/rich-text-editor/actions/toolbar.d.ts +16 -16
- package/src/rich-text-editor/actions/toolbar.js +48 -109
- package/src/rich-text-editor/actions/xhtml-validation.d.ts +1 -1
- package/src/rich-text-editor/actions/xhtml-validation.js +1 -1
- package/src/rich-text-editor/base/classes.d.ts +125 -125
- package/src/rich-text-editor/base/classes.js +125 -125
- package/src/rich-text-editor/base/constant.d.ts +195 -150
- package/src/rich-text-editor/base/constant.js +364 -150
- package/src/rich-text-editor/base/enum.d.ts +1 -1
- package/src/rich-text-editor/base/enum.js +1 -1
- package/src/rich-text-editor/base/interface.d.ts +96 -52
- package/src/rich-text-editor/base/interface.js +1 -1
- package/src/rich-text-editor/base/rich-text-editor-model.d.ts +891 -891
- package/src/rich-text-editor/base/rich-text-editor.d.ts +76 -64
- package/src/rich-text-editor/base/rich-text-editor.js +259 -163
- package/src/rich-text-editor/base/util.d.ts +5 -1
- package/src/rich-text-editor/base/util.js +58 -6
- package/src/rich-text-editor/formatter/formatter.d.ts +8 -8
- package/src/rich-text-editor/formatter/formatter.js +23 -12
- package/src/rich-text-editor/formatter/html-formatter.d.ts +2 -2
- package/src/rich-text-editor/formatter/html-formatter.js +15 -15
- package/src/rich-text-editor/formatter/markdown-formatter.d.ts +2 -2
- package/src/rich-text-editor/formatter/markdown-formatter.js +15 -15
- package/src/rich-text-editor/models/default-locale.js +31 -25
- package/src/rich-text-editor/models/iframe-settings-model.d.ts +26 -26
- package/src/rich-text-editor/models/iframe-settings.js +19 -19
- package/src/rich-text-editor/models/inline-mode-model.d.ts +11 -11
- package/src/rich-text-editor/models/inline-mode.js +19 -19
- package/src/rich-text-editor/models/items.js +3 -3
- package/src/rich-text-editor/models/toolbar-settings-model.d.ts +760 -760
- package/src/rich-text-editor/models/toolbar-settings.d.ts +1 -1
- package/src/rich-text-editor/models/toolbar-settings.js +20 -20
- package/src/rich-text-editor/renderer/audio-module.d.ts +2 -1
- package/src/rich-text-editor/renderer/audio-module.js +14 -1
- package/src/rich-text-editor/renderer/content-renderer.d.ts +6 -6
- package/src/rich-text-editor/renderer/content-renderer.js +6 -6
- package/src/rich-text-editor/renderer/dialog-renderer.d.ts +4 -2
- package/src/rich-text-editor/renderer/dialog-renderer.js +24 -4
- package/src/rich-text-editor/renderer/iframe-content-renderer.d.ts +4 -4
- package/src/rich-text-editor/renderer/iframe-content-renderer.js +19 -18
- package/src/rich-text-editor/renderer/image-module.d.ts +10 -2
- package/src/rich-text-editor/renderer/image-module.js +261 -220
- package/src/rich-text-editor/renderer/link-module.d.ts +1 -1
- package/src/rich-text-editor/renderer/link-module.js +54 -25
- package/src/rich-text-editor/renderer/markdown-renderer.d.ts +6 -6
- package/src/rich-text-editor/renderer/markdown-renderer.js +6 -6
- package/src/rich-text-editor/renderer/popup-renderer.d.ts +5 -5
- package/src/rich-text-editor/renderer/popup-renderer.js +5 -5
- package/src/rich-text-editor/renderer/render.d.ts +2 -2
- package/src/rich-text-editor/renderer/render.js +2 -2
- package/src/rich-text-editor/renderer/table-module.d.ts +11 -2
- package/src/rich-text-editor/renderer/table-module.js +331 -166
- package/src/rich-text-editor/renderer/toolbar-renderer.d.ts +13 -15
- package/src/rich-text-editor/renderer/toolbar-renderer.js +114 -115
- package/src/rich-text-editor/renderer/video-module.d.ts +4 -1
- package/src/rich-text-editor/renderer/video-module.js +62 -35
- package/src/rich-text-editor/renderer/view-source.d.ts +7 -6
- package/src/rich-text-editor/renderer/view-source.js +21 -11
- package/src/rich-text-editor/services/renderer-factory.d.ts +3 -3
- package/src/rich-text-editor/services/renderer-factory.js +3 -3
- package/src/rich-text-editor/services/service-locator.d.ts +3 -3
- package/src/rich-text-editor/services/service-locator.js +3 -3
- package/src/selection/selection.d.ts +22 -22
- package/src/selection/selection.js +25 -22
- package/styles/_all.scss +1 -1
- package/styles/bootstrap-dark.css +345 -99
- package/styles/bootstrap.css +353 -108
- package/styles/bootstrap4.css +337 -95
- package/styles/bootstrap5-dark.css +343 -96
- package/styles/bootstrap5.css +343 -96
- package/styles/fabric-dark.css +331 -89
- package/styles/fabric.css +332 -90
- package/styles/fluent-dark.css +342 -92
- package/styles/fluent.css +342 -92
- package/styles/highcontrast-light.css +331 -89
- package/styles/highcontrast.css +335 -90
- package/styles/material-dark.css +337 -90
- package/styles/material.css +337 -90
- package/styles/material3-dark.css +347 -99
- package/styles/material3-dark.scss +1 -1
- package/styles/material3.css +347 -99
- package/styles/material3.scss +1 -1
- package/styles/rich-text-editor/_all.scss +2 -2
- package/styles/rich-text-editor/_bds-definition.scss +279 -0
- package/styles/rich-text-editor/_bootstrap-dark-definition.scss +281 -277
- package/styles/rich-text-editor/_bootstrap-definition.scss +337 -334
- package/styles/rich-text-editor/_bootstrap4-definition.scss +464 -460
- package/styles/rich-text-editor/_bootstrap5-definition.scss +266 -262
- package/styles/rich-text-editor/_fabric-dark-definition.scss +263 -259
- package/styles/rich-text-editor/_fabric-definition.scss +261 -257
- package/styles/rich-text-editor/_fluent-definition.scss +267 -263
- package/styles/rich-text-editor/_fusionnew-definition.scss +265 -261
- package/styles/rich-text-editor/_highcontrast-definition.scss +261 -257
- package/styles/rich-text-editor/_highcontrast-light-definition.scss +261 -257
- package/styles/rich-text-editor/_layout.scss +2249 -2072
- package/styles/rich-text-editor/_material-dark-definition.scss +266 -262
- package/styles/rich-text-editor/_material-definition.scss +264 -260
- package/styles/rich-text-editor/_material3-definition.scss +266 -262
- package/styles/rich-text-editor/_tailwind-definition.scss +261 -257
- package/styles/rich-text-editor/_theme.scss +906 -837
- package/styles/rich-text-editor/bootstrap-dark.css +345 -99
- package/styles/rich-text-editor/bootstrap.css +353 -108
- package/styles/rich-text-editor/bootstrap4.css +337 -95
- package/styles/rich-text-editor/bootstrap5-dark.css +343 -96
- package/styles/rich-text-editor/bootstrap5.css +343 -96
- package/styles/rich-text-editor/fabric-dark.css +331 -89
- package/styles/rich-text-editor/fabric.css +332 -90
- package/styles/rich-text-editor/fluent-dark.css +342 -92
- package/styles/rich-text-editor/fluent.css +342 -92
- package/styles/rich-text-editor/highcontrast-light.css +331 -89
- package/styles/rich-text-editor/highcontrast.css +335 -90
- package/styles/rich-text-editor/icons/_bds.scss +348 -0
- package/styles/rich-text-editor/icons/_bootstrap-dark.scss +349 -349
- package/styles/rich-text-editor/icons/_bootstrap.scss +349 -349
- package/styles/rich-text-editor/icons/_bootstrap4.scss +349 -349
- package/styles/rich-text-editor/icons/_bootstrap5.scss +348 -348
- package/styles/rich-text-editor/icons/_fabric-dark.scss +349 -349
- package/styles/rich-text-editor/icons/_fabric.scss +349 -349
- package/styles/rich-text-editor/icons/_fluent.scss +348 -348
- package/styles/rich-text-editor/icons/_fusionnew.scss +348 -348
- package/styles/rich-text-editor/icons/_highcontrast-light.scss +349 -349
- package/styles/rich-text-editor/icons/_highcontrast.scss +349 -349
- package/styles/rich-text-editor/icons/_material-dark.scss +349 -349
- package/styles/rich-text-editor/icons/_material.scss +349 -349
- package/styles/rich-text-editor/icons/_material3.scss +348 -348
- package/styles/rich-text-editor/icons/_tailwind.scss +348 -348
- package/styles/rich-text-editor/material-dark.css +337 -90
- package/styles/rich-text-editor/material.css +337 -90
- package/styles/rich-text-editor/material3-dark.css +347 -99
- package/styles/rich-text-editor/material3-dark.scss +1 -1
- package/styles/rich-text-editor/material3.css +347 -99
- package/styles/rich-text-editor/material3.scss +1 -1
- package/styles/rich-text-editor/tailwind-dark.css +386 -116
- package/styles/rich-text-editor/tailwind.css +386 -116
- package/styles/tailwind-dark.css +386 -116
- package/styles/tailwind.css +386 -116
- package/.github/PULL_REQUEST_TEMPLATE/Bug.md +0 -41
- package/.github/PULL_REQUEST_TEMPLATE/Feature.md +0 -27
- package/dist/ej2-richtexteditor.min.js +0 -10
- package/dist/global/ej2-richtexteditor.min.js +0 -11
- package/dist/global/ej2-richtexteditor.min.js.map +0 -1
- package/dist/global/index.d.ts +0 -14
- package/tslint.json +0 -111
|
@@ -14,6 +14,7 @@ import { getTextNodesUnder, sanitizeHelper, getDefaultValue } from '../base/util
|
|
|
14
14
|
import { isIDevice } from '../../common/util';
|
|
15
15
|
import { XhtmlValidation } from './xhtml-validation';
|
|
16
16
|
import { ON_BEGIN } from './../../common/constant';
|
|
17
|
+
import * as CONSTANT from '../base/constant';
|
|
17
18
|
/**
|
|
18
19
|
* `HtmlEditor` module is used to HTML editor
|
|
19
20
|
*/
|
|
@@ -33,7 +34,7 @@ var HtmlEditor = /** @class */ (function () {
|
|
|
33
34
|
* @function destroy
|
|
34
35
|
* @returns {void}
|
|
35
36
|
* @hidden
|
|
36
|
-
|
|
37
|
+
* @deprecated
|
|
37
38
|
*/
|
|
38
39
|
HtmlEditor.prototype.destroy = function () {
|
|
39
40
|
this.removeEventListener();
|
|
@@ -42,7 +43,7 @@ var HtmlEditor = /** @class */ (function () {
|
|
|
42
43
|
* @param {string} value - specifies the string value
|
|
43
44
|
* @returns {void}
|
|
44
45
|
* @hidden
|
|
45
|
-
|
|
46
|
+
* @deprecated
|
|
46
47
|
*/
|
|
47
48
|
HtmlEditor.prototype.sanitizeHelper = function (value) {
|
|
48
49
|
value = sanitizeHelper(value, this.parent);
|
|
@@ -70,6 +71,7 @@ var HtmlEditor = /** @class */ (function () {
|
|
|
70
71
|
this.parent.on(events.readOnlyMode, this.updateReadOnly, this);
|
|
71
72
|
this.parent.on(events.paste, this.onPaste, this);
|
|
72
73
|
this.parent.on(events.tableclass, this.isTableClassAdded, this);
|
|
74
|
+
this.parent.on(events.onHandleFontsizeChange, this.onHandleFontsizeChange, this);
|
|
73
75
|
};
|
|
74
76
|
HtmlEditor.prototype.updateReadOnly = function () {
|
|
75
77
|
if (this.parent.readonly) {
|
|
@@ -88,7 +90,9 @@ var HtmlEditor = /** @class */ (function () {
|
|
|
88
90
|
};
|
|
89
91
|
HtmlEditor.prototype.onSelectionRestore = function (e) {
|
|
90
92
|
this.parent.isBlur = false;
|
|
91
|
-
this.
|
|
93
|
+
if (isNOU(this.saveSelection) || isNOU(closest(this.saveSelection.range.startContainer.parentElement, ".e-img-caption")) ? true : !(closest(this.saveSelection.range.startContainer.parentElement, ".e-img-caption").getAttribute("contenteditable") == "false")) {
|
|
94
|
+
this.contentRenderer.getEditPanel().focus();
|
|
95
|
+
}
|
|
92
96
|
if (isNullOrUndefined(e.items) || e.items) {
|
|
93
97
|
this.saveSelection.restore();
|
|
94
98
|
}
|
|
@@ -96,11 +100,91 @@ var HtmlEditor = /** @class */ (function () {
|
|
|
96
100
|
HtmlEditor.prototype.isTableClassAdded = function () {
|
|
97
101
|
var tableElement = this.parent.inputElement.querySelectorAll('table');
|
|
98
102
|
for (var i = 0; i < tableElement.length; i++) {
|
|
99
|
-
if (!tableElement[i].classList.contains('e-rte-table')) {
|
|
103
|
+
if (!tableElement[i].classList.contains('e-rte-table') && !tableElement[i].classList.contains('e-rte-paste-table')) {
|
|
100
104
|
tableElement[i].classList.add('e-rte-table');
|
|
101
105
|
}
|
|
102
106
|
}
|
|
103
107
|
};
|
|
108
|
+
HtmlEditor.prototype.onHandleFontsizeChange = function (e) {
|
|
109
|
+
var keyboardArgs = e.args;
|
|
110
|
+
var args = { name: 'dropDownSelect' };
|
|
111
|
+
args.item = {
|
|
112
|
+
command: 'Font',
|
|
113
|
+
subCommand: 'FontSize'
|
|
114
|
+
};
|
|
115
|
+
var items = this.parent.fontSize.items;
|
|
116
|
+
var activeElem;
|
|
117
|
+
if (this.parent.toolbarModule && this.parent.toolbarModule.dropDownModule &&
|
|
118
|
+
this.parent.toolbarModule.dropDownModule.fontSizeDropDown && !isNOU(this.parent.toolbarModule.dropDownModule.fontSizeDropDown.activeElem[0].textContent) && this.parent.toolbarModule.dropDownModule.fontSizeDropDown.activeElem[0].textContent !== '') {
|
|
119
|
+
activeElem = this.parent.toolbarModule.dropDownModule.fontSizeDropDown.activeElem[0].textContent;
|
|
120
|
+
}
|
|
121
|
+
else {
|
|
122
|
+
var fontSizeValue = void 0;
|
|
123
|
+
var selection = this.parent.contentModule.getDocument().getSelection();
|
|
124
|
+
if (selection && selection.focusNode && selection.focusNode.parentElement) {
|
|
125
|
+
fontSizeValue = document.defaultView.getComputedStyle(selection.focusNode.parentElement, null).getPropertyValue('font-size');
|
|
126
|
+
}
|
|
127
|
+
else {
|
|
128
|
+
fontSizeValue = this.parent.fontSize.width;
|
|
129
|
+
}
|
|
130
|
+
fontSizeValue = isNOU(fontSizeValue) ? this.parent.fontSize.width : fontSizeValue;
|
|
131
|
+
var actualTxtFontValues = fontSizeValue.match(/^([\d.]+)(\D+)$/);
|
|
132
|
+
var size_1 = parseInt(actualTxtFontValues[1], 10);
|
|
133
|
+
var unit = actualTxtFontValues[2];
|
|
134
|
+
var defaultFontValues = items[0].value.match(/^([\d.]+)(\D+)$/);
|
|
135
|
+
if (defaultFontValues[2] === unit) {
|
|
136
|
+
var index = items.findIndex(function (_a) {
|
|
137
|
+
var value = _a.value;
|
|
138
|
+
return parseInt(value, 10) >= size_1;
|
|
139
|
+
});
|
|
140
|
+
activeElem = items[index].text;
|
|
141
|
+
}
|
|
142
|
+
else {
|
|
143
|
+
var convertedSize_1 = this.convertFontSize(size_1, unit, defaultFontValues[2]);
|
|
144
|
+
var index = items.findIndex(function (_a) {
|
|
145
|
+
var value = _a.value;
|
|
146
|
+
return parseInt(value, 10) >= convertedSize_1;
|
|
147
|
+
});
|
|
148
|
+
activeElem = items[index].text;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
var fontIndex = items.findIndex(function (size) { return size.text === activeElem; });
|
|
152
|
+
if (keyboardArgs.action === 'increase-fontsize' && fontIndex !== -1) {
|
|
153
|
+
if (fontIndex >= items.length - 1) {
|
|
154
|
+
var fontValues = items[fontIndex].value.match(/^([\d.]+)(\D+)$/);
|
|
155
|
+
if (fontValues) {
|
|
156
|
+
var size = parseInt(fontValues[1], 10);
|
|
157
|
+
var unit = fontValues[2];
|
|
158
|
+
var roundedSize = size % 10 === 0 ? Math.ceil((size + 1) / 10) * 10 : Math.ceil(size / 10) * 10;
|
|
159
|
+
args.item.value = roundedSize.toLocaleString() + unit;
|
|
160
|
+
args.item.text = roundedSize.toLocaleString() + ' ' + unit;
|
|
161
|
+
}
|
|
162
|
+
this.parent.fontSize.items.push(args.item);
|
|
163
|
+
}
|
|
164
|
+
else {
|
|
165
|
+
args.item.value = items[fontIndex + 1].value;
|
|
166
|
+
args.item.text = items[fontIndex + 1].text;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
else if (keyboardArgs.action === 'decrease-fontsize' && fontIndex !== -1 && fontIndex > 0) {
|
|
170
|
+
args.item.value = items[fontIndex - 1].value;
|
|
171
|
+
args.item.text = items[fontIndex - 1].text;
|
|
172
|
+
}
|
|
173
|
+
else {
|
|
174
|
+
if (fontIndex >= 0 && fontIndex < items.length && items[fontIndex]) {
|
|
175
|
+
args.item.value = items[fontIndex].value;
|
|
176
|
+
args.item.text = items[fontIndex].text;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
this.parent.formatter.process(this.parent, args, keyboardArgs);
|
|
180
|
+
};
|
|
181
|
+
HtmlEditor.prototype.convertFontSize = function (value, originalUnit, targetUnit) {
|
|
182
|
+
if (CONSTANT.supportedUnits.indexOf(originalUnit) !== -1 || CONSTANT.supportedUnits.indexOf(targetUnit) !== -1) {
|
|
183
|
+
originalUnit = 'px';
|
|
184
|
+
}
|
|
185
|
+
var convertedValue = value * CONSTANT.conversionFactors[originalUnit][targetUnit];
|
|
186
|
+
return convertedValue;
|
|
187
|
+
};
|
|
104
188
|
HtmlEditor.prototype.onKeyUp = function (e) {
|
|
105
189
|
var args = e.args;
|
|
106
190
|
var restrictKeys = [8, 9, 13, 16, 17, 18, 20, 27, 37, 38, 39, 40, 44, 45, 46, 91,
|
|
@@ -108,9 +192,12 @@ var HtmlEditor = /** @class */ (function () {
|
|
|
108
192
|
var range = this.parent.getRange();
|
|
109
193
|
// eslint-disable-next-line
|
|
110
194
|
var regEx = new RegExp(String.fromCharCode(8203), 'g');
|
|
195
|
+
var isEmptyNode = range.startContainer === range.endContainer && range.startOffset === range.endOffset &&
|
|
196
|
+
range.startOffset === 1 && range.startContainer.textContent.length === 1 && range.startContainer.textContent.charCodeAt(0) == 8203 &&
|
|
197
|
+
range.startContainer.textContent.replace(regEx, '').length === 0;
|
|
111
198
|
var pointer;
|
|
112
199
|
var isRootParent = false;
|
|
113
|
-
if (restrictKeys.indexOf(args.keyCode) < 0 && !args.shiftKey && !args.ctrlKey && !args.altKey) {
|
|
200
|
+
if (restrictKeys.indexOf(args.keyCode) < 0 && !args.shiftKey && !args.ctrlKey && !args.altKey && !isEmptyNode) {
|
|
114
201
|
pointer = range.startOffset;
|
|
115
202
|
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
|
|
116
203
|
range.startContainer.nodeName === '#text' ? range.startContainer.parentElement !== this.parent.inputElement ? range.startContainer.parentElement.classList.add('currentStartMark')
|
|
@@ -222,7 +309,7 @@ var HtmlEditor = /** @class */ (function () {
|
|
|
222
309
|
e.args.keyCode === 13) {
|
|
223
310
|
this.spaceLink(e.args);
|
|
224
311
|
if (this.parent.editorMode === 'HTML' && !this.parent.readonly) {
|
|
225
|
-
var currentLength = this.parent.getText().trim().length;
|
|
312
|
+
var currentLength = this.parent.getText().trim().replace(/(\r\n|\n|\r|\t)/gm, '').replace(/\u200B/g, '').length;
|
|
226
313
|
var selectionLength = this.parent.getSelection().length;
|
|
227
314
|
var totalLength = (currentLength - selectionLength) + 1;
|
|
228
315
|
if (!(this.parent.maxLength === -1 || totalLength <= this.parent.maxLength) &&
|
|
@@ -232,6 +319,15 @@ var HtmlEditor = /** @class */ (function () {
|
|
|
232
319
|
}
|
|
233
320
|
else {
|
|
234
321
|
this.parent.notify(events.enterHandler, { args: e.args });
|
|
322
|
+
var newRange = this.parent.getRange();
|
|
323
|
+
if (!isNullOrUndefined(newRange.startContainer) && this.parent.height !== 'auto' && newRange.startContainer.nodeName !== '#text'
|
|
324
|
+
&& !this.parent.iframeSettings.enable && newRange.startContainer.getBoundingClientRect().bottom > this.parent.element.getBoundingClientRect().bottom) {
|
|
325
|
+
this.parent.element.querySelector('.e-rte-content').scrollTop += newRange.startContainer.getBoundingClientRect().bottom - this.parent.element.getBoundingClientRect().bottom;
|
|
326
|
+
}
|
|
327
|
+
else if (!isNullOrUndefined(newRange.startContainer) && this.parent.height === 'auto' && newRange.startContainer.nodeName !== '#text'
|
|
328
|
+
&& !this.parent.iframeSettings.enable && window.innerHeight < newRange.startContainer.getBoundingClientRect().top) {
|
|
329
|
+
newRange.startContainer.scrollIntoView({ block: 'end', inline: 'nearest' });
|
|
330
|
+
}
|
|
235
331
|
}
|
|
236
332
|
}
|
|
237
333
|
}
|
|
@@ -312,11 +408,13 @@ var HtmlEditor = /** @class */ (function () {
|
|
|
312
408
|
currentRange.startContainer.previousSibling.nodeName === 'SPAN') {
|
|
313
409
|
isPreviousNotContentEditable = currentRange.startContainer.previousSibling.contentEditable === 'false' ? false : true;
|
|
314
410
|
}
|
|
411
|
+
var checkNode = currentRange.startContainer.nodeName === '#text' ? currentRange.startContainer.parentElement : currentRange.startContainer;
|
|
412
|
+
var isSelectedPositionNotStart = closest(currentRange.startContainer.nodeName === '#text' ? currentRange.startContainer.parentElement : currentRange.startContainer, 'li') ?
|
|
413
|
+
checkNode.nodeName !== 'li' && isNOU(checkNode.previousSibling) : true;
|
|
315
414
|
if (e.args.code === 'Backspace' && e.args.keyCode === 8 && currentRange.startOffset === 0 &&
|
|
316
415
|
currentRange.endOffset === 0 && this.parent.getSelection().length === 0 && currentRange.startContainer.textContent.length > 0 &&
|
|
317
416
|
currentRange.startContainer.parentElement.tagName !== 'TD' && currentRange.startContainer.parentElement.tagName !== 'TH' &&
|
|
318
|
-
isPreviousNotContentEditable) {
|
|
319
|
-
var checkNode = currentRange.startContainer.nodeName === '#text' ? currentRange.startContainer.parentElement : currentRange.startContainer;
|
|
417
|
+
isPreviousNotContentEditable && isSelectedPositionNotStart) {
|
|
320
418
|
if ((!this.parent.formatter.editorManager.domNode.isBlockNode(checkNode) &&
|
|
321
419
|
!isNOU(checkNode.previousSibling) && checkNode.previousSibling.nodeName === 'BR') ||
|
|
322
420
|
(!isNOU(currentRange.startContainer.previousSibling) && currentRange.startContainer.previousSibling.nodeName === 'BR')) {
|
|
@@ -327,8 +425,9 @@ var HtmlEditor = /** @class */ (function () {
|
|
|
327
425
|
var liElement = this.getRangeLiNode(currentRange.startContainer);
|
|
328
426
|
if (liElement.previousElementSibling && liElement.previousElementSibling.childElementCount > 0) {
|
|
329
427
|
this.oldRangeElement = liElement.previousElementSibling.lastElementChild.nodeName === 'BR' ?
|
|
330
|
-
liElement.previousElementSibling : liElement.previousElementSibling.
|
|
331
|
-
if (!
|
|
428
|
+
liElement.previousElementSibling : liElement.previousElementSibling.lastChild;
|
|
429
|
+
if (!isNOU(liElement.lastElementChild) && liElement.lastElementChild.nodeName !== 'BR' &&
|
|
430
|
+
isNOU(liElement.lastElementChild.previousSibling) && liElement.lastChild.nodeName !== "#text") {
|
|
332
431
|
this.rangeElement = liElement.lastElementChild;
|
|
333
432
|
isLiElement = true;
|
|
334
433
|
}
|
|
@@ -338,13 +437,13 @@ var HtmlEditor = /** @class */ (function () {
|
|
|
338
437
|
}
|
|
339
438
|
}
|
|
340
439
|
else if (this.rangeElement === this.parent.inputElement || this.rangeElement.tagName === 'TABLE' ||
|
|
341
|
-
(!
|
|
440
|
+
(!isNOU(this.rangeElement.previousElementSibling) && this.rangeElement.previousElementSibling.tagName === 'TABLE')) {
|
|
342
441
|
return;
|
|
343
442
|
}
|
|
344
443
|
else {
|
|
345
444
|
this.oldRangeElement = this.rangeElement.previousElementSibling;
|
|
346
445
|
}
|
|
347
|
-
if (
|
|
446
|
+
if (isNOU(this.oldRangeElement)) {
|
|
348
447
|
return;
|
|
349
448
|
}
|
|
350
449
|
else {
|
|
@@ -353,7 +452,7 @@ var HtmlEditor = /** @class */ (function () {
|
|
|
353
452
|
? this.oldRangeElement.lastElementChild.lastElementChild :
|
|
354
453
|
this.oldRangeElement.lastElementChild;
|
|
355
454
|
}
|
|
356
|
-
var lastNode = this.oldRangeElement.lastChild;
|
|
455
|
+
var lastNode = this.oldRangeElement.lastChild ? this.oldRangeElement.lastChild : this.oldRangeElement;
|
|
357
456
|
while (lastNode.nodeType !== 3 && lastNode.nodeName !== '#text' &&
|
|
358
457
|
lastNode.nodeName !== 'BR') {
|
|
359
458
|
lastNode = lastNode.lastChild;
|
|
@@ -361,12 +460,17 @@ var HtmlEditor = /** @class */ (function () {
|
|
|
361
460
|
this.parent.formatter.editorManager.nodeSelection.setCursorPoint(this.parent.contentModule.getDocument(),
|
|
362
461
|
// eslint-disable-next-line
|
|
363
462
|
lastNode, lastNode.textContent.length);
|
|
364
|
-
if (this.oldRangeElement.querySelectorAll('BR').length === 1) {
|
|
463
|
+
if (this.oldRangeElement.nodeName !== '#text' && this.oldRangeElement.querySelectorAll('BR').length === 1) {
|
|
365
464
|
detach(this.oldRangeElement.querySelector('BR'));
|
|
366
465
|
}
|
|
367
|
-
if (!
|
|
466
|
+
if (!isNOU(this.rangeElement) && this.oldRangeElement !== this.rangeElement) {
|
|
368
467
|
while (this.rangeElement.firstChild) {
|
|
369
|
-
this.oldRangeElement.
|
|
468
|
+
if (this.oldRangeElement.nodeName === '#text') {
|
|
469
|
+
this.oldRangeElement.parentElement.appendChild(this.rangeElement.childNodes[0]);
|
|
470
|
+
}
|
|
471
|
+
else {
|
|
472
|
+
this.oldRangeElement.appendChild(this.rangeElement.childNodes[0]);
|
|
473
|
+
}
|
|
370
474
|
}
|
|
371
475
|
// eslint-disable-next-line
|
|
372
476
|
!isLiElement ? detach(this.rangeElement) : detach(this.rangeElement.parentElement);
|
|
@@ -380,7 +484,7 @@ var HtmlEditor = /** @class */ (function () {
|
|
|
380
484
|
var liElement;
|
|
381
485
|
var rootElement;
|
|
382
486
|
if (e.args.code === 'Delete' && e.args.keyCode === 46 &&
|
|
383
|
-
this.parent.contentModule.getText().trim().length !== 0 && this.parent.getSelection().length === 0 && currentRange.startContainer.parentElement.tagName !== 'TD' &&
|
|
487
|
+
this.parent.contentModule.getText().trim().replace(/(\r\n|\n|\r|\t)/gm, '').replace(/\u200B/g, '').length !== 0 && this.parent.getSelection().length === 0 && currentRange.startContainer.parentElement.tagName !== 'TD' &&
|
|
384
488
|
currentRange.startContainer.parentElement.tagName !== 'TH') {
|
|
385
489
|
this.deleteRangeElement = rootElement = this.getRootBlockNode(currentRange.startContainer);
|
|
386
490
|
if (this.deleteRangeElement.tagName === 'OL' || this.deleteRangeElement.tagName === 'UL') {
|
|
@@ -403,7 +507,11 @@ var HtmlEditor = /** @class */ (function () {
|
|
|
403
507
|
(!isNullOrUndefined(this.deleteRangeElement.nextElementSibling) && this.deleteRangeElement.nextElementSibling.tagName === 'TABLE'))) {
|
|
404
508
|
return;
|
|
405
509
|
}
|
|
406
|
-
|
|
510
|
+
var isImgWithEmptyBlockNode = false;
|
|
511
|
+
if (this.deleteRangeElement.querySelectorAll('img').length > 0 && this.deleteRangeElement.textContent.trim() === '') {
|
|
512
|
+
isImgWithEmptyBlockNode = true;
|
|
513
|
+
}
|
|
514
|
+
if (this.getCaretIndex(currentRange, this.deleteRangeElement) === this.deleteRangeElement.textContent.length && !isImgWithEmptyBlockNode) {
|
|
407
515
|
if (!isNullOrUndefined(liElement)) {
|
|
408
516
|
if (isLiElement || !isNullOrUndefined(liElement.nextElementSibling)) {
|
|
409
517
|
this.deleteOldRangeElement = this.getRangeElement(liElement.nextElementSibling);
|
|
@@ -428,8 +536,13 @@ var HtmlEditor = /** @class */ (function () {
|
|
|
428
536
|
this.parent.formatter.editorManager.nodeSelection.setCursorPoint(this.parent.contentModule.getDocument(), this.deleteRangeElement, this.deleteRangeElement.childNodes.length);
|
|
429
537
|
this.isImageDelete = false;
|
|
430
538
|
}
|
|
431
|
-
|
|
432
|
-
|
|
539
|
+
var brNode = this.deleteRangeElement.querySelector('BR');
|
|
540
|
+
if (brNode && brNode.classList.contains('e-rte-image-remove-focus')) {
|
|
541
|
+
removeClass([brNode], ['e-rte-image-focus']);
|
|
542
|
+
return;
|
|
543
|
+
}
|
|
544
|
+
else if (brNode) {
|
|
545
|
+
detach(brNode);
|
|
433
546
|
}
|
|
434
547
|
if (!isNullOrUndefined(this.deleteRangeElement) && (this.deleteOldRangeElement.tagName !== 'OL' && this.deleteOldRangeElement.tagName !== 'UL')
|
|
435
548
|
&& this.deleteOldRangeElement !== this.deleteRangeElement) {
|
|
@@ -545,7 +658,7 @@ var HtmlEditor = /** @class */ (function () {
|
|
|
545
658
|
for (var j = 0; j < splitTextContent.length; j++) {
|
|
546
659
|
if (splitTextContent[j].match(httpRegex) || splitTextContent[j].match(wwwRegex)) {
|
|
547
660
|
resultSplitContent += '<a class="e-rte-anchor" href="' + splitTextContent[j] +
|
|
548
|
-
'" title="' + splitTextContent[j] + '"target="_blank">' + splitTextContent[j] + ' </a>';
|
|
661
|
+
'" title="' + splitTextContent[j] + '" target="_blank"' + ' aria-label="' + this.parent.serviceLocator.getService('rteLocale').getConstant("linkAriaLabel") + '">' + splitTextContent[j] + ' </a>';
|
|
549
662
|
}
|
|
550
663
|
else {
|
|
551
664
|
resultSplitContent += splitTextContent[j] + ' ';
|
|
@@ -597,6 +710,8 @@ var HtmlEditor = /** @class */ (function () {
|
|
|
597
710
|
var selectParentEle;
|
|
598
711
|
var item = args.item;
|
|
599
712
|
var closestElement = closest(args.originalEvent.target, '.e-rte-quick-popup');
|
|
713
|
+
var target = args.originalEvent.target;
|
|
714
|
+
this.parent.notify(events.closeTooltip, { target: target });
|
|
600
715
|
if (item.command !== 'FormatPainter') {
|
|
601
716
|
if (closestElement && !closestElement.classList.contains('e-rte-inline-popup') && !closestElement.classList.contains('e-rte-text-popup')) {
|
|
602
717
|
if (!(item.subCommand === 'SourceCode' || item.subCommand === 'Preview' ||
|
|
@@ -796,7 +911,7 @@ var HtmlEditor = /** @class */ (function () {
|
|
|
796
911
|
* @param {RichTextEditorModel} e - specifies the editor model
|
|
797
912
|
* @returns {void}
|
|
798
913
|
* @hidden
|
|
799
|
-
|
|
914
|
+
* @deprecated
|
|
800
915
|
*/
|
|
801
916
|
HtmlEditor.prototype.onPropertyChanged = function (e) {
|
|
802
917
|
// On property code change here
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Property, NotifyPropertyChanges, INotifyPropertyChanged, Event } from '@syncfusion/ej2-base';
|
|
1
|
+
import { Property, NotifyPropertyChanges, INotifyPropertyChanged, Event } from '@syncfusion/ej2-base';
|
|
2
2
|
import {KeyboardEventArgs} from "./keyboard";
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -7,24 +7,24 @@ import {KeyboardEventArgs} from "./keyboard";
|
|
|
7
7
|
export interface KeyboardEventsModel {
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
|
-
* Specifies key combination and it respective action name.
|
|
11
|
-
*
|
|
12
|
-
* @default null
|
|
13
|
-
*/
|
|
14
|
-
keyConfigs?: { [key: string]: string };
|
|
10
|
+
* Specifies key combination and it respective action name.
|
|
11
|
+
*
|
|
12
|
+
* @default null
|
|
13
|
+
*/
|
|
14
|
+
keyConfigs?: { [key: string]: string };
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
|
-
* Specifies on which event keyboardEvents class should listen for key press. For ex., `keyup`, `keydown` or `keypress`
|
|
18
|
-
*
|
|
19
|
-
* @default 'keyup'
|
|
20
|
-
*/
|
|
21
|
-
eventName?: string;
|
|
17
|
+
* Specifies on which event keyboardEvents class should listen for key press. For ex., `keyup`, `keydown` or `keypress`
|
|
18
|
+
*
|
|
19
|
+
* @default 'keyup'
|
|
20
|
+
*/
|
|
21
|
+
eventName?: string;
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
|
-
* Specifies the listener when keyboard actions is performed.
|
|
25
|
-
*
|
|
26
|
-
* @event 'keyAction'
|
|
27
|
-
*/
|
|
28
|
-
keyAction?: EmitType<KeyboardEventArgs>;
|
|
24
|
+
* Specifies the listener when keyboard actions is performed.
|
|
25
|
+
*
|
|
26
|
+
* @event 'keyAction'
|
|
27
|
+
*/
|
|
28
|
+
keyAction?: EmitType<KeyboardEventArgs>;
|
|
29
29
|
|
|
30
30
|
}
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
var __extends = (this && this.__extends) || (function () {
|
|
2
|
-
var extendStatics = function (d, b) {
|
|
3
|
-
extendStatics = Object.setPrototypeOf ||
|
|
4
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
6
|
-
return extendStatics(d, b);
|
|
7
|
-
};
|
|
8
|
-
return function (d, b) {
|
|
9
|
-
extendStatics(d, b);
|
|
10
|
-
function __() { this.constructor = d; }
|
|
11
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
12
|
-
};
|
|
13
|
-
})();
|
|
14
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
15
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
16
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
17
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
18
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
19
|
-
};
|
|
1
|
+
var __extends = (this && this.__extends) || (function () {
|
|
2
|
+
var extendStatics = function (d, b) {
|
|
3
|
+
extendStatics = Object.setPrototypeOf ||
|
|
4
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
6
|
+
return extendStatics(d, b);
|
|
7
|
+
};
|
|
8
|
+
return function (d, b) {
|
|
9
|
+
extendStatics(d, b);
|
|
10
|
+
function __() { this.constructor = d; }
|
|
11
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
12
|
+
};
|
|
13
|
+
})();
|
|
14
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
15
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
16
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
17
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
18
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
19
|
+
};
|
|
20
20
|
import { Property, NotifyPropertyChanges, Event } from '@syncfusion/ej2-base';
|
|
21
21
|
import { Base } from '@syncfusion/ej2-base';
|
|
22
22
|
var keyCode = {
|
|
@@ -65,7 +65,9 @@ var keyCode = {
|
|
|
65
65
|
'singlequote': 222,
|
|
66
66
|
']': 221,
|
|
67
67
|
'[': 219,
|
|
68
|
-
'=': 187
|
|
68
|
+
'=': 187,
|
|
69
|
+
'<': 188,
|
|
70
|
+
'>': 190
|
|
69
71
|
};
|
|
70
72
|
/**
|
|
71
73
|
* KeyboardEvents class enables you to bind key action desired key combinations for ex., Ctrl+A, Delete, Alt+Space etc.
|
|
@@ -84,7 +86,7 @@ var keyCode = {
|
|
|
84
86
|
* ```
|
|
85
87
|
*
|
|
86
88
|
* @hidden
|
|
87
|
-
|
|
89
|
+
* @deprecated
|
|
88
90
|
*/
|
|
89
91
|
var KeyboardEvents = /** @class */ (function (_super) {
|
|
90
92
|
__extends(KeyboardEvents, _super);
|
|
@@ -19,7 +19,7 @@ export declare class MarkdownEditor {
|
|
|
19
19
|
* @function destroy
|
|
20
20
|
* @returns {void}
|
|
21
21
|
* @hidden
|
|
22
|
-
|
|
22
|
+
* @deprecated
|
|
23
23
|
*/
|
|
24
24
|
destroy(): void;
|
|
25
25
|
private moduleDestroy;
|
|
@@ -37,7 +37,7 @@ export declare class MarkdownEditor {
|
|
|
37
37
|
* @param {RichTextEditorModel} e - specifies the editor model
|
|
38
38
|
* @returns {void}
|
|
39
39
|
* @hidden
|
|
40
|
-
|
|
40
|
+
* @deprecated
|
|
41
41
|
*/
|
|
42
42
|
protected onPropertyChanged(e: {
|
|
43
43
|
[key: string]: RichTextEditorModel;
|
|
@@ -22,7 +22,7 @@ var MarkdownEditor = /** @class */ (function () {
|
|
|
22
22
|
* @function destroy
|
|
23
23
|
* @returns {void}
|
|
24
24
|
* @hidden
|
|
25
|
-
|
|
25
|
+
* @deprecated
|
|
26
26
|
*/
|
|
27
27
|
MarkdownEditor.prototype.destroy = function () {
|
|
28
28
|
if (isNullOrUndefined(this.parent)) {
|
|
@@ -74,7 +74,9 @@ var MarkdownEditor = /** @class */ (function () {
|
|
|
74
74
|
MarkdownEditor.prototype.onToolbarClick = function (args) {
|
|
75
75
|
var item = args.item;
|
|
76
76
|
var textArea = this.parent.contentModule.getEditPanel();
|
|
77
|
-
|
|
77
|
+
if (item.command !== 'Formats') {
|
|
78
|
+
textArea.focus();
|
|
79
|
+
}
|
|
78
80
|
var startOffset = textArea.selectionStart;
|
|
79
81
|
var endOffset = textArea.selectionEnd;
|
|
80
82
|
var text = textArea.value.substring(startOffset, endOffset);
|
|
@@ -147,7 +149,7 @@ var MarkdownEditor = /** @class */ (function () {
|
|
|
147
149
|
* @param {RichTextEditorModel} e - specifies the editor model
|
|
148
150
|
* @returns {void}
|
|
149
151
|
* @hidden
|
|
150
|
-
|
|
152
|
+
* @deprecated
|
|
151
153
|
*/
|
|
152
154
|
MarkdownEditor.prototype.onPropertyChanged = function (e) {
|
|
153
155
|
// On property code change here
|
|
@@ -46,7 +46,7 @@ export declare class PasteCleanup {
|
|
|
46
46
|
* @param {Element []} imgElement - specifies the array elements.
|
|
47
47
|
* @returns {void}
|
|
48
48
|
* @hidden
|
|
49
|
-
|
|
49
|
+
* @deprecated
|
|
50
50
|
*/
|
|
51
51
|
private imageFormatting;
|
|
52
52
|
private radioRender;
|
|
@@ -55,6 +55,7 @@ export declare class PasteCleanup {
|
|
|
55
55
|
private updateCss;
|
|
56
56
|
private setCssClass;
|
|
57
57
|
private destroyDialog;
|
|
58
|
+
private docClick;
|
|
58
59
|
private cleanAppleClass;
|
|
59
60
|
private formatting;
|
|
60
61
|
private cropImageHandler;
|
|
@@ -64,6 +65,8 @@ export declare class PasteCleanup {
|
|
|
64
65
|
private removeTempClass;
|
|
65
66
|
private sanitizeHelper;
|
|
66
67
|
private plainFormatting;
|
|
68
|
+
private removingComments;
|
|
69
|
+
private reframeToBrContent;
|
|
67
70
|
private getTextContent;
|
|
68
71
|
private detachInlineElements;
|
|
69
72
|
private findDetachEmptyElem;
|
|
@@ -73,6 +76,8 @@ export declare class PasteCleanup {
|
|
|
73
76
|
private deniedTags;
|
|
74
77
|
private deniedAttributes;
|
|
75
78
|
private allowedStyle;
|
|
79
|
+
private findLastElement;
|
|
80
|
+
private processPictureElement;
|
|
76
81
|
/**
|
|
77
82
|
* For internal use only - Get the module name.
|
|
78
83
|
*
|