@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
|
@@ -4,7 +4,7 @@ import { isNullOrUndefined as isNOU } from '@syncfusion/ej2-base';
|
|
|
4
4
|
* Content module is used to render Rich Text Editor content
|
|
5
5
|
*
|
|
6
6
|
* @hidden
|
|
7
|
-
|
|
7
|
+
* @deprecated
|
|
8
8
|
*/
|
|
9
9
|
var ContentRender = /** @class */ (function () {
|
|
10
10
|
/**
|
|
@@ -20,7 +20,7 @@ var ContentRender = /** @class */ (function () {
|
|
|
20
20
|
*
|
|
21
21
|
* @returns {void}
|
|
22
22
|
* @hidden
|
|
23
|
-
|
|
23
|
+
* @deprecated
|
|
24
24
|
*/
|
|
25
25
|
ContentRender.prototype.renderPanel = function () {
|
|
26
26
|
var rteObj = this.parent;
|
|
@@ -49,7 +49,7 @@ var ContentRender = /** @class */ (function () {
|
|
|
49
49
|
*
|
|
50
50
|
* @returns {Element} - specifies the element.
|
|
51
51
|
* @hidden
|
|
52
|
-
|
|
52
|
+
* @deprecated
|
|
53
53
|
*/
|
|
54
54
|
ContentRender.prototype.getPanel = function () {
|
|
55
55
|
return this.contentPanel;
|
|
@@ -59,7 +59,7 @@ var ContentRender = /** @class */ (function () {
|
|
|
59
59
|
*
|
|
60
60
|
* @returns {Element} - specifies the return element.
|
|
61
61
|
* @hidden
|
|
62
|
-
|
|
62
|
+
* @deprecated
|
|
63
63
|
*/
|
|
64
64
|
ContentRender.prototype.getEditPanel = function () {
|
|
65
65
|
return this.editableElement;
|
|
@@ -79,7 +79,7 @@ var ContentRender = /** @class */ (function () {
|
|
|
79
79
|
* @param {Element} panel - specifies the panel element.
|
|
80
80
|
* @returns {void}
|
|
81
81
|
* @hidden
|
|
82
|
-
|
|
82
|
+
* @deprecated
|
|
83
83
|
*/
|
|
84
84
|
ContentRender.prototype.setPanel = function (panel) {
|
|
85
85
|
this.contentPanel = panel;
|
|
@@ -89,7 +89,7 @@ var ContentRender = /** @class */ (function () {
|
|
|
89
89
|
*
|
|
90
90
|
* @returns {Document} - specifies the document.
|
|
91
91
|
* @hidden
|
|
92
|
-
|
|
92
|
+
* @deprecated
|
|
93
93
|
*/
|
|
94
94
|
ContentRender.prototype.getDocument = function () {
|
|
95
95
|
return this.getEditPanel().ownerDocument;
|
|
@@ -17,7 +17,7 @@ export declare class DialogRenderer {
|
|
|
17
17
|
* @param {DialogModel} e - specifies the dialog model.
|
|
18
18
|
* @returns {void}
|
|
19
19
|
* @hidden
|
|
20
|
-
|
|
20
|
+
* @deprecated
|
|
21
21
|
*/
|
|
22
22
|
render(e: DialogModel): Dialog;
|
|
23
23
|
private beforeOpen;
|
|
@@ -33,7 +33,7 @@ export declare class DialogRenderer {
|
|
|
33
33
|
* @param {Object} args - specifies the arguments.
|
|
34
34
|
* @returns {void}
|
|
35
35
|
* @hidden
|
|
36
|
-
|
|
36
|
+
* @deprecated
|
|
37
37
|
*/
|
|
38
38
|
close(args: Object): void;
|
|
39
39
|
}
|
|
@@ -29,7 +29,7 @@ var DialogRenderer = /** @class */ (function () {
|
|
|
29
29
|
* @param {DialogModel} e - specifies the dialog model.
|
|
30
30
|
* @returns {void}
|
|
31
31
|
* @hidden
|
|
32
|
-
|
|
32
|
+
* @deprecated
|
|
33
33
|
*/
|
|
34
34
|
DialogRenderer.prototype.render = function (e) {
|
|
35
35
|
var dlgObj;
|
|
@@ -114,7 +114,7 @@ var DialogRenderer = /** @class */ (function () {
|
|
|
114
114
|
* @param {Object} args - specifies the arguments.
|
|
115
115
|
* @returns {void}
|
|
116
116
|
* @hidden
|
|
117
|
-
|
|
117
|
+
* @deprecated
|
|
118
118
|
*/
|
|
119
119
|
DialogRenderer.prototype.close = function (args) {
|
|
120
120
|
this.parent.trigger(events.dialogClose, args);
|
|
@@ -3,14 +3,14 @@ import { ContentRender } from '../renderer/content-renderer';
|
|
|
3
3
|
* Content module is used to render Rich Text Editor content
|
|
4
4
|
*
|
|
5
5
|
* @hidden
|
|
6
|
-
|
|
6
|
+
* @deprecated
|
|
7
7
|
*/
|
|
8
8
|
export declare class IframeContentRender extends ContentRender {
|
|
9
9
|
/**
|
|
10
10
|
* The function is used to render Rich Text Editor iframe
|
|
11
11
|
*
|
|
12
12
|
* @hidden
|
|
13
|
-
|
|
13
|
+
* @deprecated
|
|
14
14
|
*/
|
|
15
15
|
renderPanel(): void;
|
|
16
16
|
private setThemeColor;
|
|
@@ -19,7 +19,7 @@ export declare class IframeContentRender extends ContentRender {
|
|
|
19
19
|
*
|
|
20
20
|
* @returns {Element} - specifies the element.
|
|
21
21
|
* @hidden
|
|
22
|
-
|
|
22
|
+
* @deprecated
|
|
23
23
|
*/
|
|
24
24
|
getEditPanel(): Element;
|
|
25
25
|
/**
|
|
@@ -27,7 +27,7 @@ export declare class IframeContentRender extends ContentRender {
|
|
|
27
27
|
*
|
|
28
28
|
* @returns {void}
|
|
29
29
|
* @hidden
|
|
30
|
-
|
|
30
|
+
* @deprecated
|
|
31
31
|
*/
|
|
32
32
|
getDocument(): Document;
|
|
33
33
|
}
|
|
@@ -21,7 +21,7 @@ var IFRAMEHEADER = "\n <!DOCTYPE html> \n <html>\n <head>\n
|
|
|
21
21
|
* Content module is used to render Rich Text Editor content
|
|
22
22
|
*
|
|
23
23
|
* @hidden
|
|
24
|
-
|
|
24
|
+
* @deprecated
|
|
25
25
|
*/
|
|
26
26
|
var IframeContentRender = /** @class */ (function (_super) {
|
|
27
27
|
__extends(IframeContentRender, _super);
|
|
@@ -32,7 +32,7 @@ var IframeContentRender = /** @class */ (function (_super) {
|
|
|
32
32
|
* The function is used to render Rich Text Editor iframe
|
|
33
33
|
*
|
|
34
34
|
* @hidden
|
|
35
|
-
|
|
35
|
+
* @deprecated
|
|
36
36
|
*/
|
|
37
37
|
IframeContentRender.prototype.renderPanel = function () {
|
|
38
38
|
var rteObj = this.parent;
|
|
@@ -100,7 +100,7 @@ var IframeContentRender = /** @class */ (function (_super) {
|
|
|
100
100
|
*
|
|
101
101
|
* @returns {Element} - specifies the element.
|
|
102
102
|
* @hidden
|
|
103
|
-
|
|
103
|
+
* @deprecated
|
|
104
104
|
*/
|
|
105
105
|
IframeContentRender.prototype.getEditPanel = function () {
|
|
106
106
|
var editNode;
|
|
@@ -117,7 +117,7 @@ var IframeContentRender = /** @class */ (function (_super) {
|
|
|
117
117
|
*
|
|
118
118
|
* @returns {void}
|
|
119
119
|
* @hidden
|
|
120
|
-
|
|
120
|
+
* @deprecated
|
|
121
121
|
*/
|
|
122
122
|
IframeContentRender.prototype.getDocument = function () {
|
|
123
123
|
return this.getEditPanel().ownerDocument;
|
|
@@ -8,7 +8,7 @@ import { Button, CheckBox } from '@syncfusion/ej2-buttons';
|
|
|
8
8
|
import { RenderType, ImageInputSource } from '../base/enum';
|
|
9
9
|
import { dispatchEvent, parseHtml, hasClass, convertToBlob } from '../base/util';
|
|
10
10
|
import { isIDevice } from '../../common/util';
|
|
11
|
-
import { imageResizeFactor } from '../../common/config';
|
|
11
|
+
import { iframeResizeFactor, imageResizeFactor } from '../../common/config';
|
|
12
12
|
/**
|
|
13
13
|
* `Image` module is used to handle image actions.
|
|
14
14
|
*/
|
|
@@ -208,8 +208,14 @@ var Image = /** @class */ (function () {
|
|
|
208
208
|
if (this.parent.formatter.getUndoRedoStack().length === 0) {
|
|
209
209
|
this.parent.formatter.saveData();
|
|
210
210
|
}
|
|
211
|
-
|
|
212
|
-
|
|
211
|
+
if (this.parent.iframeSettings.enable) {
|
|
212
|
+
this.pageX = e.screenX;
|
|
213
|
+
this.pageY = e.screenY;
|
|
214
|
+
}
|
|
215
|
+
else {
|
|
216
|
+
this.pageX = this.getPointX(e);
|
|
217
|
+
this.pageY = this.getPointY(e);
|
|
218
|
+
}
|
|
213
219
|
e.preventDefault();
|
|
214
220
|
e.stopImmediatePropagation();
|
|
215
221
|
this.resizeBtnInit();
|
|
@@ -474,29 +480,50 @@ var Image = /** @class */ (function () {
|
|
|
474
480
|
return;
|
|
475
481
|
}
|
|
476
482
|
if (this.resizeBtnStat.botRight || this.resizeBtnStat.botLeft || this.resizeBtnStat.topRight || this.resizeBtnStat.topLeft) {
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
483
|
+
if (this.parent.iframeSettings.enable) {
|
|
484
|
+
var resizeFactor = this.getResizeFactor(this.currentResizeHandler);
|
|
485
|
+
var currentScreenX = e.screenX;
|
|
486
|
+
var currentScreenY = e.screenY;
|
|
487
|
+
var currentWidth = this.imgEle.clientWidth;
|
|
488
|
+
var currentHeight = this.imgEle.clientHeight;
|
|
489
|
+
var deltaX = currentScreenX - this.pageX;
|
|
490
|
+
var deltaY = currentScreenY - this.pageY;
|
|
491
|
+
var width = deltaX * resizeFactor[0] + currentWidth;
|
|
492
|
+
var height = deltaY * resizeFactor[1] + currentHeight;
|
|
493
|
+
var dimensions = this.adjustDimensions(width, height, deltaX, deltaY, this.aspectRatio);
|
|
494
|
+
this.pageX = currentScreenX;
|
|
495
|
+
this.pageY = currentScreenY;
|
|
496
|
+
this.imgDupMouseMove(dimensions.width + 'px', dimensions.height + 'px', e);
|
|
497
|
+
this.parent.autoResize();
|
|
498
|
+
}
|
|
499
|
+
else {
|
|
500
|
+
var pageX = this.getPointX(e);
|
|
501
|
+
var pageY = this.getPointY(e);
|
|
502
|
+
var resizeFactor = this.getResizeFactor(this.currentResizeHandler);
|
|
503
|
+
var diffX = (pageX - this.pageX);
|
|
504
|
+
var diffY = (pageY - this.pageY);
|
|
505
|
+
var currentWidth = this.imgEle.clientWidth;
|
|
506
|
+
var currentHeight = this.imgEle.clientHeight;
|
|
507
|
+
var width = diffX * resizeFactor[0] + currentWidth;
|
|
508
|
+
var height = diffY * resizeFactor[1] + currentHeight;
|
|
509
|
+
var dimensions = this.adjustDimensions(width, height, diffX, diffY, this.aspectRatio);
|
|
510
|
+
this.pageX = pageX;
|
|
511
|
+
this.pageY = pageY;
|
|
512
|
+
this.imgDupMouseMove(dimensions.width + 'px', dimensions.height + 'px', e);
|
|
513
|
+
}
|
|
490
514
|
}
|
|
491
515
|
};
|
|
492
516
|
Image.prototype.adjustDimensions = function (width, height, diffX, diffY, aspectRatio) {
|
|
493
517
|
width = (width < 16) ? 16 : width;
|
|
494
518
|
height = (height < 16) ? 16 : height;
|
|
495
|
-
var isWidthPrimary =
|
|
519
|
+
var isWidthPrimary = width > height;
|
|
496
520
|
var dimensions = this.adjustDimensionsByAspectRatio(width, height, aspectRatio, isWidthPrimary);
|
|
497
521
|
return dimensions;
|
|
498
522
|
};
|
|
499
523
|
Image.prototype.getResizeFactor = function (value) {
|
|
524
|
+
if (this.parent.iframeSettings.enable) {
|
|
525
|
+
return iframeResizeFactor[value];
|
|
526
|
+
}
|
|
500
527
|
return imageResizeFactor[value];
|
|
501
528
|
};
|
|
502
529
|
Image.prototype.findAspectRatio = function (image) {
|
|
@@ -568,11 +595,15 @@ var Image = /** @class */ (function () {
|
|
|
568
595
|
}
|
|
569
596
|
};
|
|
570
597
|
Image.prototype.openImgLink = function (e) {
|
|
598
|
+
var sanitizedHTML = this.parent.htmlEditorModule.sanitizeHelper(e.selectParent[0].parentNode.outerHTML);
|
|
599
|
+
var tempEle = document.createElement('div');
|
|
600
|
+
tempEle.innerHTML = sanitizedHTML;
|
|
571
601
|
var target = e.selectParent[0].parentNode.target === '' ? '_self' : '_blank';
|
|
572
602
|
this.parent.formatter.process(this.parent, e.args, e.args, {
|
|
573
|
-
url:
|
|
603
|
+
url: tempEle.firstChild.href, target: target, selectNode: e.selectNode,
|
|
574
604
|
subCommand: e.args.item.subCommand
|
|
575
605
|
});
|
|
606
|
+
tempEle.remove();
|
|
576
607
|
};
|
|
577
608
|
Image.prototype.editImgLink = function (e) {
|
|
578
609
|
var selectParentEle = e.selectParent[0].parentNode;
|
|
@@ -659,7 +690,7 @@ var Image = /** @class */ (function () {
|
|
|
659
690
|
}
|
|
660
691
|
}
|
|
661
692
|
if (originalEvent.keyCode === 8 || originalEvent.keyCode === 46) {
|
|
662
|
-
if (selectNodeEle && selectNodeEle[0].nodeName === 'IMG' && selectNodeEle.length < 1) {
|
|
693
|
+
if (selectNodeEle && selectNodeEle[0] && selectNodeEle[0].nodeName === 'IMG' && selectNodeEle.length < 1) {
|
|
663
694
|
if (!isNOU(this.parent.formatter.editorManager.nodeSelection)) {
|
|
664
695
|
save = this.parent.formatter.editorManager.nodeSelection.save(range, this.parent.contentModule.getDocument());
|
|
665
696
|
}
|
|
@@ -908,7 +939,9 @@ var Image = /** @class */ (function () {
|
|
|
908
939
|
_this.parent.formatter.editorManager.nodeSelection.Clear(_this.contentModule.getDocument());
|
|
909
940
|
_this.parent.formatter.editorManager.nodeSelection.setSelectionContents(_this.contentModule.getDocument(), target);
|
|
910
941
|
_this.quickToolObj.imageQTBar.showPopup(args.pageX, pageY, target);
|
|
911
|
-
_this.
|
|
942
|
+
if (_this.parent.insertImageSettings.resize === true) {
|
|
943
|
+
_this.resizeStart(e.args, target);
|
|
944
|
+
}
|
|
912
945
|
}, 400);
|
|
913
946
|
}
|
|
914
947
|
else {
|
|
@@ -1586,6 +1619,9 @@ var Image = /** @class */ (function () {
|
|
|
1586
1619
|
proxy.uploadUrl.cssClass = (proxy.parent.insertImageSettings.display === 'inline' ?
|
|
1587
1620
|
classes.CLS_IMGINLINE : classes.CLS_IMGBREAK);
|
|
1588
1621
|
proxy.dialogObj.hide({ returnValue: false });
|
|
1622
|
+
if (proxy.dialogObj !== null) {
|
|
1623
|
+
return;
|
|
1624
|
+
}
|
|
1589
1625
|
proxy.parent.formatter.process(proxy.parent, this.args, this.args.originalEvent, proxy.uploadUrl);
|
|
1590
1626
|
proxy.uploadUrl.url = '';
|
|
1591
1627
|
if (proxy.contentModule.getEditPanel().querySelector('.e-img-resize')) {
|
|
@@ -1616,8 +1652,11 @@ var Image = /** @class */ (function () {
|
|
|
1616
1652
|
maxHeight: proxy.parent.insertImageSettings.maxHeight
|
|
1617
1653
|
}
|
|
1618
1654
|
};
|
|
1619
|
-
proxy.parent.formatter.process(proxy.parent, this.args, this.args.originalEvent, value);
|
|
1620
1655
|
proxy.dialogObj.hide({ returnValue: false });
|
|
1656
|
+
if (proxy.dialogObj !== null) {
|
|
1657
|
+
return;
|
|
1658
|
+
}
|
|
1659
|
+
proxy.parent.formatter.process(proxy.parent, this.args, this.args.originalEvent, value);
|
|
1621
1660
|
}
|
|
1622
1661
|
};
|
|
1623
1662
|
Image.prototype.imgsizeInput = function (e) {
|
|
@@ -2385,7 +2424,9 @@ var Image = /** @class */ (function () {
|
|
|
2385
2424
|
if (imageElement) {
|
|
2386
2425
|
this.showImageQTbarTime = setTimeout(function () {
|
|
2387
2426
|
_this.showImageQuickToolbar(args);
|
|
2388
|
-
_this.
|
|
2427
|
+
if (_this.parent.insertImageSettings.resize) {
|
|
2428
|
+
_this.resizeStart(e.args, imageElement);
|
|
2429
|
+
}
|
|
2389
2430
|
}, 0);
|
|
2390
2431
|
}
|
|
2391
2432
|
};
|
|
@@ -2396,7 +2437,7 @@ var Image = /** @class */ (function () {
|
|
|
2396
2437
|
* @method destroy
|
|
2397
2438
|
* @returns {void}
|
|
2398
2439
|
* @hidden
|
|
2399
|
-
|
|
2440
|
+
* @deprecated
|
|
2400
2441
|
*/
|
|
2401
2442
|
/* eslint-enable */
|
|
2402
2443
|
Image.prototype.destroy = function () {
|
|
@@ -427,6 +427,9 @@ var Link = /** @class */ (function () {
|
|
|
427
427
|
if (document.body.contains(proxy.dialogObj.element)) {
|
|
428
428
|
this.selfLink.dialogObj.hide({ returnValue: false });
|
|
429
429
|
}
|
|
430
|
+
if (this.selfLink.dialogObj !== null) {
|
|
431
|
+
return;
|
|
432
|
+
}
|
|
430
433
|
if (isIDevice() && proxy.parent.iframeSettings.enable) {
|
|
431
434
|
select('iframe', proxy.parent.element).contentWindow.focus();
|
|
432
435
|
}
|
|
@@ -491,11 +494,15 @@ var Link = /** @class */ (function () {
|
|
|
491
494
|
Link.prototype.openLink = function (e) {
|
|
492
495
|
var selectParentEle = this.getAnchorNode(e.selectParent[0]);
|
|
493
496
|
if (selectParentEle.classList.contains('e-rte-anchor') || selectParentEle.tagName === 'A') {
|
|
497
|
+
var sanitizedHTML = this.parent.htmlEditorModule.sanitizeHelper(selectParentEle.outerHTML);
|
|
498
|
+
var tempEle = document.createElement('div');
|
|
499
|
+
tempEle.innerHTML = sanitizedHTML;
|
|
494
500
|
this.parent.formatter.process(this.parent, e.args, e.args, {
|
|
495
|
-
url:
|
|
501
|
+
url: tempEle.firstChild.href, text: selectParentEle.innerText,
|
|
496
502
|
target: selectParentEle.target === '' ? '_self' : '_blank', selectNode: e.selectNode,
|
|
497
503
|
subCommand: e.args.item.subCommand
|
|
498
504
|
});
|
|
505
|
+
tempEle.remove();
|
|
499
506
|
}
|
|
500
507
|
};
|
|
501
508
|
Link.prototype.getAnchorNode = function (element) {
|
|
@@ -554,7 +561,7 @@ var Link = /** @class */ (function () {
|
|
|
554
561
|
* @function destroy
|
|
555
562
|
* @returns {void}
|
|
556
563
|
* @hidden
|
|
557
|
-
|
|
564
|
+
* @deprecated
|
|
558
565
|
*/
|
|
559
566
|
Link.prototype.destroy = function () {
|
|
560
567
|
if (this.isDestroyed) {
|
|
@@ -3,7 +3,7 @@ import { IRenderer, IRichTextEditor } from '../base/interface';
|
|
|
3
3
|
* Markdown module is used to render Rich Text Editor as Markdown editor content
|
|
4
4
|
*
|
|
5
5
|
* @hidden
|
|
6
|
-
|
|
6
|
+
* @deprecated
|
|
7
7
|
*/
|
|
8
8
|
export declare class MarkdownRender implements IRenderer {
|
|
9
9
|
private contentPanel;
|
|
@@ -20,7 +20,7 @@ export declare class MarkdownRender implements IRenderer {
|
|
|
20
20
|
*
|
|
21
21
|
* @returns {void}
|
|
22
22
|
* @hidden
|
|
23
|
-
|
|
23
|
+
* @deprecated
|
|
24
24
|
*/
|
|
25
25
|
renderPanel(): void;
|
|
26
26
|
/**
|
|
@@ -28,7 +28,7 @@ export declare class MarkdownRender implements IRenderer {
|
|
|
28
28
|
*
|
|
29
29
|
* @returns {Element} - specifies the element
|
|
30
30
|
* @hidden
|
|
31
|
-
|
|
31
|
+
* @deprecated
|
|
32
32
|
*/
|
|
33
33
|
getPanel(): Element;
|
|
34
34
|
/**
|
|
@@ -36,7 +36,7 @@ export declare class MarkdownRender implements IRenderer {
|
|
|
36
36
|
*
|
|
37
37
|
* @returns {Element} - specifies the element
|
|
38
38
|
* @hidden
|
|
39
|
-
|
|
39
|
+
* @deprecated
|
|
40
40
|
*/
|
|
41
41
|
getEditPanel(): Element;
|
|
42
42
|
/**
|
|
@@ -51,7 +51,7 @@ export declare class MarkdownRender implements IRenderer {
|
|
|
51
51
|
* @param {Element} panel - specifies the element.
|
|
52
52
|
* @returns {void}
|
|
53
53
|
* @hidden
|
|
54
|
-
|
|
54
|
+
* @deprecated
|
|
55
55
|
*/
|
|
56
56
|
setPanel(panel: Element): void;
|
|
57
57
|
/**
|
|
@@ -59,7 +59,7 @@ export declare class MarkdownRender implements IRenderer {
|
|
|
59
59
|
*
|
|
60
60
|
* @returns {void}
|
|
61
61
|
* @hidden
|
|
62
|
-
|
|
62
|
+
* @deprecated
|
|
63
63
|
*/
|
|
64
64
|
getDocument(): Document;
|
|
65
65
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Markdown module is used to render Rich Text Editor as Markdown editor content
|
|
3
3
|
*
|
|
4
4
|
* @hidden
|
|
5
|
-
|
|
5
|
+
* @deprecated
|
|
6
6
|
*/
|
|
7
7
|
var MarkdownRender = /** @class */ (function () {
|
|
8
8
|
/**
|
|
@@ -18,7 +18,7 @@ var MarkdownRender = /** @class */ (function () {
|
|
|
18
18
|
*
|
|
19
19
|
* @returns {void}
|
|
20
20
|
* @hidden
|
|
21
|
-
|
|
21
|
+
* @deprecated
|
|
22
22
|
*/
|
|
23
23
|
MarkdownRender.prototype.renderPanel = function () {
|
|
24
24
|
var rteObj = this.parent;
|
|
@@ -37,7 +37,7 @@ var MarkdownRender = /** @class */ (function () {
|
|
|
37
37
|
*
|
|
38
38
|
* @returns {Element} - specifies the element
|
|
39
39
|
* @hidden
|
|
40
|
-
|
|
40
|
+
* @deprecated
|
|
41
41
|
*/
|
|
42
42
|
MarkdownRender.prototype.getPanel = function () {
|
|
43
43
|
return this.contentPanel;
|
|
@@ -47,7 +47,7 @@ var MarkdownRender = /** @class */ (function () {
|
|
|
47
47
|
*
|
|
48
48
|
* @returns {Element} - specifies the element
|
|
49
49
|
* @hidden
|
|
50
|
-
|
|
50
|
+
* @deprecated
|
|
51
51
|
*/
|
|
52
52
|
MarkdownRender.prototype.getEditPanel = function () {
|
|
53
53
|
return this.editableElement;
|
|
@@ -66,7 +66,7 @@ var MarkdownRender = /** @class */ (function () {
|
|
|
66
66
|
* @param {Element} panel - specifies the element.
|
|
67
67
|
* @returns {void}
|
|
68
68
|
* @hidden
|
|
69
|
-
|
|
69
|
+
* @deprecated
|
|
70
70
|
*/
|
|
71
71
|
MarkdownRender.prototype.setPanel = function (panel) {
|
|
72
72
|
this.contentPanel = panel;
|
|
@@ -76,7 +76,7 @@ var MarkdownRender = /** @class */ (function () {
|
|
|
76
76
|
*
|
|
77
77
|
* @returns {void}
|
|
78
78
|
* @hidden
|
|
79
|
-
|
|
79
|
+
* @deprecated
|
|
80
80
|
*/
|
|
81
81
|
MarkdownRender.prototype.getDocument = function () {
|
|
82
82
|
return this.getEditPanel().ownerDocument;
|
|
@@ -4,7 +4,7 @@ import { BaseQuickToolbar } from '../actions/base-quick-toolbar';
|
|
|
4
4
|
* `Popup renderer` module is used to render popup in RichTextEditor.
|
|
5
5
|
*
|
|
6
6
|
* @hidden
|
|
7
|
-
|
|
7
|
+
* @deprecated
|
|
8
8
|
*/
|
|
9
9
|
export declare class PopupRenderer implements IRenderer {
|
|
10
10
|
private popupObj;
|
|
@@ -23,7 +23,7 @@ export declare class PopupRenderer implements IRenderer {
|
|
|
23
23
|
* @param {BaseQuickToolbar} args - specifies the arguments.
|
|
24
24
|
* @returns {void}
|
|
25
25
|
* @hidden
|
|
26
|
-
|
|
26
|
+
* @deprecated
|
|
27
27
|
*/
|
|
28
28
|
renderPopup(args: BaseQuickToolbar): void;
|
|
29
29
|
/**
|
|
@@ -31,7 +31,7 @@ export declare class PopupRenderer implements IRenderer {
|
|
|
31
31
|
*
|
|
32
32
|
* @returns {void}
|
|
33
33
|
* @hidden
|
|
34
|
-
|
|
34
|
+
* @deprecated
|
|
35
35
|
*/
|
|
36
36
|
renderPanel(): void;
|
|
37
37
|
/**
|
|
@@ -39,7 +39,7 @@ export declare class PopupRenderer implements IRenderer {
|
|
|
39
39
|
*
|
|
40
40
|
* @returns {Element} - specifies the element
|
|
41
41
|
* @hidden
|
|
42
|
-
|
|
42
|
+
* @deprecated
|
|
43
43
|
*/
|
|
44
44
|
getPanel(): Element;
|
|
45
45
|
/**
|
|
@@ -48,7 +48,7 @@ export declare class PopupRenderer implements IRenderer {
|
|
|
48
48
|
* @returns {void}
|
|
49
49
|
* @param {Element} panel - specifies the element
|
|
50
50
|
* @hidden
|
|
51
|
-
|
|
51
|
+
* @deprecated
|
|
52
52
|
*/
|
|
53
53
|
setPanel(panel: Element): void;
|
|
54
54
|
}
|
|
@@ -5,7 +5,7 @@ import * as events from '../base/constant';
|
|
|
5
5
|
* `Popup renderer` module is used to render popup in RichTextEditor.
|
|
6
6
|
*
|
|
7
7
|
* @hidden
|
|
8
|
-
|
|
8
|
+
* @deprecated
|
|
9
9
|
*/
|
|
10
10
|
var PopupRenderer = /** @class */ (function () {
|
|
11
11
|
/**
|
|
@@ -26,7 +26,7 @@ var PopupRenderer = /** @class */ (function () {
|
|
|
26
26
|
* @param {BaseQuickToolbar} args - specifies the arguments.
|
|
27
27
|
* @returns {void}
|
|
28
28
|
* @hidden
|
|
29
|
-
|
|
29
|
+
* @deprecated
|
|
30
30
|
*/
|
|
31
31
|
PopupRenderer.prototype.renderPopup = function (args) {
|
|
32
32
|
this.setPanel(args.element);
|
|
@@ -44,7 +44,7 @@ var PopupRenderer = /** @class */ (function () {
|
|
|
44
44
|
*
|
|
45
45
|
* @returns {void}
|
|
46
46
|
* @hidden
|
|
47
|
-
|
|
47
|
+
* @deprecated
|
|
48
48
|
*/
|
|
49
49
|
PopupRenderer.prototype.renderPanel = function () {
|
|
50
50
|
this.getPanel().classList.add(CLS_QUICK_POP);
|
|
@@ -54,7 +54,7 @@ var PopupRenderer = /** @class */ (function () {
|
|
|
54
54
|
*
|
|
55
55
|
* @returns {Element} - specifies the element
|
|
56
56
|
* @hidden
|
|
57
|
-
|
|
57
|
+
* @deprecated
|
|
58
58
|
*/
|
|
59
59
|
PopupRenderer.prototype.getPanel = function () {
|
|
60
60
|
return this.popupPanel;
|
|
@@ -65,7 +65,7 @@ var PopupRenderer = /** @class */ (function () {
|
|
|
65
65
|
* @returns {void}
|
|
66
66
|
* @param {Element} panel - specifies the element
|
|
67
67
|
* @hidden
|
|
68
|
-
|
|
68
|
+
* @deprecated
|
|
69
69
|
*/
|
|
70
70
|
PopupRenderer.prototype.setPanel = function (panel) {
|
|
71
71
|
this.popupPanel = panel;
|
|
@@ -4,7 +4,7 @@ import { ServiceLocator } from '../services/service-locator';
|
|
|
4
4
|
* Content module is used to render Rich Text Editor content
|
|
5
5
|
*
|
|
6
6
|
* @hidden
|
|
7
|
-
|
|
7
|
+
* @deprecated
|
|
8
8
|
*/
|
|
9
9
|
export declare class Render {
|
|
10
10
|
private parent;
|
|
@@ -24,7 +24,7 @@ export declare class Render {
|
|
|
24
24
|
*
|
|
25
25
|
* @returns {void}
|
|
26
26
|
* @hidden
|
|
27
|
-
|
|
27
|
+
* @deprecated
|
|
28
28
|
*/
|
|
29
29
|
render(): void;
|
|
30
30
|
/**
|
|
@@ -5,7 +5,7 @@ import { isNullOrUndefined } from '@syncfusion/ej2-base';
|
|
|
5
5
|
* Content module is used to render Rich Text Editor content
|
|
6
6
|
*
|
|
7
7
|
* @hidden
|
|
8
|
-
|
|
8
|
+
* @deprecated
|
|
9
9
|
*/
|
|
10
10
|
var Render = /** @class */ (function () {
|
|
11
11
|
/**
|
|
@@ -26,7 +26,7 @@ var Render = /** @class */ (function () {
|
|
|
26
26
|
*
|
|
27
27
|
* @returns {void}
|
|
28
28
|
* @hidden
|
|
29
|
-
|
|
29
|
+
* @deprecated
|
|
30
30
|
*/
|
|
31
31
|
Render.prototype.render = function () {
|
|
32
32
|
// eslint-disable-next-line
|
|
@@ -9,7 +9,7 @@ var SlashMenu = /** @class */ (function () {
|
|
|
9
9
|
this.parent = options;
|
|
10
10
|
this.currentDocument = this.parent.element.ownerDocument;
|
|
11
11
|
this.L10n = serviceLocator.getService('rteLocale');
|
|
12
|
-
this.savedSelection = new NodeSelection();
|
|
12
|
+
this.savedSelection = new NodeSelection(this.parent.inputElement);
|
|
13
13
|
this.defaultItems = defaultSlashMenuDataModel;
|
|
14
14
|
this.injectibleItems = injectibleSlashMenuDataModel;
|
|
15
15
|
this.parent.on(events.modelChanged, this.onPropertyChanged, this);
|
|
@@ -1419,7 +1419,8 @@ var Table = /** @class */ (function () {
|
|
|
1419
1419
|
else {
|
|
1420
1420
|
var tableReBox = _this.contentModule.getEditPanel().querySelector('.e-table-box');
|
|
1421
1421
|
var tableWidth = parseInt(getComputedStyle(_this.curTable).width, 10);
|
|
1422
|
-
var tableHeight = parseInt(
|
|
1422
|
+
var tableHeight = !isNaN(parseInt(_this.curTable.style.height, 10)) ?
|
|
1423
|
+
parseInt(_this.curTable.style.height, 10) : parseInt(getComputedStyle(_this.curTable).height, 10);
|
|
1423
1424
|
var paddingSize = +getComputedStyle(_this.contentModule.getEditPanel()).paddingRight.match(/\d/g).join('');
|
|
1424
1425
|
var rteWidth = _this.contentModule.getEditPanel().offsetWidth -
|
|
1425
1426
|
(_this.contentModule.getEditPanel().offsetWidth -
|
|
@@ -1564,7 +1565,7 @@ var Table = /** @class */ (function () {
|
|
|
1564
1565
|
_this.curTable.style.height = tableHeight + mouseY + 'px';
|
|
1565
1566
|
if (!isNOU(tableReBox)) {
|
|
1566
1567
|
tableReBox.classList.add('e-rbox-select');
|
|
1567
|
-
tableReBox.style.cssText = 'top: ' + (_this.calcPos(_this.curTable).top +
|
|
1568
|
+
tableReBox.style.cssText = 'top: ' + (_this.calcPos(_this.curTable).top + parseInt(getComputedStyle(_this.curTable).height, 10) - 4) +
|
|
1568
1569
|
'px; left:' + (_this.calcPos(_this.curTable).left + tableWidth - 4) + 'px;';
|
|
1569
1570
|
}
|
|
1570
1571
|
if (_this.curTable.closest('li')) {
|
|
@@ -2133,7 +2134,7 @@ var Table = /** @class */ (function () {
|
|
|
2133
2134
|
* @function destroy
|
|
2134
2135
|
* @returns {void}
|
|
2135
2136
|
* @hidden
|
|
2136
|
-
|
|
2137
|
+
* @deprecated
|
|
2137
2138
|
*/
|
|
2138
2139
|
Table.prototype.destroy = function () {
|
|
2139
2140
|
if (this.isDestroyed) {
|