@syncfusion/ej2-richtexteditor 24.2.9 → 25.1.37
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/CHANGELOG.md +32 -0
- package/dist/ej2-richtexteditor.min.js +2 -2
- package/dist/ej2-richtexteditor.umd.min.js +2 -2
- package/dist/ej2-richtexteditor.umd.min.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es2015.js +936 -500
- package/dist/es6/ej2-richtexteditor.es2015.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es5.js +921 -490
- package/dist/es6/ej2-richtexteditor.es5.js.map +1 -1
- package/dist/global/ej2-richtexteditor.min.js +2 -2
- package/dist/global/ej2-richtexteditor.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +13 -13
- package/src/common/config.d.ts +7 -0
- package/src/common/config.js +11 -0
- package/src/common/interface.d.ts +12 -0
- package/src/common/types.d.ts +6 -0
- package/src/editor-manager/plugin/dom-node.d.ts +5 -1
- package/src/editor-manager/plugin/dom-node.js +163 -13
- package/src/editor-manager/plugin/formats.js +1 -1
- package/src/editor-manager/plugin/image.js +12 -16
- package/src/editor-manager/plugin/inserthtml.d.ts +1 -0
- package/src/editor-manager/plugin/inserthtml.js +31 -0
- package/src/editor-manager/plugin/link.js +1 -1
- package/src/editor-manager/plugin/lists.js +36 -2
- package/src/editor-manager/plugin/ms-word-clean-up.js +67 -59
- package/src/editor-manager/plugin/selection-commands.js +56 -3
- package/src/editor-manager/plugin/table.js +18 -3
- package/src/editor-manager/plugin/toolbar-status.d.ts +2 -2
- package/src/editor-manager/plugin/toolbar-status.js +17 -9
- package/src/rich-text-editor/actions/base-quick-toolbar.d.ts +3 -3
- package/src/rich-text-editor/actions/base-quick-toolbar.js +41 -10
- package/src/rich-text-editor/actions/base-toolbar.js +24 -30
- package/src/rich-text-editor/actions/dropdown-buttons.js +4 -4
- package/src/rich-text-editor/actions/emoji-picker.js +1 -1
- package/src/rich-text-editor/actions/enter-key.js +2 -1
- package/src/rich-text-editor/actions/full-screen.js +2 -2
- package/src/rich-text-editor/actions/html-editor.d.ts +0 -2
- package/src/rich-text-editor/actions/html-editor.js +8 -26
- package/src/rich-text-editor/actions/markdown-editor.js +3 -1
- package/src/rich-text-editor/actions/paste-clean-up.d.ts +1 -0
- package/src/rich-text-editor/actions/paste-clean-up.js +23 -0
- package/src/rich-text-editor/actions/quick-toolbar.d.ts +7 -0
- package/src/rich-text-editor/actions/quick-toolbar.js +23 -8
- package/src/rich-text-editor/actions/resize.js +2 -1
- package/src/rich-text-editor/actions/toolbar.d.ts +0 -2
- package/src/rich-text-editor/actions/toolbar.js +13 -85
- package/src/rich-text-editor/base/classes.d.ts +0 -5
- package/src/rich-text-editor/base/classes.js +0 -5
- package/src/rich-text-editor/base/constant.d.ts +5 -0
- package/src/rich-text-editor/base/constant.js +5 -0
- package/src/rich-text-editor/base/interface.d.ts +36 -2
- package/src/rich-text-editor/base/rich-text-editor-model.d.ts +2 -2
- package/src/rich-text-editor/base/rich-text-editor.d.ts +4 -3
- package/src/rich-text-editor/base/rich-text-editor.js +83 -62
- package/src/rich-text-editor/base/util.js +8 -2
- package/src/rich-text-editor/models/default-locale.js +15 -12
- package/src/rich-text-editor/models/toolbar-settings-model.d.ts +1 -1
- package/src/rich-text-editor/models/toolbar-settings.d.ts +1 -1
- package/src/rich-text-editor/models/toolbar-settings.js +1 -1
- package/src/rich-text-editor/renderer/iframe-content-renderer.js +2 -1
- package/src/rich-text-editor/renderer/image-module.d.ts +8 -1
- package/src/rich-text-editor/renderer/image-module.js +148 -155
- package/src/rich-text-editor/renderer/table-module.d.ts +2 -0
- package/src/rich-text-editor/renderer/table-module.js +71 -8
- package/src/rich-text-editor/renderer/toolbar-renderer.d.ts +3 -0
- package/src/rich-text-editor/renderer/toolbar-renderer.js +68 -11
- package/src/rich-text-editor/renderer/video-module.js +7 -4
- package/src/rich-text-editor/renderer/view-source.js +7 -4
- package/styles/bootstrap-dark.css +61 -17
- package/styles/bootstrap.css +62 -18
- package/styles/bootstrap4.css +62 -18
- package/styles/bootstrap5-dark.css +68 -17
- package/styles/bootstrap5.css +68 -17
- package/styles/fabric-dark.css +61 -17
- package/styles/fabric.css +62 -18
- package/styles/fluent-dark.css +61 -17
- package/styles/fluent.css +61 -17
- package/styles/highcontrast-light.css +61 -17
- package/styles/highcontrast.css +62 -18
- package/styles/material-dark.css +61 -17
- package/styles/material.css +61 -17
- package/styles/material3-dark.css +63 -19
- package/styles/material3.css +63 -19
- package/styles/rich-text-editor/_bds-definition.scss +279 -0
- package/styles/rich-text-editor/_bootstrap-dark-definition.scss +1 -0
- package/styles/rich-text-editor/_bootstrap-definition.scss +1 -1
- package/styles/rich-text-editor/_bootstrap4-definition.scss +3 -2
- package/styles/rich-text-editor/_bootstrap5-definition.scss +1 -0
- package/styles/rich-text-editor/_fabric-dark-definition.scss +1 -0
- package/styles/rich-text-editor/_fabric-definition.scss +2 -1
- package/styles/rich-text-editor/_fluent-definition.scss +1 -0
- package/styles/rich-text-editor/_fusionnew-definition.scss +1 -0
- package/styles/rich-text-editor/_highcontrast-definition.scss +2 -1
- package/styles/rich-text-editor/_highcontrast-light-definition.scss +1 -0
- package/styles/rich-text-editor/_layout.scss +51 -17
- package/styles/rich-text-editor/_material-dark-definition.scss +1 -0
- package/styles/rich-text-editor/_material-definition.scss +1 -0
- package/styles/rich-text-editor/_material3-definition.scss +1 -0
- package/styles/rich-text-editor/_tailwind-definition.scss +4 -3
- package/styles/rich-text-editor/_theme.scss +18 -5
- package/styles/rich-text-editor/bootstrap-dark.css +61 -17
- package/styles/rich-text-editor/bootstrap.css +62 -18
- package/styles/rich-text-editor/bootstrap4.css +62 -18
- package/styles/rich-text-editor/bootstrap5-dark.css +68 -17
- package/styles/rich-text-editor/bootstrap5.css +68 -17
- package/styles/rich-text-editor/fabric-dark.css +61 -17
- package/styles/rich-text-editor/fabric.css +62 -18
- package/styles/rich-text-editor/fluent-dark.css +61 -17
- package/styles/rich-text-editor/fluent.css +61 -17
- package/styles/rich-text-editor/highcontrast-light.css +61 -17
- package/styles/rich-text-editor/highcontrast.css +62 -18
- package/styles/rich-text-editor/icons/_bds.scss +351 -0
- package/styles/rich-text-editor/icons/_bootstrap-dark.scss +7 -4
- package/styles/rich-text-editor/icons/_bootstrap.scss +7 -4
- package/styles/rich-text-editor/icons/_bootstrap4.scss +7 -4
- package/styles/rich-text-editor/icons/_bootstrap5.scss +7 -4
- package/styles/rich-text-editor/icons/_fabric-dark.scss +7 -4
- package/styles/rich-text-editor/icons/_fabric.scss +7 -4
- package/styles/rich-text-editor/icons/_fluent.scss +7 -4
- package/styles/rich-text-editor/icons/_highcontrast-light.scss +7 -4
- package/styles/rich-text-editor/icons/_highcontrast.scss +7 -4
- package/styles/rich-text-editor/icons/_material-dark.scss +7 -4
- package/styles/rich-text-editor/icons/_material.scss +7 -4
- package/styles/rich-text-editor/icons/_material3.scss +7 -4
- package/styles/rich-text-editor/icons/_tailwind.scss +7 -4
- package/styles/rich-text-editor/material-dark.css +61 -17
- package/styles/rich-text-editor/material.css +61 -17
- package/styles/rich-text-editor/material3-dark.css +63 -19
- package/styles/rich-text-editor/material3.css +63 -19
- package/styles/rich-text-editor/tailwind-dark.css +65 -25
- package/styles/rich-text-editor/tailwind.css +65 -25
- package/styles/tailwind-dark.css +65 -25
- package/styles/tailwind.css +65 -25
|
@@ -28,7 +28,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
28
28
|
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;
|
|
29
29
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
30
30
|
};
|
|
31
|
-
import { Component, EventHandler, Complex, Browser, addClass,
|
|
31
|
+
import { Component, EventHandler, Complex, Browser, addClass, detach } from '@syncfusion/ej2-base';
|
|
32
32
|
import { Property, NotifyPropertyChanges, formatUnit, L10n, closest } from '@syncfusion/ej2-base';
|
|
33
33
|
import { setStyleAttribute, Event, removeClass, print as printWindow, attributes } from '@syncfusion/ej2-base';
|
|
34
34
|
import { isNullOrUndefined as isNOU, compile, append, extend, debounce } from '@syncfusion/ej2-base';
|
|
@@ -97,6 +97,14 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
97
97
|
member: 'image',
|
|
98
98
|
args: [this, this.serviceLocator]
|
|
99
99
|
});
|
|
100
|
+
modules.push({
|
|
101
|
+
member: 'audio',
|
|
102
|
+
args: [this, this.serviceLocator]
|
|
103
|
+
});
|
|
104
|
+
modules.push({
|
|
105
|
+
member: 'video',
|
|
106
|
+
args: [this, this.serviceLocator]
|
|
107
|
+
});
|
|
100
108
|
if (this.quickToolbarSettings.enable) {
|
|
101
109
|
modules.push({ member: 'quickToolbar', args: [this, this.serviceLocator] });
|
|
102
110
|
}
|
|
@@ -110,14 +118,6 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
110
118
|
if (this.editorMode === 'HTML') {
|
|
111
119
|
modules.push({ member: 'htmlEditor', args: [this, this.serviceLocator] });
|
|
112
120
|
modules.push({ member: 'pasteCleanup', args: [this, this.serviceLocator] });
|
|
113
|
-
modules.push({
|
|
114
|
-
member: 'audio',
|
|
115
|
-
args: [this, this.serviceLocator]
|
|
116
|
-
});
|
|
117
|
-
modules.push({
|
|
118
|
-
member: 'video',
|
|
119
|
-
args: [this, this.serviceLocator]
|
|
120
|
-
});
|
|
121
121
|
modules.push({
|
|
122
122
|
member: 'formatPainter',
|
|
123
123
|
args: [this]
|
|
@@ -149,7 +149,7 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
149
149
|
else {
|
|
150
150
|
if (this.getToolbar()) {
|
|
151
151
|
removeClass(this.getToolbar().querySelectorAll('.' + classes.CLS_ACTIVE), classes.CLS_ACTIVE);
|
|
152
|
-
removeClass([this.getToolbar()], [classes.CLS_TB_FLOAT
|
|
152
|
+
removeClass([this.getToolbar().parentElement], [classes.CLS_TB_FLOAT]);
|
|
153
153
|
}
|
|
154
154
|
addClass([this.element], classes.CLS_DISABLED);
|
|
155
155
|
this.element.tabIndex = -1;
|
|
@@ -570,7 +570,7 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
570
570
|
(this.toolbarSettings.items.indexOf('Undo') > -1 && this.toolbarSettings.items.indexOf('Redo') > -1)) {
|
|
571
571
|
this.disableToolbarItem(['Undo', 'Redo']);
|
|
572
572
|
}
|
|
573
|
-
this.setContentHeight();
|
|
573
|
+
this.setContentHeight('Init');
|
|
574
574
|
if (this.value !== null) {
|
|
575
575
|
this.valueContainer.defaultValue = this.value;
|
|
576
576
|
}
|
|
@@ -776,8 +776,15 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
776
776
|
case 'toolbar-focus':
|
|
777
777
|
if (this.toolbarSettings.enable && this.getToolbarElement()) {
|
|
778
778
|
var firstActiveItem = this.getToolbarElement().querySelector('.e-toolbar-item:not(.e-overlay)[title]');
|
|
779
|
-
|
|
780
|
-
|
|
779
|
+
var quickToolbarElem = this.getRenderedQuickToolbarElem();
|
|
780
|
+
if (quickToolbarElem) {
|
|
781
|
+
firstActiveItem = quickToolbarElem.querySelector('.e-toolbar-item:not(.e-overlay)[title]');
|
|
782
|
+
}
|
|
783
|
+
if (firstActiveItem) {
|
|
784
|
+
var firstChild = firstActiveItem.firstElementChild;
|
|
785
|
+
firstChild.removeAttribute('tabindex');
|
|
786
|
+
firstChild.focus();
|
|
787
|
+
}
|
|
781
788
|
}
|
|
782
789
|
break;
|
|
783
790
|
case 'escape':
|
|
@@ -994,6 +1001,7 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
994
1001
|
_this.notify(events.pasteClean, { args: e });
|
|
995
1002
|
}
|
|
996
1003
|
else {
|
|
1004
|
+
console.warn('[WARNING] :: Module "pasteCleanup" is not available in RichTextEditor component! You either misspelled the module name or forgot to load it.');
|
|
997
1005
|
var args_2 = { requestType: 'Paste', editorMode: _this.editorMode, event: e };
|
|
998
1006
|
var value = null;
|
|
999
1007
|
var htmlValue = false;
|
|
@@ -1288,7 +1296,7 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
1288
1296
|
break;
|
|
1289
1297
|
case 'height':
|
|
1290
1298
|
this.setHeight(newProp[prop]);
|
|
1291
|
-
this.setContentHeight();
|
|
1299
|
+
this.setContentHeight('Init');
|
|
1292
1300
|
this.autoResize();
|
|
1293
1301
|
break;
|
|
1294
1302
|
case 'readonly':
|
|
@@ -1335,11 +1343,11 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
1335
1343
|
break;
|
|
1336
1344
|
case 'inlineMode':
|
|
1337
1345
|
this.notify(events.modelChanged, { module: 'quickToolbar', newProp: newProp, oldProp: oldProp });
|
|
1338
|
-
this.setContentHeight();
|
|
1346
|
+
this.setContentHeight('Init');
|
|
1339
1347
|
break;
|
|
1340
1348
|
case 'toolbarSettings':
|
|
1341
1349
|
this.notify(events.modelChanged, { module: 'toolbar', newProp: newProp, oldProp: oldProp });
|
|
1342
|
-
this.setContentHeight();
|
|
1350
|
+
this.setContentHeight('Init');
|
|
1343
1351
|
break;
|
|
1344
1352
|
case 'maxLength':
|
|
1345
1353
|
if (this.showCharCount) {
|
|
@@ -1498,7 +1506,7 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
1498
1506
|
this.inputElement.setAttribute('placeholder', this.placeholder);
|
|
1499
1507
|
}
|
|
1500
1508
|
}
|
|
1501
|
-
if (this.placeholder && this.iframeSettings.enable) {
|
|
1509
|
+
if (this.placeholder && this.iframeSettings.enable && this.inputElement) {
|
|
1502
1510
|
if (this.inputElement.textContent.length === 0 && this.inputElement.childNodes.length < 2 && !isNOU(this.inputElement.firstChild) && (this.inputElement.firstChild.nodeName === 'BR' ||
|
|
1503
1511
|
((this.inputElement.firstChild.nodeName === 'P' || this.inputElement.firstChild.nodeName === 'DIV') && !isNOU(this.inputElement.firstChild.firstChild) &&
|
|
1504
1512
|
this.inputElement.firstChild.firstChild.nodeName === 'BR'))) {
|
|
@@ -1845,12 +1853,9 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
1845
1853
|
*/
|
|
1846
1854
|
RichTextEditor.prototype.setContentHeight = function (target, isExpand) {
|
|
1847
1855
|
var heightValue;
|
|
1848
|
-
var topValue = 0;
|
|
1849
1856
|
var rteHeightPercent;
|
|
1850
1857
|
var heightPercent = typeof (this.height) === 'string' && this.height.indexOf('%') > -1;
|
|
1851
|
-
var cntEle =
|
|
1852
|
-
this.sourceCodeModule.getPanel().parentElement.style.display === 'block') ? this.sourceCodeModule.getPanel().parentElement :
|
|
1853
|
-
this.contentModule.getPanel();
|
|
1858
|
+
var cntEle = this.contentModule.getPanel();
|
|
1854
1859
|
var rteHeight = this.element.offsetHeight;
|
|
1855
1860
|
if (rteHeight === 0 && this.height !== 'auto' && !this.getToolbar()) {
|
|
1856
1861
|
rteHeight = parseInt(this.height, 10);
|
|
@@ -1862,39 +1867,36 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
1862
1867
|
var rzHandle = this.element.querySelector('.' + classes.CLS_RTE_RES_HANDLE);
|
|
1863
1868
|
var rzHeight = this.enableResize ? (!isNOU(rzHandle) ? (rzHandle.offsetHeight + 8) : 0) : 0;
|
|
1864
1869
|
var expandPopHeight = this.getToolbar() ? this.toolbarModule.getExpandTBarPopHeight() : 0;
|
|
1865
|
-
if (this.
|
|
1866
|
-
|
|
1867
|
-
topValue = (!this.toolbarSettings.enableFloating) ? expandPopHeight : 0;
|
|
1870
|
+
if (target && target !== 'Toolbar' && expandPopHeight && this.element.querySelectorAll('.e-toolbar-extended.e-popup-open').length > 0) {
|
|
1871
|
+
tbHeight = tbHeight - expandPopHeight;
|
|
1868
1872
|
}
|
|
1869
|
-
|
|
1870
|
-
if (
|
|
1871
|
-
heightValue = 'auto';
|
|
1873
|
+
if (this.toolbarSettings.type === ToolbarType.Expand) {
|
|
1874
|
+
if (isExpand) {
|
|
1875
|
+
heightValue = (this.height === 'auto' && this.element.style.height === 'auto') ? 'auto' : rteHeight - (tbHeight + expandPopHeight + rzHeight) + 'px';
|
|
1872
1876
|
}
|
|
1873
1877
|
else {
|
|
1874
|
-
heightValue =
|
|
1878
|
+
heightValue = (this.height === 'auto' && this.element.style.height === 'auto') ? 'auto' : rteHeight - (tbHeight - expandPopHeight + rzHeight) + 'px';
|
|
1875
1879
|
}
|
|
1876
1880
|
}
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
+
else {
|
|
1882
|
+
heightValue = (this.height === 'auto' && this.element.style.height === 'auto') ? 'auto' : rteHeight - tbHeight + 'px';
|
|
1883
|
+
}
|
|
1884
|
+
var finalHeight = heightPercent && rteHeightPercent ? rteHeightPercent : heightValue;
|
|
1885
|
+
switch (target) {
|
|
1886
|
+
case 'Init':
|
|
1887
|
+
case 'Toolbar':
|
|
1888
|
+
case 'WindowResize':
|
|
1889
|
+
case 'Refresh':
|
|
1890
|
+
if (this.element.querySelectorAll('.e-source-content').length > 0 && this.element.querySelector('.e-source-content').style.display === 'block') {
|
|
1891
|
+
setStyleAttribute(this.element.querySelector('.e-source-content'), { height: finalHeight });
|
|
1881
1892
|
}
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
if (target === 'windowResize' && heightPercent) {
|
|
1885
|
-
//cntEle hide the borderBottom of RichTextEditor. so removed the 2px of cntEle height.
|
|
1886
|
-
heightValue = parseInt(heightValue, 10) - 2 + 'px';
|
|
1893
|
+
else {
|
|
1894
|
+
setStyleAttribute(cntEle, { height: finalHeight });
|
|
1887
1895
|
}
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
var codeElement = select('.' + classes.CLS_RTE_CONTENT, this.element);
|
|
1893
|
-
setStyleAttribute(codeElement, { height: heightValue, marginTop: topValue + 'px' });
|
|
1894
|
-
}
|
|
1895
|
-
if (this.toolbarSettings.enableFloating && this.getToolbar() && !this.inlineMode.enable) {
|
|
1896
|
-
var tbWrapHeight = (isExpand ? (tbHeight + expandPopHeight) : tbHeight) + 'px';
|
|
1897
|
-
setStyleAttribute(this.getToolbar().parentElement, { height: tbWrapHeight });
|
|
1896
|
+
break;
|
|
1897
|
+
case 'Resize':
|
|
1898
|
+
setStyleAttribute(cntEle, { height: finalHeight });
|
|
1899
|
+
break;
|
|
1898
1900
|
}
|
|
1899
1901
|
if (rzHeight === 0) {
|
|
1900
1902
|
this.autoResize();
|
|
@@ -2097,18 +2099,14 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
2097
2099
|
RichTextEditor.prototype.resizeHandler = function () {
|
|
2098
2100
|
var isExpand = false;
|
|
2099
2101
|
if (!document.body.contains(this.element)) {
|
|
2100
|
-
document.defaultView.removeEventListener('resize', this.onResizeHandler, true);
|
|
2102
|
+
document.defaultView.removeEventListener('resize', debounce(this.onResizeHandler, 10), true);
|
|
2101
2103
|
return;
|
|
2102
2104
|
}
|
|
2103
2105
|
if (this.toolbarSettings.enable && !this.inlineMode.enable) {
|
|
2104
2106
|
this.toolbarModule.refreshToolbarOverflow();
|
|
2105
2107
|
isExpand = this.toolbarModule.baseToolbar.toolbarObj.element.classList.contains(classes.CLS_EXPAND_OPEN);
|
|
2106
2108
|
}
|
|
2107
|
-
|
|
2108
|
-
// When resize the window,border bottom of cntEle and this.element border visible separatly.so none the cntEle borderBottom.
|
|
2109
|
-
this.contentModule.getPanel().style.borderBottom = 'none';
|
|
2110
|
-
}
|
|
2111
|
-
this.setContentHeight('windowResize', isExpand);
|
|
2109
|
+
this.setContentHeight('WindowResize', isExpand);
|
|
2112
2110
|
this.notify(events.windowResize, null);
|
|
2113
2111
|
};
|
|
2114
2112
|
RichTextEditor.prototype.scrollHandler = function (e) {
|
|
@@ -2244,6 +2242,10 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
2244
2242
|
this.isRTE = false;
|
|
2245
2243
|
}
|
|
2246
2244
|
this.notify(events.docClick, { args: e });
|
|
2245
|
+
var hideQuickToolbarChecker = this.quickToolbarModule && !this.inlineMode.enable && isNOU(this.quickToolbarModule.inlineQTBar);
|
|
2246
|
+
if ((hideQuickToolbarChecker && !isNOU(closest(target, '.' + 'e-toolbar-wrapper'))) || (hideQuickToolbarChecker && (!isNOU(closest(target, '.e-rte-table-resize')) || !isNOU(closest(target, '.e-table-box'))))) {
|
|
2247
|
+
this.quickToolbarModule.hideQuickToolbars();
|
|
2248
|
+
}
|
|
2247
2249
|
if (Browser.info.name !== 'msie' && e.detail > 3) {
|
|
2248
2250
|
e.preventDefault();
|
|
2249
2251
|
}
|
|
@@ -2393,9 +2395,10 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
2393
2395
|
this.triggerEditArea(e.originalEvent);
|
|
2394
2396
|
};
|
|
2395
2397
|
RichTextEditor.prototype.contextHandler = function (e) {
|
|
2396
|
-
var closestElem = closest(e.target, 'a, table, img');
|
|
2398
|
+
var closestElem = closest(e.target, 'a, table, img, video, audio');
|
|
2397
2399
|
if (this.inlineMode.onSelection === false || (!isNOU(closestElem) && this.inputElement.contains(closestElem)
|
|
2398
|
-
&& (closestElem.tagName === 'IMG' || closestElem.tagName === 'TABLE' || closestElem.tagName === 'A'
|
|
2400
|
+
&& (closestElem.tagName === 'IMG' || closestElem.tagName === 'TABLE' || closestElem.tagName === 'A' ||
|
|
2401
|
+
closestElem.tagName.toLowerCase() === 'video' || closestElem.tagName.toLowerCase() === 'audio'))) {
|
|
2399
2402
|
e.preventDefault();
|
|
2400
2403
|
}
|
|
2401
2404
|
};
|
|
@@ -2417,10 +2420,8 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
2417
2420
|
}, 0);
|
|
2418
2421
|
}
|
|
2419
2422
|
else if (this.iframeSettings.enable) {
|
|
2420
|
-
var
|
|
2421
|
-
|
|
2422
|
-
_this.setAutoHeight(iframeElement_1);
|
|
2423
|
-
}, 100);
|
|
2423
|
+
var iframeElement = this.element.querySelector('#' + this.getID() + '_rte-view');
|
|
2424
|
+
this.setAutoHeight(iframeElement);
|
|
2424
2425
|
this.inputElement.style.overflow = 'hidden';
|
|
2425
2426
|
}
|
|
2426
2427
|
}
|
|
@@ -2429,10 +2430,21 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
2429
2430
|
}
|
|
2430
2431
|
};
|
|
2431
2432
|
RichTextEditor.prototype.setAutoHeight = function (element) {
|
|
2432
|
-
if (!isNOU(element)) {
|
|
2433
|
+
if (!isNOU(element) && !this.iframeSettings.enable) {
|
|
2433
2434
|
element.style.height = this.inputElement.scrollHeight + 'px';
|
|
2434
2435
|
element.style.overflow = 'hidden';
|
|
2435
2436
|
}
|
|
2437
|
+
else if (!isNOU(element) && !isNOU(element.parentElement) && this.iframeSettings.enable) {
|
|
2438
|
+
var newRange = this.getRange();
|
|
2439
|
+
element.style.height = 'auto';
|
|
2440
|
+
var newHeight = element.contentDocument.body.scrollHeight + 'px';
|
|
2441
|
+
element.style.height = newHeight;
|
|
2442
|
+
element.style.overflow = 'hidden';
|
|
2443
|
+
// 16 px added for padding doesn't affect the editor height
|
|
2444
|
+
if (newRange.startContainer.nodeName !== '#text' && newRange.startContainer.nodeName !== 'BODY' && window.innerHeight < newRange.startContainer.getBoundingClientRect().top + element.getBoundingClientRect().top + 16) {
|
|
2445
|
+
newRange.startContainer.scrollIntoView(false);
|
|
2446
|
+
}
|
|
2447
|
+
}
|
|
2436
2448
|
};
|
|
2437
2449
|
RichTextEditor.prototype.wireEvents = function () {
|
|
2438
2450
|
this.element.addEventListener('focusin', this.onFocusHandler, true);
|
|
@@ -2487,7 +2499,7 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
2487
2499
|
EventHandler.add(this.inputElement, Browser.touchStartEvent, this.mouseDownHandler, this);
|
|
2488
2500
|
this.wireContextEvent();
|
|
2489
2501
|
this.formatter.editorManager.observer.on(CONSTANT.KEY_DOWN_HANDLER, this.editorKeyDown, this);
|
|
2490
|
-
this.element.ownerDocument.defaultView.addEventListener('resize', this.onResizeHandler, true);
|
|
2502
|
+
this.element.ownerDocument.defaultView.addEventListener('resize', debounce(this.onResizeHandler, 10), true);
|
|
2491
2503
|
if (this.iframeSettings.enable) {
|
|
2492
2504
|
EventHandler.add(this.inputElement, 'focusin', this.focusHandler, this);
|
|
2493
2505
|
EventHandler.add(this.inputElement, 'focusout', this.blurHandler, this);
|
|
@@ -2553,7 +2565,7 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
2553
2565
|
if (this.formatter) {
|
|
2554
2566
|
this.formatter.editorManager.observer.off(CONSTANT.KEY_DOWN_HANDLER, this.editorKeyDown);
|
|
2555
2567
|
}
|
|
2556
|
-
this.element.ownerDocument.defaultView.removeEventListener('resize', this.onResizeHandler, true);
|
|
2568
|
+
this.element.ownerDocument.defaultView.removeEventListener('resize', debounce(this.onResizeHandler, 10), true);
|
|
2557
2569
|
if (this.iframeSettings.enable) {
|
|
2558
2570
|
EventHandler.remove(this.inputElement, 'focusin', this.focusHandler);
|
|
2559
2571
|
EventHandler.remove(this.inputElement, 'focusout', this.blurHandler);
|
|
@@ -2618,6 +2630,15 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
2618
2630
|
}
|
|
2619
2631
|
}
|
|
2620
2632
|
};
|
|
2633
|
+
RichTextEditor.prototype.getRenderedQuickToolbarElem = function () {
|
|
2634
|
+
var quickToolbars = this.quickToolbarModule.getQuickToolbarInstance();
|
|
2635
|
+
for (var i = 0; i < quickToolbars.length; i++) {
|
|
2636
|
+
if (quickToolbars[i] && quickToolbars[i].isRendered) {
|
|
2637
|
+
return quickToolbars[i].element;
|
|
2638
|
+
}
|
|
2639
|
+
}
|
|
2640
|
+
return null;
|
|
2641
|
+
};
|
|
2621
2642
|
__decorate([
|
|
2622
2643
|
Complex({}, ToolbarSettings)
|
|
2623
2644
|
], RichTextEditor.prototype, "toolbarSettings", void 0);
|
|
@@ -264,7 +264,12 @@ export function setToolbarStatus(e, isPopToolbar, self) {
|
|
|
264
264
|
}
|
|
265
265
|
case 'bulletFormatList':
|
|
266
266
|
case 'numberFormatList': {
|
|
267
|
-
|
|
267
|
+
if (value !== '') {
|
|
268
|
+
addClass([e.tbElements[j]], [classes.CLS_ACTIVE]);
|
|
269
|
+
}
|
|
270
|
+
else {
|
|
271
|
+
removeClass([e.tbElements[j]], [classes.CLS_ACTIVE]);
|
|
272
|
+
}
|
|
268
273
|
}
|
|
269
274
|
}
|
|
270
275
|
}
|
|
@@ -506,7 +511,8 @@ export function updateTextNode(value, rteObj) {
|
|
|
506
511
|
imageElm[i].classList.add(classes.CLS_RTE_IMAGE);
|
|
507
512
|
}
|
|
508
513
|
if (!(imageElm[i].classList.contains(classes.CLS_IMGINLINE) ||
|
|
509
|
-
imageElm[i].classList.contains(classes.CLS_IMGBREAK))
|
|
514
|
+
imageElm[i].classList.contains(classes.CLS_IMGBREAK)) &&
|
|
515
|
+
!(imageElm[i].classList.contains('e-imgleft') || imageElm[i].classList.contains('e-imgright') || imageElm[i].classList.contains('e-imgcenter'))) {
|
|
510
516
|
imageElm[i].classList.add(classes.CLS_IMGINLINE);
|
|
511
517
|
}
|
|
512
518
|
}
|
|
@@ -69,7 +69,7 @@ export var defaultLocale = {
|
|
|
69
69
|
'linkTooltipLabel': 'Title',
|
|
70
70
|
'linkWebUrl': 'Web address',
|
|
71
71
|
'linkTitle': 'Enter a title',
|
|
72
|
-
'linkurl': '
|
|
72
|
+
'linkurl': 'https://example.com',
|
|
73
73
|
'linkOpenInNewWindow': 'Open link in new window',
|
|
74
74
|
'linkHeader': 'Insert Link',
|
|
75
75
|
'dialogInsert': 'Insert',
|
|
@@ -92,9 +92,9 @@ export var defaultLocale = {
|
|
|
92
92
|
'imageAlternateText': 'Alternate Text',
|
|
93
93
|
'alternateHeader': 'Alternative Text',
|
|
94
94
|
'browse': 'Browse',
|
|
95
|
-
'imageUrl': '
|
|
96
|
-
'audioUrl': '
|
|
97
|
-
'videoUrl': '
|
|
95
|
+
'imageUrl': 'https://example.com/image.png',
|
|
96
|
+
'audioUrl': 'https://example.com/audio.mp3',
|
|
97
|
+
'videoUrl': 'https://example.com/video.mp4',
|
|
98
98
|
'webUrl': 'Web URL',
|
|
99
99
|
'embedUrl': 'Embed Code',
|
|
100
100
|
'imageCaption': 'Caption',
|
|
@@ -105,7 +105,7 @@ export var defaultLocale = {
|
|
|
105
105
|
'videoHeight': 'Height',
|
|
106
106
|
'videoWidth': 'Width',
|
|
107
107
|
'textPlaceholder': 'Enter text',
|
|
108
|
-
'inserttablebtn': 'Insert
|
|
108
|
+
'inserttablebtn': 'Insert Table',
|
|
109
109
|
'tabledialogHeader': 'Insert Table',
|
|
110
110
|
'tableWidth': 'Width',
|
|
111
111
|
'cellpadding': 'Cell Padding',
|
|
@@ -119,7 +119,7 @@ export var defaultLocale = {
|
|
|
119
119
|
'createTable': 'Create Table',
|
|
120
120
|
'removeTable': 'Remove Table',
|
|
121
121
|
'tableHeader': 'Header Row',
|
|
122
|
-
'tableRemove': 'Delete',
|
|
122
|
+
'tableRemove': 'Delete Table',
|
|
123
123
|
'tableCellBackground': 'Table Cell Background',
|
|
124
124
|
'tableEditProperties': 'Table Edit Properties',
|
|
125
125
|
'styles': 'Styles',
|
|
@@ -181,11 +181,11 @@ export var defaultLocale = {
|
|
|
181
181
|
'fontNameTimesNewRoman': 'Times New Roman',
|
|
182
182
|
'fontNameVerdana': 'Verdana',
|
|
183
183
|
'numberFormatListNumber': 'Number',
|
|
184
|
-
'numberFormatListLowerAlpha': '
|
|
185
|
-
'numberFormatListUpperAlpha': '
|
|
186
|
-
'numberFormatListLowerRoman': '
|
|
187
|
-
'numberFormatListUpperRoman': '
|
|
188
|
-
'numberFormatListLowerGreek': '
|
|
184
|
+
'numberFormatListLowerAlpha': 'Lower Alpha',
|
|
185
|
+
'numberFormatListUpperAlpha': 'Upper Alpha',
|
|
186
|
+
'numberFormatListLowerRoman': 'Lower Roman',
|
|
187
|
+
'numberFormatListUpperRoman': 'Upper Roman',
|
|
188
|
+
'numberFormatListLowerGreek': 'Lower Greek',
|
|
189
189
|
'bulletFormatListDisc': 'Disc',
|
|
190
190
|
'bulletFormatListCircle': 'Circle',
|
|
191
191
|
'bulletFormatListSquare': 'Square',
|
|
@@ -199,7 +199,10 @@ export var defaultLocale = {
|
|
|
199
199
|
'emojiPickerNoResultFound': 'No results found',
|
|
200
200
|
'emojiPickerTrySomethingElse': 'Try something else',
|
|
201
201
|
'linkAriaLabel': 'Open in new window',
|
|
202
|
-
'unsupportedImage': 'Unsupported file format'
|
|
202
|
+
'unsupportedImage': 'Unsupported file format',
|
|
203
|
+
'mergecells': 'Merge cells',
|
|
204
|
+
'verticalsplit': 'Vertical split',
|
|
205
|
+
'horizontalsplit': 'Horizontal split'
|
|
203
206
|
};
|
|
204
207
|
export var toolsLocale = {
|
|
205
208
|
'alignments': 'alignments',
|
|
@@ -827,7 +827,7 @@ export interface PasteCleanupSettingsModel {
|
|
|
827
827
|
/**
|
|
828
828
|
* Specifies the allowed style properties when pasting in RichTextEditor.
|
|
829
829
|
*
|
|
830
|
-
* @default ['background', 'background-color', 'border', 'border-bottom', 'border-left', 'border-radius', 'border-right', 'border-style', 'border-top', 'border-width', 'clear', 'color', 'cursor', 'direction', 'display', 'float', 'font', 'font-family', 'font-size', 'font-weight', 'font-style', 'height', 'left', 'line-height', 'list-style-type', 'margin', 'margin-top', 'margin-left', 'margin-right', 'margin-bottom', 'max-height', 'max-width', 'min-height', 'min-width', 'overflow', 'overflow-x', 'overflow-y', 'padding', 'padding-bottom', 'padding-left', 'padding-right', 'padding-top', 'position', 'right', 'table-layout', 'text-align', 'text-decoration', 'text-indent', 'top', 'vertical-align', 'visibility', 'white-space', 'width']
|
|
830
|
+
* @default ['background', 'background-color', 'border', 'border-bottom', 'border-left', 'border-radius', 'border-right', 'border-style', 'border-top', 'border-width', 'clear', 'color', 'cursor', 'direction', 'display', 'float', 'font', 'font-family', 'font-size', 'font-weight', 'font-style', 'height', 'left', 'line-height', 'list-style-type', 'margin', 'margin-top', 'margin-left', 'margin-right', 'margin-bottom', 'max-height', 'max-width', 'min-height', 'min-width', 'overflow', 'overflow-x', 'overflow-y', 'padding', 'padding-bottom', 'padding-left', 'padding-right', 'padding-top', 'position', 'right', 'table-layout', 'text-align', 'text-decoration', 'text-transform', 'text-indent', 'top', 'vertical-align', 'visibility', 'white-space', 'width']
|
|
831
831
|
*/
|
|
832
832
|
allowedStyleProps?: string[];
|
|
833
833
|
|
|
@@ -736,7 +736,7 @@ export declare class PasteCleanupSettings extends ChildProperty<PasteCleanupSett
|
|
|
736
736
|
/**
|
|
737
737
|
* Specifies the allowed style properties when pasting in RichTextEditor.
|
|
738
738
|
*
|
|
739
|
-
* @default ['background', 'background-color', 'border', 'border-bottom', 'border-left', 'border-radius', 'border-right', 'border-style', 'border-top', 'border-width', 'clear', 'color', 'cursor', 'direction', 'display', 'float', 'font', 'font-family', 'font-size', 'font-weight', 'font-style', 'height', 'left', 'line-height', 'list-style-type', 'margin', 'margin-top', 'margin-left', 'margin-right', 'margin-bottom', 'max-height', 'max-width', 'min-height', 'min-width', 'overflow', 'overflow-x', 'overflow-y', 'padding', 'padding-bottom', 'padding-left', 'padding-right', 'padding-top', 'position', 'right', 'table-layout', 'text-align', 'text-decoration', 'text-indent', 'top', 'vertical-align', 'visibility', 'white-space', 'width']
|
|
739
|
+
* @default ['background', 'background-color', 'border', 'border-bottom', 'border-left', 'border-radius', 'border-right', 'border-style', 'border-top', 'border-width', 'clear', 'color', 'cursor', 'direction', 'display', 'float', 'font', 'font-family', 'font-size', 'font-weight', 'font-style', 'height', 'left', 'line-height', 'list-style-type', 'margin', 'margin-top', 'margin-left', 'margin-right', 'margin-bottom', 'max-height', 'max-width', 'min-height', 'min-width', 'overflow', 'overflow-x', 'overflow-y', 'padding', 'padding-bottom', 'padding-left', 'padding-right', 'padding-top', 'position', 'right', 'table-layout', 'text-align', 'text-decoration', 'text-transform', 'text-indent', 'top', 'vertical-align', 'visibility', 'white-space', 'width']
|
|
740
740
|
*/
|
|
741
741
|
allowedStyleProps: string[];
|
|
742
742
|
/**
|
|
@@ -361,7 +361,7 @@ var PasteCleanupSettings = /** @class */ (function (_super) {
|
|
|
361
361
|
Property(null)
|
|
362
362
|
], PasteCleanupSettings.prototype, "deniedAttrs", void 0);
|
|
363
363
|
__decorate([
|
|
364
|
-
Property(['background', 'background-color', 'border', 'border-bottom', 'border-left', 'border-radius', 'border-right', 'border-style', 'border-top', 'border-width', 'clear', 'color', 'cursor', 'direction', 'display', 'float', 'font', 'font-family', 'font-size', 'font-weight', 'font-style', 'height', 'left', 'line-height', 'list-style-type', 'margin', 'margin-top', 'margin-left', 'margin-right', 'margin-bottom', 'max-height', 'max-width', 'min-height', 'min-width', 'overflow', 'overflow-x', 'overflow-y', 'padding', 'padding-bottom', 'padding-left', 'padding-right', 'padding-top', 'position', 'right', 'table-layout', 'text-align', 'text-decoration', 'text-indent', 'top', 'vertical-align', 'visibility', 'white-space', 'width'])
|
|
364
|
+
Property(['background', 'background-color', 'border', 'border-bottom', 'border-left', 'border-radius', 'border-right', 'border-style', 'border-top', 'border-width', 'clear', 'color', 'cursor', 'direction', 'display', 'float', 'font', 'font-family', 'font-size', 'font-weight', 'font-style', 'height', 'left', 'line-height', 'list-style-type', 'margin', 'margin-top', 'margin-left', 'margin-right', 'margin-bottom', 'max-height', 'max-width', 'min-height', 'min-width', 'overflow', 'overflow-x', 'overflow-y', 'padding', 'padding-bottom', 'padding-left', 'padding-right', 'padding-top', 'position', 'right', 'table-layout', 'text-align', 'text-decoration', 'text-transform', 'text-indent', 'top', 'vertical-align', 'visibility', 'white-space', 'width'])
|
|
365
365
|
], PasteCleanupSettings.prototype, "allowedStyleProps", void 0);
|
|
366
366
|
__decorate([
|
|
367
367
|
Property(null)
|
|
@@ -14,7 +14,7 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
14
14
|
import { ContentRender } from '../renderer/content-renderer';
|
|
15
15
|
import { isNullOrUndefined } from '@syncfusion/ej2-base';
|
|
16
16
|
import { getEditValue } from '../base/util';
|
|
17
|
-
var IFRAMEHEADER = "\n<!DOCTYPE html> \n <html>\n <head>\n <meta charset='utf-8' /> \n <style>\n @charset \"UTF-8\";\n body {\n font-family: \"Roboto\", sans-serif;\n font-size: 14px;\n }\n html, body{height: 100%;margin: 0;}\n body.e-cursor{cursor:default}\n span.e-selected-node\t{background-color: #939393;color: white;}\n span.e-selected-node.e-highlight {background-color: #1d9dd8;}\n body{color:#333;word-wrap:break-word;padding: 8px;box-sizing: border-box;}\n .e-rte-image, .e-rte-video {border: 0;cursor: pointer;display:\n block;float: none;height: auto;margin: 5px auto;max-width: 100%;position: relative;}\n .e-rte-audio {border: 0;cursor: pointer;display:\n block;float: none;margin: 5px auto;max-width: 100%;position: relative;}\n .e-rte-image.e-imginline, .e-rte-audio.e-audio-inline, .e-rte-video.e-video-inline {display: inline-block;float: none;\n margin-left: 5px;margin-right: 5px;max-width: calc(100% - (2 * 5px));padding: 1px;vertical-align: bottom;}\n .e-rte-image.e-imgcenter, .e-rte-video.e-video-center {cursor: pointer;display: block;float: none;margin: 5px auto;max-width: 100%;position: relative;}\n .e-rte-image.e-imgright, .e-rte-video.e-video-right { float: right; margin: 0 auto;margin-left: 5px;text-align: right;}\n .e-rte-image.e-imgleft, .e-rte-video.e-video-left {float: left;margin: 0 auto;margin-right: 5px;text-align: left;}\n .e-img-caption { display: inline-block; float: none; margin: 5px auto; max-width: 100%;position: relative;}\n .e-img-caption.e-caption-inline {display: inline-block;float: none;\n margin: 5px auto;margin-left: 5px;margin-right: 5px;max-width: calc(100% - (2 * 5px));\n position: relativetext-align: center;vertical-align: bottom;}\n .e-rte-img-caption.e-imgcenter {display: contents; margin-left: auto; margin-right: auto;}\n .e-rte-img-caption.e-imgright {display: contents; margin-left: auto; margin-right: 0;}\n .e-rte-img-caption.e-imgleft {display: contents;margin-left: 0;margin-right: auto;}\n .e-img-caption.e-rte-img-caption.e-imgbreak {display: contents;}\n .e-img-inner {box-sizing: border-box;display: block;font-size: 16px;font-weight: initial;\n margin: auto;opacity: .9;text-align: center;width: 100%;}\n .e-img-wrap {display: inline-block;margin: auto;padding: 0;text-align: center;width: 100%;}\n .e-imgleft, .e-video-left {float: left;margin: 0 5px 0 0;text-align: left;}\n .e-imgright, .e-video-right {float: right;margin: 0 0 0 5px;text-align: right;}\n .e-imgcenter, .e-video-center {cursor: pointer;display: block;float: none;height: auto;margin: 5px auto;max-width: 100%;position: relative;}\n .e-control img:not(.e-resize) {border: 2px solid transparent; z-index: 1000}\n .e-imginline , .e-audio-inline, .e-video-inline {display: inline-block;float: none;margin-left: 5px;margin-right: 5px;\n max-width: calc(100% - (2 * 5px));vertical-align: bottom;}\n .e-imgbreak, .e-audio-break, .e-video-break {border: 0;cursor: pointer;\n display: block;float: none;height: auto;margin: 5px auto;max-width: 100%;position: relative;}\n .e-rte-image.e-img-focus:not(.e-resize), .e-audio-focus:not(.e-resize), .e-video-focus:not(.e-resize) {border: solid 2px #4a90e2;}\n img.e-img-focus::selection, audio.e-audio-focus::selection, .e-video-focus::selection { background: transparent;color: transparent;}\n span.e-rte-imageboxmark, span.e-rte-videoboxmark { width: 10px; height: 10px; position: absolute; display: block;\n background: #4a90e2; border: 1px solid #fff; z-index: 1000;}\n .e-mob-rte.e-mob-span span.e-rte-imageboxmark, .e-mob-rte.e-mob-span span.e-rte-videoboxmark { background: #4a90e2; border: 1px solid #fff; }\n .e-mob-rte span.e-rte-imageboxmark, .e-mob-rte span.e-rte-videoboxmark { background: #fff; border: 1px solid #4a90e2;\n border-radius: 15px; height: 20px; width: 20px; }\n .e-mob-rte.e-mob-span span.e-rte-imageboxmark, .e-mob-rte.e-mob-span span.e-rte-videoboxmark { background: #4a90e2; border: 1px solid #fff; }\n .e-rte-content .e-content img.e-resize, .e-rte-content .e-content video.e-resize { z-index: 1000; }\n .e-img-caption .e-img-inner { outline: 0; }\n .e-img-caption a:focus-visible { outline: none; }\n .e-img-caption .e-rte-image.e-imgright
|
|
17
|
+
var IFRAMEHEADER = "\n<!DOCTYPE html> \n <html>\n <head>\n <meta charset='utf-8' /> \n <style>\n @charset \"UTF-8\";\n body {\n font-family: \"Roboto\", sans-serif;\n font-size: 14px;\n }\n html, body{height: 100%;margin: 0;}\n body.e-cursor{cursor:default}\n span.e-selected-node\t{background-color: #939393;color: white;}\n span.e-selected-node.e-highlight {background-color: #1d9dd8;}\n body{color:#333;word-wrap:break-word;padding: 8px;box-sizing: border-box;}\n .e-rte-image, .e-rte-video {border: 0;cursor: pointer;display:\n block;float: none;height: auto;margin: 5px auto;max-width: 100%;position: relative;}\n .e-rte-audio {border: 0;cursor: pointer;display:\n block;float: none;margin: 5px auto;max-width: 100%;position: relative;}\n .e-rte-image.e-imginline, .e-rte-audio.e-audio-inline, .e-rte-video.e-video-inline {display: inline-block;float: none;\n margin-left: 5px;margin-right: 5px;max-width: calc(100% - (2 * 5px));padding: 1px;vertical-align: bottom;}\n .e-rte-image.e-imgcenter, .e-rte-video.e-video-center {cursor: pointer;display: block;float: none;margin: 5px auto;max-width: 100%;position: relative;}\n .e-rte-image.e-imgright, .e-rte-video.e-video-right { float: right; margin: 0 auto;margin-left: 5px;text-align: right;}\n .e-rte-image.e-imgleft, .e-rte-video.e-video-left {float: left;margin: 0 auto;margin-right: 5px;text-align: left;}\n .e-img-caption { display: inline-block; float: none; margin: 5px auto; max-width: 100%;position: relative;}\n .e-img-caption.e-caption-inline {display: inline-block;float: none;\n margin: 5px auto;margin-left: 5px;margin-right: 5px;max-width: calc(100% - (2 * 5px));\n position: relativetext-align: center;vertical-align: bottom;}\n .e-rte-img-caption.e-imgcenter {display: contents; margin-left: auto; margin-right: auto;}\n .e-rte-img-caption.e-imgright {display: contents; margin-left: auto; margin-right: 0;}\n .e-rte-img-caption.e-imgleft {display: contents;margin-left: 0;margin-right: auto;}\n .e-img-caption.e-rte-img-caption.e-imgbreak {display: contents;}\n .e-img-inner {box-sizing: border-box;display: block;font-size: 16px;font-weight: initial;\n margin: auto;opacity: .9;text-align: center;width: 100%;}\n .e-img-wrap {display: inline-block;margin: auto;padding: 0;text-align: center;width: 100%;}\n .e-imgleft, .e-video-left {float: left;margin: 0 5px 0 0;text-align: left;}\n .e-imgright, .e-video-right {float: right;margin: 0 0 0 5px;text-align: right;}\n .e-imgcenter, .e-video-center {cursor: pointer;display: block;float: none;height: auto;margin: 5px auto;max-width: 100%;position: relative;}\n .e-control img:not(.e-resize) {border: 2px solid transparent; z-index: 1000}\n .e-imginline , .e-audio-inline, .e-video-inline {display: inline-block;float: none;margin-left: 5px;margin-right: 5px;\n max-width: calc(100% - (2 * 5px));vertical-align: bottom;}\n .e-imgbreak, .e-audio-break, .e-video-break {border: 0;cursor: pointer;\n display: block;float: none;height: auto;margin: 5px auto;max-width: 100%;position: relative;}\n .e-rte-image.e-img-focus:not(.e-resize), .e-audio-focus:not(.e-resize), .e-video-focus:not(.e-resize) {border: solid 2px #4a90e2;}\n img.e-img-focus::selection, audio.e-audio-focus::selection, .e-video-focus::selection { background: transparent;color: transparent;}\n span.e-rte-imageboxmark, span.e-rte-videoboxmark { width: 10px; height: 10px; position: absolute; display: block;\n background: #4a90e2; border: 1px solid #fff; z-index: 1000;}\n .e-mob-rte.e-mob-span span.e-rte-imageboxmark, .e-mob-rte.e-mob-span span.e-rte-videoboxmark { background: #4a90e2; border: 1px solid #fff; }\n .e-mob-rte span.e-rte-imageboxmark, .e-mob-rte span.e-rte-videoboxmark { background: #fff; border: 1px solid #4a90e2;\n border-radius: 15px; height: 20px; width: 20px; }\n .e-mob-rte.e-mob-span span.e-rte-imageboxmark, .e-mob-rte.e-mob-span span.e-rte-videoboxmark { background: #4a90e2; border: 1px solid #fff; }\n .e-rte-content .e-content img.e-resize, .e-rte-content .e-content video.e-resize { z-index: 1000; }\n .e-img-caption .e-img-inner { outline: 0; }\n .e-rte-img-caption.e-imgleft .e-img-inner { float: left; text-align: left; }\n .e-rte-img-caption.e-imgright .e-img-inner { float: right; text-align: right; }\n .e-rte-img-caption.e-imgleft .e-img-wrap, .e-rte-img-caption.e-imgright .e-img-wrap { display: contents; }\n .e-img-caption a:focus-visible { outline: none; }\n .e-rte-img-caption .e-rte-image.e-imgright { margin-left: auto; margin-right: 0; }\n .e-rte-img-caption .e-rte-image.e-imgleft { margin: 0; }\n body{box-sizing: border-box;min-height: 100px;outline: 0 solid transparent;\n overflow-x: auto;padding: 16px;position: relative;text-align: inherit;z-index: 2;}\n p{margin: 0 0 10px;margin-bottom: 10px;}\n li{margin-bottom: 10px;}\n h1{font-size: 2.17em;font-weight: 400;line-height: 1;margin: 10px 0;}\n h2{font-size: 1.74em;font-weight: 400;margin: 10px 0;}\n h3{font-size: 1.31em;font-weight: 400;margin: 10px 0;}\n h4{font-size: 16px;font-weight: 400;line-height: 1.5;margin: 0;}\n h5{font-size: 00.8em;font-weight: 400;margin: 0;}\n h6{font-size: 00.65em;font-weight: 400;margin: 0;}\n blockquote{margin: 10px 0;margin-left: 0;padding-left: 5px;border-left: solid 2px #5c5c5c;}\n pre{background-color: inherit;border: 0;border-radius: 0;color: #333;\n font-size: inherit;line-height: inherit;margin: 0 0 10px;overflow: visible;padding: 0;\n white-space: pre-wrap;word-break: inherit;word-wrap: break-word;}\n strong, b{font-weight: 700;}\n a{text-decoration: none;user-select: auto;}\n a:hover{text-decoration: underline;};\n p:last-child, pre:last-child, blockquote:last-child{margin-bottom: 0;}\n h3+h4, h4+h5, h5+h6{margin-top: 00.6em;}\n ul:last-child{margin-bottom: 0;}\n table { border-collapse: collapse; empty-cells: show;}\n table td,table th {border: 1px solid #BDBDBD; height: 20px; padding: 2px 5px; vertical-align: middle;}\n table.e-alternate-border tbody tr:nth-child(2n) {background-color: #F5F5F5;}\n table th {background-color: #E0E0E0;}\n table.e-dashed-border td,table.e-dashed-border th { border: 1px dashed #BDBDBD} \n table .e-cell-select {border: 1px double #4a90e2;}\n span.e-table-box { cursor: nwse-resize; display: block; height: 10px; position: absolute; width: 10px; }\n span.e-table-box.e-rmob {height: 14px;width: 14px;}\n .e-row-resize, .e-column-resize { background-color: transparent; background-repeat: repeat;\n bottom: 0;cursor: col-resize;height: 1px;overflow: visible;position: absolute;width: 1px; }\n .e-row-resize { cursor: row-resize; height: 1px;}\n .e-table-rhelper { cursor: col-resize; opacity: .87;position: absolute;}\n .e-table-rhelper.e-column-helper { width: 1px; }\n .e-table-rhelper.e-row-helper {height: 1px;}\n .e-reicon::before { border-bottom: 6px solid transparent; border-right: 6px solid;\n border-top: 6px solid transparent; content: ''; display: block; height: 0;\n position: absolute; right: 4px; top: 4px; width: 20px; }\n .e-reicon::after { border-bottom: 6px solid transparent; border-left: 6px solid;\n border-top: 6px solid transparent; content: ''; display: block;\n height: 0; left: 4px; position: absolute; top: 4px; width: 20px; z-index: 3; }\n .e-row-helper.e-reicon::after { top: 10px; transform: rotate(90deg); }\n .e-row-helper.e-reicon::before { left: 4px; top: -20px; transform: rotate(90deg); }\n span.e-table-box { background-color: #ffffff; border: 1px solid #BDBDBD; }\n span.e-table-box.e-rbox-select { background-color: #BDBDBD; border: 1px solid #BDBDBD; }\n .e-table-rhelper { background-color: #4a90e2;}\n .e-rtl { direction: rtl; }\n .e-rte-placeholder::before { content: attr(placeholder); opacity: 0.54; overflow: hidden; padding-top: 16px; position: absolute; text-align: start; top: 0; z-index: 1; }\n li ol, li ul { margin-block-start: 10px;}\n </style>\n </head>";
|
|
18
18
|
/**
|
|
19
19
|
* Content module is used to render Rich Text Editor content
|
|
20
20
|
*
|
|
@@ -44,6 +44,7 @@ var IframeContentRender = /** @class */ (function (_super) {
|
|
|
44
44
|
styles: 'display:block;',
|
|
45
45
|
attrs: { 'srcdoc': iFrameContent }
|
|
46
46
|
});
|
|
47
|
+
iframe.setAttribute("role", "none");
|
|
47
48
|
this.setPanel(iframe);
|
|
48
49
|
rteObj.element.appendChild(iframe);
|
|
49
50
|
iframe.contentDocument.body.id = this.parent.getID() + '_rte-edit-view';
|
|
@@ -30,7 +30,6 @@ export declare class Image {
|
|
|
30
30
|
private isAllowedTypes;
|
|
31
31
|
private pageX;
|
|
32
32
|
private pageY;
|
|
33
|
-
private mouseX;
|
|
34
33
|
private dialogRenderObj;
|
|
35
34
|
private deletedImg;
|
|
36
35
|
private changedWidthValue;
|
|
@@ -38,6 +37,8 @@ export declare class Image {
|
|
|
38
37
|
private inputWidthValue;
|
|
39
38
|
private inputHeightValue;
|
|
40
39
|
private removingImgName;
|
|
40
|
+
private currentResizeHandler;
|
|
41
|
+
private aspectRatio;
|
|
41
42
|
private constructor();
|
|
42
43
|
protected addEventListener(): void;
|
|
43
44
|
protected removeEventListener(): void;
|
|
@@ -56,9 +57,15 @@ export declare class Image {
|
|
|
56
57
|
private imgResizePos;
|
|
57
58
|
private calcPos;
|
|
58
59
|
private setAspectRatio;
|
|
60
|
+
private setImageWidth;
|
|
61
|
+
private setImageHeight;
|
|
62
|
+
private removeImageHeight;
|
|
63
|
+
private getImageDimension;
|
|
59
64
|
private pixToPerc;
|
|
60
65
|
private imgDupMouseMove;
|
|
61
66
|
private resizing;
|
|
67
|
+
private getResizeFactor;
|
|
68
|
+
private findAspectRatio;
|
|
62
69
|
private cancelResizeAction;
|
|
63
70
|
private resizeImgDupPos;
|
|
64
71
|
private resizeBtnInit;
|