@syncfusion/ej2-richtexteditor 27.1.52 → 27.1.57-637881
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/README.md +1 -1
- package/dist/ej2-richtexteditor.min.js +1 -0
- 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 +298 -83
- package/dist/es6/ej2-richtexteditor.es2015.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es5.js +299 -82
- package/dist/es6/ej2-richtexteditor.es5.js.map +1 -1
- package/dist/global/ej2-richtexteditor.min.js +1 -10
- package/dist/global/ej2-richtexteditor.min.js.map +1 -1
- package/dist/global/index.d.ts +0 -9
- package/package.json +84 -84
- package/src/common/config.d.ts +7 -0
- package/src/common/config.js +12 -0
- package/src/common/interface.d.ts +8 -8
- package/src/editor-manager/base/classes.d.ts +1 -1
- package/src/editor-manager/base/classes.js +1 -1
- package/src/editor-manager/base/editor-manager.d.ts +3 -3
- package/src/editor-manager/base/editor-manager.js +4 -4
- package/src/editor-manager/base/enum.d.ts +2 -2
- package/src/editor-manager/base/interface.d.ts +11 -11
- 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 +2 -2
- package/src/editor-manager/plugin/dom-node.d.ts +36 -36
- package/src/editor-manager/plugin/dom-node.js +37 -37
- 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 +2 -2
- package/src/editor-manager/plugin/formats.js +2 -2
- package/src/editor-manager/plugin/image.d.ts +3 -3
- package/src/editor-manager/plugin/image.js +5 -3
- 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 +36 -12
- 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 +4 -4
- package/src/editor-manager/plugin/lists.d.ts +2 -2
- package/src/editor-manager/plugin/lists.js +3 -3
- 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 +6 -6
- package/src/editor-manager/plugin/selection-commands.d.ts +1 -1
- package/src/editor-manager/plugin/selection-commands.js +3 -3
- 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 +3 -3
- package/src/editor-manager/plugin/undo.d.ts +6 -6
- package/src/editor-manager/plugin/undo.js +9 -9
- 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/enter-key.js +10 -5
- 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 +5 -5
- package/src/rich-text-editor/actions/import-export.js +1 -1
- package/src/rich-text-editor/actions/keyboard.d.ts +1 -1
- package/src/rich-text-editor/actions/keyboard.js +1 -1
- 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 +47 -23
- 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.d.ts +3 -0
- package/src/rich-text-editor/actions/resize.js +17 -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 +64 -52
- package/src/rich-text-editor/base/interface.js +1 -1
- package/src/rich-text-editor/base/rich-text-editor-model.d.ts +1 -1
- package/src/rich-text-editor/base/rich-text-editor.d.ts +62 -62
- package/src/rich-text-editor/base/rich-text-editor.js +48 -34
- 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 +2 -2
- package/src/rich-text-editor/formatter/markdown-formatter.d.ts +2 -2
- package/src/rich-text-editor/formatter/markdown-formatter.js +2 -2
- 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 +4 -4
- package/src/rich-text-editor/renderer/image-module.d.ts +1 -1
- package/src/rich-text-editor/renderer/image-module.js +64 -23
- package/src/rich-text-editor/renderer/link-module.d.ts +1 -1
- package/src/rich-text-editor/renderer/link-module.js +9 -2
- 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 +1 -1
- package/src/rich-text-editor/renderer/table-module.d.ts +1 -1
- package/src/rich-text-editor/renderer/table-module.js +4 -3
- 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 +9 -3
- 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 +27 -22
- package/src/selection/selection.js +66 -23
- package/styles/material3-dark.scss +1 -1
- package/styles/material3.scss +1 -1
- package/styles/rich-text-editor/material3-dark.scss +1 -1
- package/styles/rich-text-editor/material3.scss +1 -1
|
@@ -33,7 +33,7 @@ export declare class BaseToolbar {
|
|
|
33
33
|
* @param {string} container - specifies the value of string
|
|
34
34
|
* @returns {IToolbarItemModel} - returns the model element
|
|
35
35
|
* @hidden
|
|
36
|
-
|
|
36
|
+
* @deprecated
|
|
37
37
|
*/
|
|
38
38
|
getObject(item: string, container: string): IToolbarItemModel;
|
|
39
39
|
/**
|
|
@@ -41,7 +41,7 @@ export declare class BaseToolbar {
|
|
|
41
41
|
* @param {string} container - specifies the container value
|
|
42
42
|
* @returns {ItemModel} - retunrs the model element
|
|
43
43
|
* @hidden
|
|
44
|
-
|
|
44
|
+
* @deprecated
|
|
45
45
|
*/
|
|
46
46
|
getItems(tbItems: (string | IToolbarItems)[], container: string): ItemModel[];
|
|
47
47
|
private getToolbarOptions;
|
|
@@ -51,7 +51,7 @@ export declare class BaseToolbar {
|
|
|
51
51
|
* @param {IToolbarRenderOptions} args - specifies the toolbar options
|
|
52
52
|
* @returns {void}
|
|
53
53
|
* @hidden
|
|
54
|
-
|
|
54
|
+
* @deprecated
|
|
55
55
|
*/
|
|
56
56
|
render(args: IToolbarRenderOptions): void;
|
|
57
57
|
destroy(): void;
|
|
@@ -97,7 +97,7 @@ var BaseToolbar = /** @class */ (function () {
|
|
|
97
97
|
* @param {string} container - specifies the value of string
|
|
98
98
|
* @returns {IToolbarItemModel} - returns the model element
|
|
99
99
|
* @hidden
|
|
100
|
-
|
|
100
|
+
* @deprecated
|
|
101
101
|
*/
|
|
102
102
|
BaseToolbar.prototype.getObject = function (item, container) {
|
|
103
103
|
var itemStr = item.toLowerCase();
|
|
@@ -126,7 +126,7 @@ var BaseToolbar = /** @class */ (function () {
|
|
|
126
126
|
* @param {string} container - specifies the container value
|
|
127
127
|
* @returns {ItemModel} - retunrs the model element
|
|
128
128
|
* @hidden
|
|
129
|
-
|
|
129
|
+
* @deprecated
|
|
130
130
|
*/
|
|
131
131
|
BaseToolbar.prototype.getItems = function (tbItems, container) {
|
|
132
132
|
var _this = this;
|
|
@@ -209,7 +209,7 @@ var BaseToolbar = /** @class */ (function () {
|
|
|
209
209
|
* @param {IToolbarRenderOptions} args - specifies the toolbar options
|
|
210
210
|
* @returns {void}
|
|
211
211
|
* @hidden
|
|
212
|
-
|
|
212
|
+
* @deprecated
|
|
213
213
|
*/
|
|
214
214
|
BaseToolbar.prototype.render = function (args) {
|
|
215
215
|
this.toolbarRenderer = this.renderFactory.getRenderer(RenderType.Toolbar);
|
|
@@ -23,7 +23,7 @@ export declare class ColorPickerInput {
|
|
|
23
23
|
* @param {IColorPickerRenderArgs} args - specify the arguments.
|
|
24
24
|
* @returns {void}
|
|
25
25
|
* @hidden
|
|
26
|
-
|
|
26
|
+
* @deprecated
|
|
27
27
|
*/
|
|
28
28
|
renderColorPickerInput(args: IColorPickerRenderArgs): void;
|
|
29
29
|
destroy(): void;
|
|
@@ -32,7 +32,7 @@ export declare class ColorPickerInput {
|
|
|
32
32
|
*
|
|
33
33
|
* @returns {void}
|
|
34
34
|
* @hidden
|
|
35
|
-
|
|
35
|
+
* @deprecated
|
|
36
36
|
*/
|
|
37
37
|
destroyColorPicker(): void;
|
|
38
38
|
private setRtl;
|
|
@@ -30,7 +30,7 @@ var ColorPickerInput = /** @class */ (function () {
|
|
|
30
30
|
* @param {IColorPickerRenderArgs} args - specify the arguments.
|
|
31
31
|
* @returns {void}
|
|
32
32
|
* @hidden
|
|
33
|
-
|
|
33
|
+
* @deprecated
|
|
34
34
|
*/
|
|
35
35
|
ColorPickerInput.prototype.renderColorPickerInput = function (args) {
|
|
36
36
|
var _this = this;
|
|
@@ -118,7 +118,7 @@ var ColorPickerInput = /** @class */ (function () {
|
|
|
118
118
|
*
|
|
119
119
|
* @returns {void}
|
|
120
120
|
* @hidden
|
|
121
|
-
|
|
121
|
+
* @deprecated
|
|
122
122
|
*/
|
|
123
123
|
ColorPickerInput.prototype.destroyColorPicker = function () {
|
|
124
124
|
if (this.fontColorPicker && !this.fontColorPicker.isDestroyed) {
|
|
@@ -23,7 +23,7 @@ export declare class Count {
|
|
|
23
23
|
*
|
|
24
24
|
* @returns {void}
|
|
25
25
|
* @hidden
|
|
26
|
-
|
|
26
|
+
* @deprecated
|
|
27
27
|
*/
|
|
28
28
|
renderCount(): void;
|
|
29
29
|
private appendCount;
|
|
@@ -31,7 +31,7 @@ export declare class Count {
|
|
|
31
31
|
/**
|
|
32
32
|
* @returns {void}
|
|
33
33
|
* @hidden
|
|
34
|
-
|
|
34
|
+
* @deprecated
|
|
35
35
|
*/
|
|
36
36
|
refresh(): void;
|
|
37
37
|
/**
|
|
@@ -40,7 +40,7 @@ export declare class Count {
|
|
|
40
40
|
* @function destroy
|
|
41
41
|
* @returns {void}
|
|
42
42
|
* @hidden
|
|
43
|
-
|
|
43
|
+
* @deprecated
|
|
44
44
|
*/
|
|
45
45
|
destroy(): void;
|
|
46
46
|
private toggle;
|
|
@@ -23,7 +23,7 @@ var Count = /** @class */ (function () {
|
|
|
23
23
|
*
|
|
24
24
|
* @returns {void}
|
|
25
25
|
* @hidden
|
|
26
|
-
|
|
26
|
+
* @deprecated
|
|
27
27
|
*/
|
|
28
28
|
Count.prototype.renderCount = function () {
|
|
29
29
|
this.initializeInstance();
|
|
@@ -68,7 +68,7 @@ var Count = /** @class */ (function () {
|
|
|
68
68
|
/**
|
|
69
69
|
* @returns {void}
|
|
70
70
|
* @hidden
|
|
71
|
-
|
|
71
|
+
* @deprecated
|
|
72
72
|
*/
|
|
73
73
|
Count.prototype.refresh = function () {
|
|
74
74
|
if (!isNullOrUndefined(this.editPanel)) {
|
|
@@ -84,7 +84,7 @@ var Count = /** @class */ (function () {
|
|
|
84
84
|
* @function destroy
|
|
85
85
|
* @returns {void}
|
|
86
86
|
* @hidden
|
|
87
|
-
|
|
87
|
+
* @deprecated
|
|
88
88
|
*/
|
|
89
89
|
Count.prototype.destroy = function () {
|
|
90
90
|
if (this.isDestroyed) {
|
|
@@ -38,7 +38,7 @@ export declare class DropDownButtons {
|
|
|
38
38
|
* @param {IDropDownRenderArgs} args - specifies the arguments
|
|
39
39
|
* @returns {void}
|
|
40
40
|
* @hidden
|
|
41
|
-
|
|
41
|
+
* @deprecated
|
|
42
42
|
*/
|
|
43
43
|
renderDropDowns(args: IDropDownRenderArgs): void;
|
|
44
44
|
private getUpdateItems;
|
|
@@ -57,7 +57,7 @@ export declare class DropDownButtons {
|
|
|
57
57
|
*
|
|
58
58
|
* @returns {void}
|
|
59
59
|
* @hidden
|
|
60
|
-
|
|
60
|
+
* @deprecated
|
|
61
61
|
*/
|
|
62
62
|
destroyDropDowns(): void;
|
|
63
63
|
private setRtl;
|
|
@@ -36,7 +36,7 @@ var DropDownButtons = /** @class */ (function () {
|
|
|
36
36
|
* @param {IDropDownRenderArgs} args - specifies the arguments
|
|
37
37
|
* @returns {void}
|
|
38
38
|
* @hidden
|
|
39
|
-
|
|
39
|
+
* @deprecated
|
|
40
40
|
*/
|
|
41
41
|
DropDownButtons.prototype.renderDropDowns = function (args) {
|
|
42
42
|
var _this = this;
|
|
@@ -401,7 +401,7 @@ var DropDownButtons = /** @class */ (function () {
|
|
|
401
401
|
*
|
|
402
402
|
* @returns {void}
|
|
403
403
|
* @hidden
|
|
404
|
-
|
|
404
|
+
* @deprecated
|
|
405
405
|
*/
|
|
406
406
|
DropDownButtons.prototype.destroyDropDowns = function () {
|
|
407
407
|
if (this.formatDropDown) {
|
|
@@ -427,11 +427,16 @@ var EnterKeyAction = /** @class */ (function () {
|
|
|
427
427
|
else if (!isNOU(currentParent) && currentParent !== _this.parent.inputElement && currentParent.nodeName !== 'BR') {
|
|
428
428
|
if (currentParent.textContent.trim().length === 0 || (currentParent.textContent.trim().length === 1 &&
|
|
429
429
|
currentParent.textContent.charCodeAt(0) === 8203)) {
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
430
|
+
if (currentParent.childElementCount > 1 && currentParent.lastElementChild.nodeName === 'IMG') {
|
|
431
|
+
_this.insertBRElement();
|
|
432
|
+
}
|
|
433
|
+
else {
|
|
434
|
+
var newElem = _this.parent.formatter.editorManager.nodeCutter.SplitNode(_this.range, currentParent, true).cloneNode(true);
|
|
435
|
+
_this.parent.formatter.editorManager.domNode.insertAfter(newElem, currentParent);
|
|
436
|
+
var outerBRElem = _this.parent.createElement('br');
|
|
437
|
+
newElem.parentElement.insertBefore(outerBRElem, newElem);
|
|
438
|
+
_this.parent.formatter.editorManager.nodeSelection.setCursorPoint(_this.parent.contentModule.getDocument(), newElem, 0);
|
|
439
|
+
}
|
|
435
440
|
}
|
|
436
441
|
else {
|
|
437
442
|
var newElem = void 0;
|
|
@@ -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);
|
|
@@ -89,7 +89,7 @@ var HtmlEditor = /** @class */ (function () {
|
|
|
89
89
|
if (this.parent.isDestroyed) {
|
|
90
90
|
return;
|
|
91
91
|
}
|
|
92
|
-
this.nodeSelectionObj = new NodeSelection();
|
|
92
|
+
this.nodeSelectionObj = new NodeSelection(this.parent.inputElement);
|
|
93
93
|
this.parent.on(events.initialLoad, this.instantiateRenderer, this);
|
|
94
94
|
this.parent.on(events.htmlToolbarClick, this.onToolbarClick, this);
|
|
95
95
|
this.parent.on(events.keyDown, this.onKeyDown, this);
|
|
@@ -803,7 +803,7 @@ var HtmlEditor = /** @class */ (function () {
|
|
|
803
803
|
urlText = urlText.slice(0, urlTextRange);
|
|
804
804
|
// eslint-disable-next-line
|
|
805
805
|
var regex = new RegExp(/([^\S]|^)(((https?\:\/\/)|(www\.))(\S+))/gi);
|
|
806
|
-
if (selectNodeEle[0].nodeName !== 'A' && urlText.match(regex)) {
|
|
806
|
+
if (selectNodeEle[0] && selectNodeEle[0].nodeName !== 'A' && urlText.match(regex)) {
|
|
807
807
|
var selection = this.nodeSelectionObj.save(range, this.parent.contentModule.getDocument());
|
|
808
808
|
var url = urlText.indexOf('http') > -1 ? urlText : 'http://' + urlText;
|
|
809
809
|
var selectParent = this.parent.formatter.editorManager.nodeSelection.getParentNodeCollection(range);
|
|
@@ -1032,7 +1032,7 @@ var HtmlEditor = /** @class */ (function () {
|
|
|
1032
1032
|
* @param {RichTextEditorModel} e - specifies the editor model
|
|
1033
1033
|
* @returns {void}
|
|
1034
1034
|
* @hidden
|
|
1035
|
-
|
|
1035
|
+
* @deprecated
|
|
1036
1036
|
*/
|
|
1037
1037
|
HtmlEditor.prototype.onPropertyChanged = function (e) {
|
|
1038
1038
|
// On property code change here
|
|
@@ -21,7 +21,7 @@ var ImportExport = /** @class */ (function () {
|
|
|
21
21
|
saveUrl: this.parent.importWord.serviceUrl
|
|
22
22
|
},
|
|
23
23
|
success: function (args) {
|
|
24
|
-
_this.parent.executeCommand('
|
|
24
|
+
_this.parent.executeCommand('importWord', args.e.currentTarget.response, { undo: true });
|
|
25
25
|
}
|
|
26
26
|
});
|
|
27
27
|
this.parent.setProperties({ enableXhtml: true }, true);
|
|
@@ -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
|
|
@@ -40,7 +40,7 @@ var PasteCleanup = /** @class */ (function () {
|
|
|
40
40
|
this.isDestroyed = false;
|
|
41
41
|
}
|
|
42
42
|
PasteCleanup.prototype.addEventListener = function () {
|
|
43
|
-
this.nodeSelectionObj = new NodeSelection();
|
|
43
|
+
this.nodeSelectionObj = new NodeSelection(this.parent.inputElement);
|
|
44
44
|
if (this.parent.isDestroyed) {
|
|
45
45
|
return;
|
|
46
46
|
}
|
|
@@ -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'))) {
|
|
@@ -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;
|