@syncfusion/ej2-richtexteditor 27.1.55 → 27.1.57-643705
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/.eslintignore +4 -4
- package/.eslintrc.json +260 -260
- 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 +985 -738
- package/dist/es6/ej2-richtexteditor.es2015.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es5.js +601 -352
- package/dist/es6/ej2-richtexteditor.es5.js.map +1 -1
- package/ej2-richtexteditor-component.sln +30 -0
- package/helpers/e2e/index.js +3 -3
- package/helpers/e2e/rte-helper.js +13 -13
- package/license +9 -9
- package/package.json +85 -85
- package/src/common/config.d.ts +7 -0
- package/src/common/config.js +12 -0
- package/src/common/interface.d.ts +10 -8
- package/src/common/util.js +2 -1
- 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 +4 -0
- package/src/editor-manager/base/constant.js +4 -0
- package/src/editor-manager/base/editor-manager.d.ts +3 -3
- package/src/editor-manager/base/editor-manager.js +3 -3
- package/src/editor-manager/base/enum.d.ts +2 -2
- package/src/editor-manager/base/interface.d.ts +9 -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 +3 -3
- 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 +36 -36
- package/src/editor-manager/plugin/dom-node.js +36 -36
- package/src/editor-manager/plugin/format-painter-actions.d.ts +1 -1
- package/src/editor-manager/plugin/format-painter-actions.js +1 -1
- package/src/editor-manager/plugin/formats.d.ts +3 -2
- package/src/editor-manager/plugin/formats.js +27 -2
- package/src/editor-manager/plugin/image.d.ts +3 -3
- package/src/editor-manager/plugin/image.js +11 -5
- 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 +4 -2
- package/src/editor-manager/plugin/inserthtml.js +98 -19
- package/src/editor-manager/plugin/isformatted.d.ts +9 -9
- package/src/editor-manager/plugin/isformatted.js +9 -9
- package/src/editor-manager/plugin/link.d.ts +2 -2
- package/src/editor-manager/plugin/link.js +2 -2
- package/src/editor-manager/plugin/lists.d.ts +2 -2
- package/src/editor-manager/plugin/lists.js +2 -2
- package/src/editor-manager/plugin/ms-word-clean-up.d.ts +2 -1
- package/src/editor-manager/plugin/ms-word-clean-up.js +17 -1
- 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 +1 -1
- package/src/editor-manager/plugin/selection-commands.js +1 -1
- 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 -2
- package/src/editor-manager/plugin/table.js +2 -2
- package/src/editor-manager/plugin/toolbar-status.d.ts +2 -2
- package/src/editor-manager/plugin/toolbar-status.js +2 -2
- package/src/editor-manager/plugin/undo.d.ts +6 -6
- package/src/editor-manager/plugin/undo.js +6 -6
- 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 +9 -9
- package/src/rich-text-editor/actions/base-quick-toolbar.js +9 -9
- package/src/rich-text-editor/actions/base-toolbar.d.ts +3 -3
- package/src/rich-text-editor/actions/base-toolbar.js +3 -3
- package/src/rich-text-editor/actions/color-picker.d.ts +2 -2
- package/src/rich-text-editor/actions/color-picker.js +2 -2
- package/src/rich-text-editor/actions/count.d.ts +3 -3
- package/src/rich-text-editor/actions/count.js +3 -3
- package/src/rich-text-editor/actions/dropdown-buttons.d.ts +2 -2
- package/src/rich-text-editor/actions/dropdown-buttons.js +2 -2
- package/src/rich-text-editor/actions/emoji-picker.d.ts +1 -1
- package/src/rich-text-editor/actions/emoji-picker.js +1 -1
- package/src/rich-text-editor/actions/full-screen.d.ts +3 -3
- package/src/rich-text-editor/actions/full-screen.js +3 -3
- package/src/rich-text-editor/actions/html-editor.d.ts +3 -3
- package/src/rich-text-editor/actions/html-editor.js +12 -4
- 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 +20 -20
- package/src/rich-text-editor/actions/markdown-editor.d.ts +2 -2
- package/src/rich-text-editor/actions/markdown-editor.js +2 -2
- package/src/rich-text-editor/actions/paste-clean-up.d.ts +1 -1
- package/src/rich-text-editor/actions/paste-clean-up.js +49 -22
- package/src/rich-text-editor/actions/quick-toolbar.d.ts +9 -9
- package/src/rich-text-editor/actions/quick-toolbar.js +9 -9
- package/src/rich-text-editor/actions/resize.js +4 -0
- package/src/rich-text-editor/actions/toolbar.d.ts +13 -13
- package/src/rich-text-editor/actions/toolbar.js +13 -13
- 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 +158 -158
- package/src/rich-text-editor/base/constant.js +158 -158
- 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 +51 -51
- package/src/rich-text-editor/base/interface.js +1 -1
- package/src/rich-text-editor/base/rich-text-editor-model.d.ts +958 -958
- package/src/rich-text-editor/base/rich-text-editor.d.ts +62 -62
- package/src/rich-text-editor/base/rich-text-editor.js +68 -65
- package/src/rich-text-editor/base/util.d.ts +1 -1
- package/src/rich-text-editor/base/util.js +1 -1
- package/src/rich-text-editor/formatter/formatter.d.ts +8 -8
- package/src/rich-text-editor/formatter/formatter.js +8 -8
- 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/iframe-settings-model.d.ts +38 -38
- 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/slash-menu-settings-model.d.ts +25 -25
- package/src/rich-text-editor/models/slash-menu-settings.js +19 -19
- package/src/rich-text-editor/models/toolbar-settings-model.d.ts +807 -807
- package/src/rich-text-editor/models/toolbar-settings.js +19 -19
- package/src/rich-text-editor/renderer/audio-module.d.ts +1 -1
- package/src/rich-text-editor/renderer/audio-module.js +8 -2
- 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 +2 -2
- package/src/rich-text-editor/renderer/dialog-renderer.js +2 -2
- package/src/rich-text-editor/renderer/iframe-content-renderer.d.ts +4 -4
- package/src/rich-text-editor/renderer/iframe-content-renderer.js +17 -17
- package/src/rich-text-editor/renderer/image-module.d.ts +1 -1
- package/src/rich-text-editor/renderer/image-module.js +58 -21
- package/src/rich-text-editor/renderer/link-module.d.ts +1 -1
- package/src/rich-text-editor/renderer/link-module.js +4 -1
- 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/slash-menu.js +9 -0
- package/src/rich-text-editor/renderer/table-module.d.ts +1 -1
- package/src/rich-text-editor/renderer/table-module.js +5 -4
- package/src/rich-text-editor/renderer/toolbar-renderer.d.ts +9 -9
- package/src/rich-text-editor/renderer/toolbar-renderer.js +9 -9
- package/src/rich-text-editor/renderer/video-module.d.ts +1 -1
- package/src/rich-text-editor/renderer/video-module.js +8 -2
- package/src/rich-text-editor/renderer/view-source.d.ts +5 -5
- package/src/rich-text-editor/renderer/view-source.js +5 -5
- 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 +24 -23
- package/src/selection/selection.js +37 -34
- package/styles/_all.scss +1 -1
- package/styles/material3-dark.scss +1 -1
- package/styles/material3.scss +1 -1
- package/styles/rich-text-editor/_all.scss +2 -2
- package/styles/rich-text-editor/_bds-definition.scss +290 -290
- package/styles/rich-text-editor/_bigger.scss +610 -610
- package/styles/rich-text-editor/_bootstrap-dark-definition.scss +291 -291
- package/styles/rich-text-editor/_bootstrap-definition.scss +349 -349
- package/styles/rich-text-editor/_bootstrap4-definition.scss +476 -476
- package/styles/rich-text-editor/_bootstrap5-definition.scss +278 -278
- package/styles/rich-text-editor/_bootstrap5.3-definition.scss +278 -278
- package/styles/rich-text-editor/_fabric-dark-definition.scss +275 -275
- package/styles/rich-text-editor/_fabric-definition.scss +273 -273
- package/styles/rich-text-editor/_fluent-definition.scss +279 -279
- package/styles/rich-text-editor/_fluent2-definition.scss +287 -287
- package/styles/rich-text-editor/_fusionnew-definition.scss +276 -276
- package/styles/rich-text-editor/_highcontrast-definition.scss +274 -274
- package/styles/rich-text-editor/_highcontrast-light-definition.scss +273 -273
- package/styles/rich-text-editor/_layout.scss +2180 -2180
- package/styles/rich-text-editor/_material-dark-definition.scss +278 -278
- package/styles/rich-text-editor/_material-definition.scss +276 -276
- package/styles/rich-text-editor/_material3-definition.scss +278 -278
- package/styles/rich-text-editor/_tailwind-definition.scss +273 -273
- package/styles/rich-text-editor/_theme.scss +844 -844
- package/styles/rich-text-editor/icons/_bds.scss +372 -372
- package/styles/rich-text-editor/icons/_bootstrap-dark.scss +373 -373
- package/styles/rich-text-editor/icons/_bootstrap.scss +373 -373
- package/styles/rich-text-editor/icons/_bootstrap4.scss +373 -373
- package/styles/rich-text-editor/icons/_bootstrap5.3.scss +372 -372
- package/styles/rich-text-editor/icons/_bootstrap5.scss +372 -372
- package/styles/rich-text-editor/icons/_fabric-dark.scss +373 -373
- package/styles/rich-text-editor/icons/_fabric.scss +373 -373
- package/styles/rich-text-editor/icons/_fluent.scss +372 -372
- package/styles/rich-text-editor/icons/_fluent2.scss +369 -369
- package/styles/rich-text-editor/icons/_fusionnew.scss +357 -357
- package/styles/rich-text-editor/icons/_highcontrast-light.scss +361 -361
- package/styles/rich-text-editor/icons/_highcontrast.scss +373 -373
- package/styles/rich-text-editor/icons/_material-dark.scss +373 -373
- package/styles/rich-text-editor/icons/_material.scss +373 -373
- package/styles/rich-text-editor/icons/_material3.scss +372 -372
- package/styles/rich-text-editor/icons/_tailwind.scss +372 -372
- package/styles/rich-text-editor/material3-dark.scss +1 -1
- package/styles/rich-text-editor/material3.scss +1 -1
- 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
|
@@ -13,7 +13,7 @@ export declare class FullScreen {
|
|
|
13
13
|
* @param {MouseEvent} event - specifies the mouse event
|
|
14
14
|
* @returns {void}
|
|
15
15
|
* @hidden
|
|
16
|
-
|
|
16
|
+
* @deprecated
|
|
17
17
|
*/
|
|
18
18
|
showFullScreen(event?: MouseEvent | KeyboardEventArgs): void;
|
|
19
19
|
/**
|
|
@@ -22,7 +22,7 @@ export declare class FullScreen {
|
|
|
22
22
|
* @param {MouseEvent} event - specifies the mouse event
|
|
23
23
|
* @returns {void}
|
|
24
24
|
* @hidden
|
|
25
|
-
|
|
25
|
+
* @deprecated
|
|
26
26
|
*/
|
|
27
27
|
hideFullScreen(event?: MouseEvent | KeyboardEventArgs): void;
|
|
28
28
|
private toggleParentOverflow;
|
|
@@ -34,7 +34,7 @@ export declare class FullScreen {
|
|
|
34
34
|
*
|
|
35
35
|
* @returns {void}
|
|
36
36
|
* @hidden
|
|
37
|
-
|
|
37
|
+
* @deprecated
|
|
38
38
|
*/
|
|
39
39
|
destroy(): void;
|
|
40
40
|
}
|
|
@@ -17,7 +17,7 @@ var FullScreen = /** @class */ (function () {
|
|
|
17
17
|
* @param {MouseEvent} event - specifies the mouse event
|
|
18
18
|
* @returns {void}
|
|
19
19
|
* @hidden
|
|
20
|
-
|
|
20
|
+
* @deprecated
|
|
21
21
|
*/
|
|
22
22
|
FullScreen.prototype.showFullScreen = function (event) {
|
|
23
23
|
var _this = this;
|
|
@@ -70,7 +70,7 @@ var FullScreen = /** @class */ (function () {
|
|
|
70
70
|
* @param {MouseEvent} event - specifies the mouse event
|
|
71
71
|
* @returns {void}
|
|
72
72
|
* @hidden
|
|
73
|
-
|
|
73
|
+
* @deprecated
|
|
74
74
|
*/
|
|
75
75
|
FullScreen.prototype.hideFullScreen = function (event) {
|
|
76
76
|
var _this = this;
|
|
@@ -156,7 +156,7 @@ var FullScreen = /** @class */ (function () {
|
|
|
156
156
|
*
|
|
157
157
|
* @returns {void}
|
|
158
158
|
* @hidden
|
|
159
|
-
|
|
159
|
+
* @deprecated
|
|
160
160
|
*/
|
|
161
161
|
FullScreen.prototype.destroy = function () {
|
|
162
162
|
if (isNOU(this.parent)) {
|
|
@@ -30,14 +30,14 @@ export declare class HtmlEditor {
|
|
|
30
30
|
* @function destroy
|
|
31
31
|
* @returns {void}
|
|
32
32
|
* @hidden
|
|
33
|
-
|
|
33
|
+
* @deprecated
|
|
34
34
|
*/
|
|
35
35
|
destroy(): void;
|
|
36
36
|
/**
|
|
37
37
|
* @param {string} value - specifies the string value
|
|
38
38
|
* @returns {void}
|
|
39
39
|
* @hidden
|
|
40
|
-
|
|
40
|
+
* @deprecated
|
|
41
41
|
*/
|
|
42
42
|
sanitizeHelper(value: string): string;
|
|
43
43
|
private addEventListener;
|
|
@@ -70,7 +70,7 @@ export declare class HtmlEditor {
|
|
|
70
70
|
* @param {RichTextEditorModel} e - specifies the editor model
|
|
71
71
|
* @returns {void}
|
|
72
72
|
* @hidden
|
|
73
|
-
|
|
73
|
+
* @deprecated
|
|
74
74
|
*/
|
|
75
75
|
protected onPropertyChanged(e: {
|
|
76
76
|
[key: string]: RichTextEditorModel;
|
|
@@ -35,7 +35,7 @@ var HtmlEditor = /** @class */ (function () {
|
|
|
35
35
|
* @function destroy
|
|
36
36
|
* @returns {void}
|
|
37
37
|
* @hidden
|
|
38
|
-
|
|
38
|
+
* @deprecated
|
|
39
39
|
*/
|
|
40
40
|
HtmlEditor.prototype.destroy = function () {
|
|
41
41
|
if (this.isDestroyed) {
|
|
@@ -79,7 +79,7 @@ var HtmlEditor = /** @class */ (function () {
|
|
|
79
79
|
* @param {string} value - specifies the string value
|
|
80
80
|
* @returns {void}
|
|
81
81
|
* @hidden
|
|
82
|
-
|
|
82
|
+
* @deprecated
|
|
83
83
|
*/
|
|
84
84
|
HtmlEditor.prototype.sanitizeHelper = function (value) {
|
|
85
85
|
value = sanitizeHelper(value, this.parent);
|
|
@@ -131,7 +131,11 @@ var HtmlEditor = /** @class */ (function () {
|
|
|
131
131
|
HtmlEditor.prototype.isTableClassAdded = function () {
|
|
132
132
|
var tableElement = this.parent.inputElement.querySelectorAll('table');
|
|
133
133
|
for (var i = 0; i < tableElement.length; i++) {
|
|
134
|
-
|
|
134
|
+
// e-rte-table class is added to the table element for styling.
|
|
135
|
+
// e-rte-paste-table class is added for pasted table element from MS Word and other sources such as Web will not have any styles.
|
|
136
|
+
// e-rte-custom-table class is added for custom table element will not have any styles.
|
|
137
|
+
if (!tableElement[i].classList.contains('e-rte-table') && !tableElement[i].classList.contains('e-rte-paste-table')
|
|
138
|
+
&& !tableElement[i].classList.contains('e-rte-custom-table')) {
|
|
135
139
|
tableElement[i].classList.add('e-rte-table');
|
|
136
140
|
}
|
|
137
141
|
}
|
|
@@ -651,12 +655,16 @@ var HtmlEditor = /** @class */ (function () {
|
|
|
651
655
|
}
|
|
652
656
|
var brNode = this.deleteRangeElement.querySelector('BR');
|
|
653
657
|
var brLastChildNode = this.deleteRangeElement.lastChild;
|
|
658
|
+
var brParentNode = brLastChildNode.parentNode;
|
|
654
659
|
if (brNode && brNode.classList.contains('e-rte-image-remove-focus')) {
|
|
655
660
|
removeClass([brNode], ['e-rte-image-focus']);
|
|
656
661
|
return;
|
|
657
662
|
}
|
|
658
663
|
else if (brNode && brLastChildNode && brLastChildNode.nodeName === 'BR') {
|
|
659
664
|
detach(brLastChildNode);
|
|
665
|
+
if (!isNullOrUndefined(brParentNode) && brParentNode.childNodes.length === 0) {
|
|
666
|
+
detach(brParentNode);
|
|
667
|
+
}
|
|
660
668
|
e.args.preventDefault();
|
|
661
669
|
}
|
|
662
670
|
if (!isNullOrUndefined(this.deleteRangeElement) && (this.deleteOldRangeElement.tagName !== 'OL' && this.deleteOldRangeElement.tagName !== 'UL')
|
|
@@ -1032,7 +1040,7 @@ var HtmlEditor = /** @class */ (function () {
|
|
|
1032
1040
|
* @param {RichTextEditorModel} e - specifies the editor model
|
|
1033
1041
|
* @returns {void}
|
|
1034
1042
|
* @hidden
|
|
1035
|
-
|
|
1043
|
+
* @deprecated
|
|
1036
1044
|
*/
|
|
1037
1045
|
HtmlEditor.prototype.onPropertyChanged = function (e) {
|
|
1038
1046
|
// 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 = {
|
|
@@ -87,7 +87,7 @@ var keyCode = {
|
|
|
87
87
|
* ```
|
|
88
88
|
*
|
|
89
89
|
* @hidden
|
|
90
|
-
|
|
90
|
+
* @deprecated
|
|
91
91
|
*/
|
|
92
92
|
var KeyboardEvents = /** @class */ (function (_super) {
|
|
93
93
|
__extends(KeyboardEvents, _super);
|
|
@@ -20,7 +20,7 @@ export declare class MarkdownEditor {
|
|
|
20
20
|
* @function destroy
|
|
21
21
|
* @returns {void}
|
|
22
22
|
* @hidden
|
|
23
|
-
|
|
23
|
+
* @deprecated
|
|
24
24
|
*/
|
|
25
25
|
destroy(): void;
|
|
26
26
|
private addEventListener;
|
|
@@ -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;
|
|
@@ -23,7 +23,7 @@ var MarkdownEditor = /** @class */ (function () {
|
|
|
23
23
|
* @function destroy
|
|
24
24
|
* @returns {void}
|
|
25
25
|
* @hidden
|
|
26
|
-
|
|
26
|
+
* @deprecated
|
|
27
27
|
*/
|
|
28
28
|
MarkdownEditor.prototype.destroy = function () {
|
|
29
29
|
if (this.isDestroyed) {
|
|
@@ -142,7 +142,7 @@ var MarkdownEditor = /** @class */ (function () {
|
|
|
142
142
|
* @param {RichTextEditorModel} e - specifies the editor model
|
|
143
143
|
* @returns {void}
|
|
144
144
|
* @hidden
|
|
145
|
-
|
|
145
|
+
* @deprecated
|
|
146
146
|
*/
|
|
147
147
|
MarkdownEditor.prototype.onPropertyChanged = function (e) {
|
|
148
148
|
// On property code change here
|
|
@@ -11,7 +11,7 @@ import * as EVENTS from './../../common/constant';
|
|
|
11
11
|
import { RenderType, ImageInputSource } from '../base/enum';
|
|
12
12
|
import { Uploader } from '@syncfusion/ej2-inputs';
|
|
13
13
|
import * as classes from '../base/classes';
|
|
14
|
-
import { sanitizeHelper, convertToBlob
|
|
14
|
+
import { sanitizeHelper, convertToBlob } from '../base/util';
|
|
15
15
|
import { scrollToCursor } from '../../common/util';
|
|
16
16
|
/**
|
|
17
17
|
* PasteCleanup module called when pasting content in RichTextEditor
|
|
@@ -206,38 +206,62 @@ var PasteCleanup = /** @class */ (function () {
|
|
|
206
206
|
}
|
|
207
207
|
};
|
|
208
208
|
PasteCleanup.prototype.splitBreakLine = function (value) {
|
|
209
|
-
var enterSplitText = value.split('\n');
|
|
210
|
-
var
|
|
209
|
+
var enterSplitText = value.split('\r\n\r\n');
|
|
210
|
+
var finalText = '';
|
|
211
211
|
var startNode = this.parent.enterKey === 'P' ? '<p>' : (this.parent.enterKey === 'DIV' ? '<div>' : '');
|
|
212
212
|
var endNode = this.parent.enterKey === 'P' ? '</p>' : (this.parent.enterKey === 'DIV' ? '</div>' : '<br>');
|
|
213
213
|
for (var i = 0; i < enterSplitText.length; i++) {
|
|
214
|
-
|
|
215
|
-
|
|
214
|
+
var content = enterSplitText[i];
|
|
215
|
+
var contentWithSpace = this.makeSpace(content);
|
|
216
|
+
var contentWithLineBreak = contentWithSpace.replace(/\r\n|\n/g, '<br>');
|
|
217
|
+
if (i === 0) {
|
|
218
|
+
if (this.parent.enterKey === 'BR') {
|
|
219
|
+
finalText += (contentWithLineBreak + endNode);
|
|
220
|
+
}
|
|
221
|
+
else {
|
|
222
|
+
finalText += contentWithLineBreak; // In order to merge the content in current line. No P/Div tag is added.
|
|
223
|
+
}
|
|
216
224
|
}
|
|
217
225
|
else {
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
226
|
+
if (this.parent.enterKey === 'BR') {
|
|
227
|
+
if (i === enterSplitText.length - 1) {
|
|
228
|
+
finalText += (contentWithLineBreak + endNode);
|
|
229
|
+
}
|
|
230
|
+
else {
|
|
231
|
+
finalText += (contentWithLineBreak + endNode + endNode);
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
else {
|
|
235
|
+
finalText += startNode + contentWithLineBreak + endNode;
|
|
236
|
+
}
|
|
222
237
|
}
|
|
223
238
|
}
|
|
224
|
-
return
|
|
239
|
+
return finalText;
|
|
225
240
|
};
|
|
226
|
-
PasteCleanup.prototype.makeSpace = function (
|
|
227
|
-
var
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
241
|
+
PasteCleanup.prototype.makeSpace = function (text) {
|
|
242
|
+
var spacedContent = '';
|
|
243
|
+
if (text === '') {
|
|
244
|
+
return text;
|
|
245
|
+
}
|
|
246
|
+
var lineBreakSplitText = text.split(' ');
|
|
247
|
+
for (var i = 0; i < lineBreakSplitText.length; i++) {
|
|
248
|
+
var currentText = lineBreakSplitText[i];
|
|
249
|
+
if (currentText === '') {
|
|
250
|
+
spacedContent += ' ';
|
|
251
|
+
}
|
|
252
|
+
else if (currentText === '\t') {
|
|
253
|
+
spacedContent += ' ';
|
|
234
254
|
}
|
|
235
255
|
else {
|
|
236
|
-
|
|
237
|
-
|
|
256
|
+
if (i > 0 && i < lineBreakSplitText.length) {
|
|
257
|
+
spacedContent += ' ';
|
|
258
|
+
}
|
|
259
|
+
spacedContent += currentText;
|
|
238
260
|
}
|
|
239
261
|
}
|
|
240
|
-
|
|
262
|
+
spacedContent = spacedContent.replace(/\t/g, ' ');
|
|
263
|
+
spacedContent = spacedContent.replace(/ /g, ' ');
|
|
264
|
+
return spacedContent;
|
|
241
265
|
};
|
|
242
266
|
PasteCleanup.prototype.imgUploading = function (elm) {
|
|
243
267
|
var allImgElm = elm.querySelectorAll('.pasteContent_Img');
|
|
@@ -484,7 +508,7 @@ var PasteCleanup = /** @class */ (function () {
|
|
|
484
508
|
* @param {Element []} imgElement - specifies the array elements.
|
|
485
509
|
* @returns {void}
|
|
486
510
|
* @hidden
|
|
487
|
-
|
|
511
|
+
* @deprecated
|
|
488
512
|
*/
|
|
489
513
|
PasteCleanup.prototype.imageFormatting = function (pasteArgs, imgElement) {
|
|
490
514
|
if (!isNOU(imgElement.elements[0].getAttribute('src'))) {
|
|
@@ -822,6 +846,9 @@ var PasteCleanup = /** @class */ (function () {
|
|
|
822
846
|
var tableElement = element.querySelectorAll('table');
|
|
823
847
|
for (var i = 0; i < tableElement.length; i++) {
|
|
824
848
|
var isMSTeamsTable = tableElement[i].parentElement.nodeName === 'FIGURE';
|
|
849
|
+
if (tableElement[i].classList.length > 0 && tableElement[i].classList.contains('e-rte-custom-table')) {
|
|
850
|
+
continue; // Skip the custom table class
|
|
851
|
+
}
|
|
825
852
|
if (this.parent.pasteCleanupSettings.keepFormat && source && !isMSTeamsTable) {
|
|
826
853
|
tableElement[i].classList.add('e-rte-paste-' + source + '-table');
|
|
827
854
|
}
|
|
@@ -37,7 +37,7 @@ export declare class QuickToolbar {
|
|
|
37
37
|
* @param {RenderType} type - specifies the render type.
|
|
38
38
|
* @returns {BaseQuickToolbar} - specifies the quick toolbar
|
|
39
39
|
* @hidden
|
|
40
|
-
|
|
40
|
+
* @deprecated
|
|
41
41
|
*/
|
|
42
42
|
createQTBar(popupType: string, mode: string, items: (string | IToolbarItems)[], type: RenderType): BaseQuickToolbar;
|
|
43
43
|
private initializeQuickToolbars;
|
|
@@ -53,7 +53,7 @@ export declare class QuickToolbar {
|
|
|
53
53
|
* @param {HTMLElement} target - specifies the target element.
|
|
54
54
|
* @returns {void}
|
|
55
55
|
* @hidden
|
|
56
|
-
|
|
56
|
+
* @deprecated
|
|
57
57
|
*/
|
|
58
58
|
showInlineQTBar(x: number, y: number, target: HTMLElement): void;
|
|
59
59
|
/**
|
|
@@ -61,7 +61,7 @@ export declare class QuickToolbar {
|
|
|
61
61
|
*
|
|
62
62
|
* @returns {void}
|
|
63
63
|
* @hidden
|
|
64
|
-
|
|
64
|
+
* @deprecated
|
|
65
65
|
*/
|
|
66
66
|
hideInlineQTBar(): void;
|
|
67
67
|
/**
|
|
@@ -69,7 +69,7 @@ export declare class QuickToolbar {
|
|
|
69
69
|
*
|
|
70
70
|
* @returns {void}
|
|
71
71
|
* @hidden
|
|
72
|
-
|
|
72
|
+
* @deprecated
|
|
73
73
|
*/
|
|
74
74
|
hideQuickToolbars(): void;
|
|
75
75
|
private deBounce;
|
|
@@ -85,7 +85,7 @@ export declare class QuickToolbar {
|
|
|
85
85
|
*
|
|
86
86
|
* @returns {void}
|
|
87
87
|
* @hidden
|
|
88
|
-
|
|
88
|
+
* @deprecated
|
|
89
89
|
*/
|
|
90
90
|
getInlineBaseToolbar(): BaseToolbar;
|
|
91
91
|
/**
|
|
@@ -94,7 +94,7 @@ export declare class QuickToolbar {
|
|
|
94
94
|
* @function destroy
|
|
95
95
|
* @returns {void}
|
|
96
96
|
* @hidden
|
|
97
|
-
|
|
97
|
+
* @deprecated
|
|
98
98
|
*/
|
|
99
99
|
destroy(): void;
|
|
100
100
|
private wireInlineQTBarEvents;
|
|
@@ -105,7 +105,7 @@ export declare class QuickToolbar {
|
|
|
105
105
|
*
|
|
106
106
|
* @returns {void}
|
|
107
107
|
* @hidden
|
|
108
|
-
|
|
108
|
+
* @deprecated
|
|
109
109
|
*/
|
|
110
110
|
addEventListener(): void;
|
|
111
111
|
private onKeyDown;
|
|
@@ -118,7 +118,7 @@ export declare class QuickToolbar {
|
|
|
118
118
|
*
|
|
119
119
|
* @returns {void}
|
|
120
120
|
* @hidden
|
|
121
|
-
|
|
121
|
+
* @deprecated
|
|
122
122
|
*/
|
|
123
123
|
removeEventListener(): void;
|
|
124
124
|
/**
|
|
@@ -127,7 +127,7 @@ export declare class QuickToolbar {
|
|
|
127
127
|
* @param {RichTextEditorModel} e - specifies the element.
|
|
128
128
|
* @returns {void}
|
|
129
129
|
* @hidden
|
|
130
|
-
|
|
130
|
+
* @deprecated
|
|
131
131
|
*/
|
|
132
132
|
protected onPropertyChanged(e: {
|
|
133
133
|
[key: string]: RichTextEditorModel;
|
|
@@ -61,7 +61,7 @@ var QuickToolbar = /** @class */ (function () {
|
|
|
61
61
|
* @param {RenderType} type - specifies the render type.
|
|
62
62
|
* @returns {BaseQuickToolbar} - specifies the quick toolbar
|
|
63
63
|
* @hidden
|
|
64
|
-
|
|
64
|
+
* @deprecated
|
|
65
65
|
*/
|
|
66
66
|
QuickToolbar.prototype.createQTBar = function (popupType, mode, items, type) {
|
|
67
67
|
if (items.length < 1) {
|
|
@@ -148,7 +148,7 @@ var QuickToolbar = /** @class */ (function () {
|
|
|
148
148
|
* @param {HTMLElement} target - specifies the target element.
|
|
149
149
|
* @returns {void}
|
|
150
150
|
* @hidden
|
|
151
|
-
|
|
151
|
+
* @deprecated
|
|
152
152
|
*/
|
|
153
153
|
QuickToolbar.prototype.showInlineQTBar = function (x, y, target) {
|
|
154
154
|
if (isNOU(this.parent) || this.parent.readonly || target.tagName.toLowerCase() === 'img' || this.inlineQTBar.element.querySelector('.e-rte-color-content')) {
|
|
@@ -161,7 +161,7 @@ var QuickToolbar = /** @class */ (function () {
|
|
|
161
161
|
*
|
|
162
162
|
* @returns {void}
|
|
163
163
|
* @hidden
|
|
164
|
-
|
|
164
|
+
* @deprecated
|
|
165
165
|
*/
|
|
166
166
|
QuickToolbar.prototype.hideInlineQTBar = function () {
|
|
167
167
|
if (this.inlineQTBar && !hasClass(this.inlineQTBar.element, 'e-popup-close')) {
|
|
@@ -173,7 +173,7 @@ var QuickToolbar = /** @class */ (function () {
|
|
|
173
173
|
*
|
|
174
174
|
* @returns {void}
|
|
175
175
|
* @hidden
|
|
176
|
-
|
|
176
|
+
* @deprecated
|
|
177
177
|
*/
|
|
178
178
|
QuickToolbar.prototype.hideQuickToolbars = function () {
|
|
179
179
|
if (this.linkQTBar && !hasClass(this.linkQTBar.element, 'e-popup-close') && document.body.contains(this.linkQTBar.element)) {
|
|
@@ -341,7 +341,7 @@ var QuickToolbar = /** @class */ (function () {
|
|
|
341
341
|
*
|
|
342
342
|
* @returns {void}
|
|
343
343
|
* @hidden
|
|
344
|
-
|
|
344
|
+
* @deprecated
|
|
345
345
|
*/
|
|
346
346
|
QuickToolbar.prototype.getInlineBaseToolbar = function () {
|
|
347
347
|
return this.inlineQTBar && this.inlineQTBar.quickTBarObj;
|
|
@@ -352,7 +352,7 @@ var QuickToolbar = /** @class */ (function () {
|
|
|
352
352
|
* @function destroy
|
|
353
353
|
* @returns {void}
|
|
354
354
|
* @hidden
|
|
355
|
-
|
|
355
|
+
* @deprecated
|
|
356
356
|
*/
|
|
357
357
|
QuickToolbar.prototype.destroy = function () {
|
|
358
358
|
if (this.isDestroyed) {
|
|
@@ -438,7 +438,7 @@ var QuickToolbar = /** @class */ (function () {
|
|
|
438
438
|
*
|
|
439
439
|
* @returns {void}
|
|
440
440
|
* @hidden
|
|
441
|
-
|
|
441
|
+
* @deprecated
|
|
442
442
|
*/
|
|
443
443
|
QuickToolbar.prototype.addEventListener = function () {
|
|
444
444
|
if (this.parent.isDestroyed) {
|
|
@@ -532,7 +532,7 @@ var QuickToolbar = /** @class */ (function () {
|
|
|
532
532
|
*
|
|
533
533
|
* @returns {void}
|
|
534
534
|
* @hidden
|
|
535
|
-
|
|
535
|
+
* @deprecated
|
|
536
536
|
*/
|
|
537
537
|
QuickToolbar.prototype.removeEventListener = function () {
|
|
538
538
|
if (this.deBouncer) {
|
|
@@ -563,7 +563,7 @@ var QuickToolbar = /** @class */ (function () {
|
|
|
563
563
|
* @param {RichTextEditorModel} e - specifies the element.
|
|
564
564
|
* @returns {void}
|
|
565
565
|
* @hidden
|
|
566
|
-
|
|
566
|
+
* @deprecated
|
|
567
567
|
*/
|
|
568
568
|
QuickToolbar.prototype.onPropertyChanged = function (e) {
|
|
569
569
|
if (!isNullOrUndefined(e.newProp.quickToolbarSettings)) {
|
|
@@ -80,6 +80,10 @@ var Resize = /** @class */ (function () {
|
|
|
80
80
|
this.parent.element.style.height = eventType.clientY - boundRect.top + 'px';
|
|
81
81
|
this.parent.element.style.width = (!this.parent.enableRtl) ? eventType.clientX - boundRect.left + 'px' : boundRect.right - eventType.clientX + 'px';
|
|
82
82
|
}
|
|
83
|
+
var rteContent = this.parent.element.querySelector('#' + this.parent.getID() + '_source-view');
|
|
84
|
+
if (!isNullOrUndefined(rteContent)) {
|
|
85
|
+
rteContent.style.height = this.parent.element.style.height;
|
|
86
|
+
}
|
|
83
87
|
this.parent.refreshUI();
|
|
84
88
|
};
|
|
85
89
|
Resize.prototype.stopResize = function (e) {
|