@syncfusion/ej2-richtexteditor 23.2.7-52849 → 24.1.41-569781
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.json +260 -0
- package/CHANGELOG.md +177 -1
- package/dist/ej2-richtexteditor.umd.min.js +1 -1
- package/dist/ej2-richtexteditor.umd.min.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es2015.js +2919 -1147
- package/dist/es6/ej2-richtexteditor.es2015.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es5.js +2906 -1133
- package/dist/es6/ej2-richtexteditor.es5.js.map +1 -1
- package/package.json +13 -13
- package/src/common/config.d.ts +7 -0
- package/src/common/config.js +12 -1
- package/src/common/constant.d.ts +6 -0
- package/src/common/constant.js +6 -0
- package/src/common/interface.d.ts +12 -0
- package/src/common/types.d.ts +6 -0
- package/src/common/util.d.ts +6 -0
- package/src/common/util.js +61 -20
- package/src/editor-manager/base/constant.d.ts +6 -0
- package/src/editor-manager/base/constant.js +6 -0
- package/src/editor-manager/base/editor-manager.d.ts +5 -0
- package/src/editor-manager/base/editor-manager.js +59 -0
- package/src/editor-manager/base/interface.d.ts +8 -0
- package/src/editor-manager/plugin/audio.js +13 -3
- package/src/editor-manager/plugin/dom-node.d.ts +5 -1
- package/src/editor-manager/plugin/dom-node.js +169 -28
- package/src/editor-manager/plugin/format-painter-actions.d.ts +1 -0
- package/src/editor-manager/plugin/format-painter-actions.js +19 -1
- package/src/editor-manager/plugin/formats.d.ts +1 -0
- package/src/editor-manager/plugin/formats.js +38 -3
- package/src/editor-manager/plugin/image.js +38 -15
- package/src/editor-manager/plugin/inserthtml.d.ts +1 -0
- package/src/editor-manager/plugin/inserthtml.js +67 -7
- package/src/editor-manager/plugin/link.js +4 -1
- package/src/editor-manager/plugin/lists.js +121 -65
- package/src/editor-manager/plugin/ms-word-clean-up.d.ts +3 -0
- package/src/editor-manager/plugin/ms-word-clean-up.js +215 -85
- package/src/editor-manager/plugin/nodecutter.js +2 -2
- package/src/editor-manager/plugin/selection-commands.d.ts +1 -0
- package/src/editor-manager/plugin/selection-commands.js +165 -3
- package/src/editor-manager/plugin/table.d.ts +0 -1
- package/src/editor-manager/plugin/table.js +33 -30
- package/src/editor-manager/plugin/toolbar-status.d.ts +2 -2
- package/src/editor-manager/plugin/toolbar-status.js +20 -10
- package/src/editor-manager/plugin/undo.d.ts +1 -0
- package/src/editor-manager/plugin/undo.js +21 -1
- package/src/rich-text-editor/actions/base-quick-toolbar.d.ts +3 -3
- package/src/rich-text-editor/actions/base-quick-toolbar.js +66 -15
- package/src/rich-text-editor/actions/base-toolbar.js +32 -34
- package/src/rich-text-editor/actions/color-picker.d.ts +1 -0
- package/src/rich-text-editor/actions/color-picker.js +13 -3
- package/src/rich-text-editor/actions/count.js +1 -1
- package/src/rich-text-editor/actions/dropdown-buttons.js +25 -4
- package/src/rich-text-editor/actions/emoji-picker.js +15 -6
- package/src/rich-text-editor/actions/enter-key.js +6 -4
- package/src/rich-text-editor/actions/file-manager.js +1 -1
- package/src/rich-text-editor/actions/format-painter.js +1 -1
- package/src/rich-text-editor/actions/full-screen.js +5 -4
- package/src/rich-text-editor/actions/html-editor.d.ts +2 -0
- package/src/rich-text-editor/actions/html-editor.js +127 -17
- package/src/rich-text-editor/actions/keyboard.js +3 -1
- package/src/rich-text-editor/actions/markdown-editor.js +3 -1
- package/src/rich-text-editor/actions/paste-clean-up.d.ts +5 -0
- package/src/rich-text-editor/actions/paste-clean-up.js +156 -28
- package/src/rich-text-editor/actions/quick-toolbar.d.ts +7 -0
- package/src/rich-text-editor/actions/quick-toolbar.js +45 -11
- package/src/rich-text-editor/actions/resize.js +2 -1
- package/src/rich-text-editor/actions/toolbar-action.js +1 -1
- package/src/rich-text-editor/actions/toolbar.d.ts +3 -3
- package/src/rich-text-editor/actions/toolbar.js +35 -96
- package/src/rich-text-editor/base/classes.d.ts +5 -5
- package/src/rich-text-editor/base/classes.js +5 -5
- package/src/rich-text-editor/base/constant.d.ts +46 -1
- package/src/rich-text-editor/base/constant.js +215 -1
- package/src/rich-text-editor/base/interface.d.ts +47 -3
- package/src/rich-text-editor/base/rich-text-editor-model.d.ts +3 -3
- package/src/rich-text-editor/base/rich-text-editor.d.ts +16 -4
- package/src/rich-text-editor/base/rich-text-editor.js +196 -100
- package/src/rich-text-editor/base/util.d.ts +4 -0
- package/src/rich-text-editor/base/util.js +57 -5
- package/src/rich-text-editor/formatter/formatter.js +15 -4
- package/src/rich-text-editor/models/default-locale.js +31 -25
- package/src/rich-text-editor/models/items.js +3 -3
- 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/audio-module.d.ts +1 -0
- package/src/rich-text-editor/renderer/audio-module.js +13 -0
- package/src/rich-text-editor/renderer/dialog-renderer.d.ts +2 -0
- package/src/rich-text-editor/renderer/dialog-renderer.js +22 -2
- package/src/rich-text-editor/renderer/iframe-content-renderer.js +2 -1
- package/src/rich-text-editor/renderer/image-module.d.ts +9 -1
- package/src/rich-text-editor/renderer/image-module.js +244 -212
- package/src/rich-text-editor/renderer/link-module.js +53 -24
- package/src/rich-text-editor/renderer/table-module.d.ts +10 -1
- package/src/rich-text-editor/renderer/table-module.js +330 -165
- package/src/rich-text-editor/renderer/toolbar-renderer.d.ts +4 -6
- package/src/rich-text-editor/renderer/toolbar-renderer.js +105 -106
- package/src/rich-text-editor/renderer/video-module.d.ts +3 -0
- package/src/rich-text-editor/renderer/video-module.js +61 -34
- package/src/rich-text-editor/renderer/view-source.d.ts +1 -0
- package/src/rich-text-editor/renderer/view-source.js +15 -5
- package/src/selection/selection.js +3 -0
- package/styles/bootstrap-dark.css +345 -99
- package/styles/bootstrap.css +353 -108
- package/styles/bootstrap4.css +337 -95
- package/styles/bootstrap5-dark.css +343 -96
- package/styles/bootstrap5.css +343 -96
- package/styles/fabric-dark.css +331 -89
- package/styles/fabric.css +332 -90
- package/styles/fluent-dark.css +342 -92
- package/styles/fluent.css +342 -92
- package/styles/highcontrast-light.css +331 -89
- package/styles/highcontrast.css +335 -90
- package/styles/material-dark.css +337 -90
- package/styles/material.css +337 -90
- package/styles/material3-dark.css +347 -99
- package/styles/material3.css +347 -99
- package/styles/rich-text-editor/_bds-definition.scss +279 -0
- package/styles/rich-text-editor/_bootstrap-dark-definition.scss +14 -10
- package/styles/rich-text-editor/_bootstrap-definition.scss +20 -17
- package/styles/rich-text-editor/_bootstrap4-definition.scss +11 -7
- package/styles/rich-text-editor/_bootstrap5-definition.scss +8 -4
- package/styles/rich-text-editor/_fabric-dark-definition.scss +6 -2
- package/styles/rich-text-editor/_fabric-definition.scss +7 -3
- package/styles/rich-text-editor/_fluent-definition.scss +9 -5
- package/styles/rich-text-editor/_fusionnew-definition.scss +7 -3
- package/styles/rich-text-editor/_highcontrast-definition.scss +7 -3
- package/styles/rich-text-editor/_highcontrast-light-definition.scss +6 -2
- package/styles/rich-text-editor/_layout.scss +208 -31
- package/styles/rich-text-editor/_material-dark-definition.scss +6 -2
- package/styles/rich-text-editor/_material-definition.scss +6 -2
- package/styles/rich-text-editor/_material3-definition.scss +16 -12
- package/styles/rich-text-editor/_tailwind-definition.scss +25 -21
- package/styles/rich-text-editor/_theme.scss +93 -24
- package/styles/rich-text-editor/bootstrap-dark.css +345 -99
- package/styles/rich-text-editor/bootstrap.css +353 -108
- package/styles/rich-text-editor/bootstrap4.css +337 -95
- package/styles/rich-text-editor/bootstrap5-dark.css +343 -96
- package/styles/rich-text-editor/bootstrap5.css +343 -96
- package/styles/rich-text-editor/fabric-dark.css +331 -89
- package/styles/rich-text-editor/fabric.css +332 -90
- package/styles/rich-text-editor/fluent-dark.css +342 -92
- package/styles/rich-text-editor/fluent.css +342 -92
- package/styles/rich-text-editor/highcontrast-light.css +331 -89
- package/styles/rich-text-editor/highcontrast.css +335 -90
- package/styles/rich-text-editor/icons/_bds.scss +348 -0
- package/styles/rich-text-editor/icons/_bootstrap-dark.scss +4 -4
- package/styles/rich-text-editor/icons/_bootstrap.scss +4 -4
- package/styles/rich-text-editor/icons/_bootstrap4.scss +4 -4
- package/styles/rich-text-editor/icons/_bootstrap5.scss +4 -4
- package/styles/rich-text-editor/icons/_fabric-dark.scss +4 -4
- package/styles/rich-text-editor/icons/_fabric.scss +4 -4
- package/styles/rich-text-editor/icons/_fluent.scss +4 -4
- package/styles/rich-text-editor/icons/_fusionnew.scss +3 -3
- package/styles/rich-text-editor/icons/_highcontrast-light.scss +4 -4
- package/styles/rich-text-editor/icons/_highcontrast.scss +4 -4
- package/styles/rich-text-editor/icons/_material-dark.scss +4 -4
- package/styles/rich-text-editor/icons/_material.scss +4 -4
- package/styles/rich-text-editor/icons/_material3.scss +4 -4
- package/styles/rich-text-editor/icons/_tailwind.scss +4 -4
- package/styles/rich-text-editor/material-dark.css +337 -90
- package/styles/rich-text-editor/material.css +337 -90
- package/styles/rich-text-editor/material3-dark.css +347 -99
- package/styles/rich-text-editor/material3.css +347 -99
- package/styles/rich-text-editor/tailwind-dark.css +386 -116
- package/styles/rich-text-editor/tailwind.css +386 -116
- package/styles/tailwind-dark.css +386 -116
- package/styles/tailwind.css +386 -116
- package/.github/PULL_REQUEST_TEMPLATE/Bug.md +0 -41
- package/.github/PULL_REQUEST_TEMPLATE/Feature.md +0 -27
- package/src/global.d.ts +0 -1
|
@@ -51,6 +51,10 @@ export declare function pageYOffset(e: MouseEvent | Touch, parentElement: HTMLEl
|
|
|
51
51
|
* @hidden
|
|
52
52
|
*/
|
|
53
53
|
export declare function getTooltipText(item: string, serviceLocator: ServiceLocator): string;
|
|
54
|
+
export declare function getTooltipTextDropdownItems(item: string, serviceLocator: ServiceLocator, localeItems: {
|
|
55
|
+
[ket: string]: string;
|
|
56
|
+
}[], rteObj?: IRichTextEditor): string;
|
|
57
|
+
export declare function getQuickToolbarTooltipText(item: string): string;
|
|
54
58
|
/**
|
|
55
59
|
* @param {ISetToolbarStatusArgs} e - specifies the e element
|
|
56
60
|
* @param {boolean} isPopToolbar - specifies the boolean value
|
|
@@ -6,7 +6,7 @@ import { Browser, detach, SanitizeHtmlHelper, extend } from '@syncfusion/ej2-bas
|
|
|
6
6
|
import * as classes from '../base/classes';
|
|
7
7
|
import * as CONSTANT from '../base/constant';
|
|
8
8
|
import * as model from '../models/items';
|
|
9
|
-
import { toolsLocale, fontNameLocale, formatsLocale, numberFormatListLocale, bulletFormatListLocale } from '../models/default-locale';
|
|
9
|
+
import { toolsLocale, fontNameLocale, formatsLocale, numberFormatListLocale, bulletFormatListLocale, defaultLocale } from '../models/default-locale';
|
|
10
10
|
var undoRedoItems = ['Undo', 'Redo'];
|
|
11
11
|
var inlineNode = ['a', 'abbr', 'acronym', 'audio', 'b', 'bdi', 'bdo', 'big', 'br', 'button',
|
|
12
12
|
'canvas', 'cite', 'code', 'data', 'datalist', 'del', 'dfn', 'em', 'embed', 'font', 'i', 'iframe', 'img', 'input',
|
|
@@ -134,6 +134,40 @@ export function getTooltipText(item, serviceLocator) {
|
|
|
134
134
|
var tooltipText = i10n.getConstant(itemLocale);
|
|
135
135
|
return tooltipText;
|
|
136
136
|
}
|
|
137
|
+
export function getTooltipTextDropdownItems(item, serviceLocator, localeItems, rteObj) {
|
|
138
|
+
if (localeItems) {
|
|
139
|
+
var i10n = serviceLocator.getService('rteLocale');
|
|
140
|
+
for (var i = 0; i < localeItems.length; i++) {
|
|
141
|
+
var itemLocale = localeItems[i].value.toLocaleLowerCase();
|
|
142
|
+
var numberValue = localeItems[i].locale;
|
|
143
|
+
var numberLocale = defaultLocale["" + numberValue].toLocaleLowerCase();
|
|
144
|
+
if (item === itemLocale || item === numberLocale) {
|
|
145
|
+
var tooltipText = localeItems[i].locale;
|
|
146
|
+
return i10n.getConstant(tooltipText);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
else {
|
|
151
|
+
var fontsize = rteObj.fontSize.items;
|
|
152
|
+
for (var i = 0; i < fontsize.length; i++) {
|
|
153
|
+
if (item === rteObj.fontSize.items[i].value) {
|
|
154
|
+
var fontSize = rteObj.fontSize.items[i].text;
|
|
155
|
+
return fontSize;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
return '';
|
|
160
|
+
}
|
|
161
|
+
export function getQuickToolbarTooltipText(item) {
|
|
162
|
+
var keys = Object.keys(defaultLocale);
|
|
163
|
+
for (var i = 0; i < keys.length; i++) {
|
|
164
|
+
var tooltipText = defaultLocale["" + keys[i]];
|
|
165
|
+
if (item === tooltipText) {
|
|
166
|
+
return tooltipText;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
return '';
|
|
170
|
+
}
|
|
137
171
|
/**
|
|
138
172
|
* @param {ISetToolbarStatusArgs} e - specifies the e element
|
|
139
173
|
* @param {boolean} isPopToolbar - specifies the boolean value
|
|
@@ -230,7 +264,12 @@ export function setToolbarStatus(e, isPopToolbar, self) {
|
|
|
230
264
|
}
|
|
231
265
|
case 'bulletFormatList':
|
|
232
266
|
case 'numberFormatList': {
|
|
233
|
-
|
|
267
|
+
if (value !== '') {
|
|
268
|
+
addClass([e.tbElements[j]], [classes.CLS_ACTIVE]);
|
|
269
|
+
}
|
|
270
|
+
else {
|
|
271
|
+
removeClass([e.tbElements[j]], [classes.CLS_ACTIVE]);
|
|
272
|
+
}
|
|
234
273
|
}
|
|
235
274
|
}
|
|
236
275
|
}
|
|
@@ -265,11 +304,11 @@ export function getTBarItemsIndex(items, toolbarItems) {
|
|
|
265
304
|
continue;
|
|
266
305
|
}
|
|
267
306
|
else {
|
|
268
|
-
if (items[i] === 'OrderedList' && toolbarItems[j].subCommand === 'OL') {
|
|
307
|
+
if ((items[i] === 'OrderedList' || items[i] === 'NumberFormatList') && toolbarItems[j].subCommand === 'OL') {
|
|
269
308
|
itemsIndex.push(j);
|
|
270
309
|
break;
|
|
271
310
|
}
|
|
272
|
-
else if (items[i] === 'UnorderedList' && toolbarItems[j].subCommand === 'UL') {
|
|
311
|
+
else if ((items[i] === 'UnorderedList' || items[i] === 'BulletFormatList') && toolbarItems[j].subCommand === 'UL') {
|
|
273
312
|
itemsIndex.push(j);
|
|
274
313
|
break;
|
|
275
314
|
}
|
|
@@ -422,6 +461,15 @@ export function updateTextNode(value, rteObj) {
|
|
|
422
461
|
for (var i = 0; i < emptyBlockElem.length; i++) {
|
|
423
462
|
emptyBlockElem[i].innerHTML = '<br>';
|
|
424
463
|
}
|
|
464
|
+
// To handle the Empty block node with \n
|
|
465
|
+
var allPNodes = tempNode.querySelectorAll('p');
|
|
466
|
+
for (var i = 0; i < allPNodes.length; i++) {
|
|
467
|
+
if (allPNodes[i].textContent.trim().length === 0 && allPNodes[i].childNodes.length === 1
|
|
468
|
+
&& allPNodes[i].childNodes[0].nodeName === '#text' &&
|
|
469
|
+
isNOU(allPNodes[i].childNodes[0].textContent.match(/\u00a0/g))) {
|
|
470
|
+
allPNodes[i].innerHTML = '<br>';
|
|
471
|
+
}
|
|
472
|
+
}
|
|
425
473
|
var emptyInlineElem = tempNode.querySelectorAll(CONSTANT.inlineEmptyNodes);
|
|
426
474
|
for (var i = 0; i < emptyInlineElem.length; i++) {
|
|
427
475
|
emptyInlineElem[i].innerHTML = '​';
|
|
@@ -456,11 +504,15 @@ export function updateTextNode(value, rteObj) {
|
|
|
456
504
|
}
|
|
457
505
|
var imageElm = resultElm.querySelectorAll('img');
|
|
458
506
|
for (var i = 0; i < imageElm.length; i++) {
|
|
507
|
+
if (imageElm[i].classList.contains('e-rte-image-unsupported')) {
|
|
508
|
+
continue; // Should not add the class if the image is Broken.
|
|
509
|
+
}
|
|
459
510
|
if (!imageElm[i].classList.contains(classes.CLS_RTE_IMAGE)) {
|
|
460
511
|
imageElm[i].classList.add(classes.CLS_RTE_IMAGE);
|
|
461
512
|
}
|
|
462
513
|
if (!(imageElm[i].classList.contains(classes.CLS_IMGINLINE) ||
|
|
463
|
-
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'))) {
|
|
464
516
|
imageElm[i].classList.add(classes.CLS_IMGINLINE);
|
|
465
517
|
}
|
|
466
518
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { extend, isNullOrUndefined as isNOU, Browser } from '@syncfusion/ej2-base';
|
|
1
|
+
import { extend, isNullOrUndefined as isNOU, Browser, closest } from '@syncfusion/ej2-base';
|
|
2
2
|
import * as CONSTANT from '../base/constant';
|
|
3
3
|
import { updateUndoRedoStatus, isIDevice } from '../base/util';
|
|
4
4
|
import { KEY_DOWN, KEY_UP } from './../../common/constant';
|
|
@@ -27,12 +27,21 @@ var Formatter = /** @class */ (function () {
|
|
|
27
27
|
var selection = self.contentModule.getDocument().getSelection();
|
|
28
28
|
var range = (selection.rangeCount > 0) ? selection.getRangeAt(selection.rangeCount - 1) : null;
|
|
29
29
|
var saveSelection;
|
|
30
|
+
var newRange;
|
|
31
|
+
if (!isNOU(value) && !isNOU(value.selection)) {
|
|
32
|
+
newRange = value.selection.range;
|
|
33
|
+
}
|
|
30
34
|
var isKeyboardVideoInsert = (!isNOU(value) && !isNOU(value.cssClass) &&
|
|
31
35
|
value.cssClass !== 'e-video-inline');
|
|
32
36
|
if (self.editorMode === 'HTML') {
|
|
33
37
|
if (!isNOU(args) && !isKeyboardVideoInsert) {
|
|
34
38
|
if (isNOU(args.name) || (!isNOU(args.name) && args.name !== 'showDialog')) {
|
|
35
|
-
|
|
39
|
+
if (newRange) {
|
|
40
|
+
saveSelection = this.editorManager.nodeSelection.save(newRange, self.contentModule.getDocument());
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
saveSelection = this.editorManager.nodeSelection.save(range, self.contentModule.getDocument());
|
|
44
|
+
}
|
|
36
45
|
}
|
|
37
46
|
}
|
|
38
47
|
}
|
|
@@ -60,7 +69,7 @@ var Formatter = /** @class */ (function () {
|
|
|
60
69
|
if (args.item.command === 'Images' || args.item.command === 'Videos' || args.item.command === 'Table' || args.item.command === 'Files') {
|
|
61
70
|
currentInsertContentLength = 1;
|
|
62
71
|
}
|
|
63
|
-
var currentLength = self.getText().trim().length;
|
|
72
|
+
var currentLength = self.getText().trim().replace(/(\r\n|\n|\r|\t)/gm, '').replace(/\u200B/g, '').length;
|
|
64
73
|
var selectionLength = self.getSelection().length;
|
|
65
74
|
var totalLength = (currentLength - selectionLength) + currentInsertContentLength;
|
|
66
75
|
if (!(self.maxLength === -1 || totalLength <= self.maxLength)) {
|
|
@@ -124,7 +133,9 @@ var Formatter = /** @class */ (function () {
|
|
|
124
133
|
_this.saveData();
|
|
125
134
|
}
|
|
126
135
|
self.isBlur = false;
|
|
127
|
-
|
|
136
|
+
if (isNOU(saveSelection) || isNOU(closest(saveSelection.range.startContainer.parentElement, ".e-img-caption")) ? true : !(closest(saveSelection.range.startContainer.parentElement, ".e-img-caption").getAttribute("contenteditable") == "false")) {
|
|
137
|
+
self.contentModule.getEditPanel().focus();
|
|
138
|
+
}
|
|
128
139
|
if (self.editorMode === 'HTML' && !isKeyboardVideoInsert) {
|
|
129
140
|
if (isNOU(args.selectType) || (!isNOU(args.selectType) && args.selectType !== 'showDialog')) {
|
|
130
141
|
saveSelection.restore();
|
|
@@ -48,11 +48,11 @@ export var defaultLocale = {
|
|
|
48
48
|
'audioLayoutOption': 'Layout option',
|
|
49
49
|
'videoLayoutOption': 'Layout option',
|
|
50
50
|
'align': 'Align',
|
|
51
|
-
'caption': '
|
|
51
|
+
'caption': 'Caption',
|
|
52
52
|
'remove': 'Remove',
|
|
53
53
|
'insertLink': 'Insert Link',
|
|
54
54
|
'display': 'Display',
|
|
55
|
-
'altText': 'Alternative
|
|
55
|
+
'altText': 'Alternative text',
|
|
56
56
|
'dimension': 'Change Size',
|
|
57
57
|
'fullscreen': 'Maximize',
|
|
58
58
|
'maximize': 'Maximize',
|
|
@@ -65,12 +65,12 @@ export var defaultLocale = {
|
|
|
65
65
|
'preview': 'Preview',
|
|
66
66
|
'viewside': 'ViewSide',
|
|
67
67
|
'insertCode': 'Insert Code',
|
|
68
|
-
'linkText': 'Display
|
|
68
|
+
'linkText': 'Display text',
|
|
69
69
|
'linkTooltipLabel': 'Title',
|
|
70
|
-
'linkWebUrl': 'Web
|
|
70
|
+
'linkWebUrl': 'Web address',
|
|
71
71
|
'linkTitle': 'Enter a title',
|
|
72
|
-
'linkurl': '
|
|
73
|
-
'linkOpenInNewWindow': 'Open
|
|
72
|
+
'linkurl': 'https://example.com',
|
|
73
|
+
'linkOpenInNewWindow': 'Open link in new window',
|
|
74
74
|
'linkHeader': 'Insert Link',
|
|
75
75
|
'dialogInsert': 'Insert',
|
|
76
76
|
'dialogCancel': 'Cancel',
|
|
@@ -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',
|
|
@@ -104,7 +104,7 @@ export var defaultLocale = {
|
|
|
104
104
|
'imageWidth': 'Width',
|
|
105
105
|
'videoHeight': 'Height',
|
|
106
106
|
'videoWidth': 'Width',
|
|
107
|
-
'textPlaceholder': 'Enter
|
|
107
|
+
'textPlaceholder': 'Enter text',
|
|
108
108
|
'inserttablebtn': 'Insert Table',
|
|
109
109
|
'tabledialogHeader': 'Insert Table',
|
|
110
110
|
'tableWidth': 'Width',
|
|
@@ -112,14 +112,14 @@ export var defaultLocale = {
|
|
|
112
112
|
'cellspacing': 'Cell Spacing',
|
|
113
113
|
'columns': 'Number of columns',
|
|
114
114
|
'rows': 'Number of rows',
|
|
115
|
-
'tableRows': '
|
|
116
|
-
'tableColumns': '
|
|
115
|
+
'tableRows': 'Row',
|
|
116
|
+
'tableColumns': 'Column',
|
|
117
117
|
'tableCellHorizontalAlign': 'Table Cell Horizontal Align',
|
|
118
|
-
'tableCellVerticalAlign': '
|
|
118
|
+
'tableCellVerticalAlign': 'Vertical Align',
|
|
119
119
|
'createTable': 'Create Table',
|
|
120
120
|
'removeTable': 'Remove Table',
|
|
121
|
-
'tableHeader': '
|
|
122
|
-
'tableRemove': 'Table
|
|
121
|
+
'tableHeader': 'Header Row',
|
|
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',
|
|
@@ -193,12 +193,16 @@ export var defaultLocale = {
|
|
|
193
193
|
'bulletFormatListNone': 'None',
|
|
194
194
|
'formatPainter': 'Format Painter',
|
|
195
195
|
'emojiPicker': 'Emoji Picker',
|
|
196
|
-
'embeddedCode': 'Embedded
|
|
197
|
-
'pasteEmbeddedCodeHere': 'Paste
|
|
196
|
+
'embeddedCode': 'Embedded code',
|
|
197
|
+
'pasteEmbeddedCodeHere': 'Paste embedded code here',
|
|
198
198
|
'emojiPickerTypeToFind': 'Type to find',
|
|
199
199
|
'emojiPickerNoResultFound': 'No results found',
|
|
200
200
|
'emojiPickerTrySomethingElse': 'Try something else',
|
|
201
201
|
'linkAriaLabel': 'Open in new window',
|
|
202
|
+
'unsupportedImage': 'Unsupported file format',
|
|
203
|
+
'mergecells': 'Merge cells',
|
|
204
|
+
'verticalsplit': 'Vertical split',
|
|
205
|
+
'horizontalsplit': 'Horizontal split'
|
|
202
206
|
};
|
|
203
207
|
export var toolsLocale = {
|
|
204
208
|
'alignments': 'alignments',
|
|
@@ -227,6 +231,7 @@ export var toolsLocale = {
|
|
|
227
231
|
'bulletformatlist': 'bulletFormatList',
|
|
228
232
|
'undo': 'undo',
|
|
229
233
|
'redo': 'redo',
|
|
234
|
+
'filemanager': 'fileManager',
|
|
230
235
|
'superscript': 'superscript',
|
|
231
236
|
'subscript': 'subscript',
|
|
232
237
|
'createlink': 'createLink',
|
|
@@ -253,7 +258,7 @@ export var toolsLocale = {
|
|
|
253
258
|
'remove': 'remove',
|
|
254
259
|
'insertlink': 'insertLink',
|
|
255
260
|
'display': 'display',
|
|
256
|
-
'alttext': '
|
|
261
|
+
'alttext': 'alternateHeader',
|
|
257
262
|
'dimension': 'dimension',
|
|
258
263
|
'fullscreen': 'fullscreen',
|
|
259
264
|
'maximize': 'maximize',
|
|
@@ -288,11 +293,12 @@ export var toolsLocale = {
|
|
|
288
293
|
'deleterow': 'deleteRow',
|
|
289
294
|
'formatpainter': 'formatPainter',
|
|
290
295
|
'emojipicker': 'emojiPicker',
|
|
291
|
-
'embeddedCode': 'Embedded
|
|
292
|
-
'pasteEmbeddedCodeHere': 'Paste
|
|
296
|
+
'embeddedCode': 'Embedded code',
|
|
297
|
+
'pasteEmbeddedCodeHere': 'Paste embedded code here',
|
|
293
298
|
'emojiPickerTypeToFind': 'Type to find',
|
|
294
299
|
'emojiPickerNoResultFound': 'No results found',
|
|
295
300
|
'emojiPickerTrySomethingElse': 'Try something else',
|
|
301
|
+
'imageLinkAriaLabel': 'Open in new window',
|
|
296
302
|
};
|
|
297
303
|
export var fontNameLocale = [
|
|
298
304
|
{ locale: 'fontNameSegoeUI', value: 'Segoe UI' },
|
|
@@ -457,14 +457,14 @@ export var tools = {
|
|
|
457
457
|
'sourcecode': {
|
|
458
458
|
'id': 'SourceCode',
|
|
459
459
|
'icon': 'e-source-code',
|
|
460
|
-
'tooltip': '
|
|
460
|
+
'tooltip': 'Code View (Ctrl+Shift+H)',
|
|
461
461
|
'command': 'SourceCode',
|
|
462
462
|
'subCommand': 'SourceCode'
|
|
463
463
|
},
|
|
464
464
|
'preview': {
|
|
465
465
|
'id': 'Preview',
|
|
466
466
|
'icon': 'e-preview',
|
|
467
|
-
'tooltip': 'Preview',
|
|
467
|
+
'tooltip': 'Preview (Ctrl+Shift+H)',
|
|
468
468
|
'command': 'Preview',
|
|
469
469
|
'subCommand': 'Preview'
|
|
470
470
|
},
|
|
@@ -780,7 +780,7 @@ export var windowKeys = {
|
|
|
780
780
|
'Number Format List': 'Ctrl+Shift+O',
|
|
781
781
|
'Bullet Format List': 'Ctrl+Alt+O',
|
|
782
782
|
'Insert Audio': 'Ctrl+Shift+A',
|
|
783
|
-
'Insert Video': 'Ctrl+
|
|
783
|
+
'Insert Video': 'Ctrl+Alt+V',
|
|
784
784
|
'Increase Indent': 'Ctrl+]',
|
|
785
785
|
'Decrease Indent': 'Ctrl+[',
|
|
786
786
|
'Decrease Fontsize': 'Ctrl+Shift+<',
|
|
@@ -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)
|
|
@@ -239,6 +239,13 @@ var Audio = /** @class */ (function () {
|
|
|
239
239
|
originalEvent.preventDefault();
|
|
240
240
|
break;
|
|
241
241
|
}
|
|
242
|
+
if (originalEvent.ctrlKey && originalEvent.key === 'a') {
|
|
243
|
+
this.handleSelectAll();
|
|
244
|
+
}
|
|
245
|
+
};
|
|
246
|
+
Audio.prototype.handleSelectAll = function () {
|
|
247
|
+
var audioFocusNodes = this.parent.inputElement.querySelectorAll('.' + classes.CLS_AUD_FOCUS);
|
|
248
|
+
removeClass(audioFocusNodes, classes.CLS_AUD_FOCUS);
|
|
242
249
|
};
|
|
243
250
|
Audio.prototype.openDialog = function (isInternal, event, selection, ele, parentEle) {
|
|
244
251
|
var range;
|
|
@@ -379,6 +386,7 @@ var Audio = /** @class */ (function () {
|
|
|
379
386
|
if (e.offsetX > e.target.clientWidth || e.offsetY > e.target.clientHeight) {
|
|
380
387
|
}
|
|
381
388
|
else {
|
|
389
|
+
this.parent.notify(events.documentClickClosedBy, { closedBy: "outside click" });
|
|
382
390
|
this.dialogObj.hide({ returnValue: true });
|
|
383
391
|
this.parent.isBlur = true;
|
|
384
392
|
dispatchEvent(this.parent.element, 'focusout');
|
|
@@ -640,6 +648,11 @@ var Audio = /** @class */ (function () {
|
|
|
640
648
|
}
|
|
641
649
|
}
|
|
642
650
|
});
|
|
651
|
+
if (e.selectNode && this.isAudioElem(e.selectNode[0])) {
|
|
652
|
+
var regex = new RegExp(/([^\S]|^)(((https?\:\/\/)|(www\.))(\S+))/gi);
|
|
653
|
+
var sourceElement = e.selectNode[0].querySelector('source');
|
|
654
|
+
this.inputUrl.value = sourceElement.src.match(regex) ? sourceElement.src : '';
|
|
655
|
+
}
|
|
643
656
|
audioUrl.appendChild(this.inputUrl);
|
|
644
657
|
return audioUrl;
|
|
645
658
|
};
|
|
@@ -7,6 +7,7 @@ export declare class DialogRenderer {
|
|
|
7
7
|
dialogObj: Dialog;
|
|
8
8
|
private dialogEle;
|
|
9
9
|
private parent;
|
|
10
|
+
private outsideClickClosedBy;
|
|
10
11
|
constructor(parent?: IRichTextEditor);
|
|
11
12
|
protected addEventListener(): void;
|
|
12
13
|
protected removeEventListener(): void;
|
|
@@ -23,6 +24,7 @@ export declare class DialogRenderer {
|
|
|
23
24
|
private handleEnterKeyDown;
|
|
24
25
|
private beforeOpenCallback;
|
|
25
26
|
private open;
|
|
27
|
+
private documentClickClosedBy;
|
|
26
28
|
private beforeClose;
|
|
27
29
|
private getDialogPosition;
|
|
28
30
|
/**
|
|
@@ -15,6 +15,7 @@ var DialogRenderer = /** @class */ (function () {
|
|
|
15
15
|
}
|
|
16
16
|
this.parent.on(events.moduleDestroy, this.moduleDestroy, this);
|
|
17
17
|
this.parent.on(events.destroy, this.removeEventListener, this);
|
|
18
|
+
this.parent.on(events.documentClickClosedBy, this.documentClickClosedBy, this);
|
|
18
19
|
};
|
|
19
20
|
DialogRenderer.prototype.removeEventListener = function () {
|
|
20
21
|
if (this.parent.isDestroyed) {
|
|
@@ -22,6 +23,7 @@ var DialogRenderer = /** @class */ (function () {
|
|
|
22
23
|
}
|
|
23
24
|
this.parent.off(events.destroy, this.removeEventListener);
|
|
24
25
|
this.parent.off(events.moduleDestroy, this.moduleDestroy);
|
|
26
|
+
this.parent.off(events.documentClickClosedBy, this.documentClickClosedBy);
|
|
25
27
|
};
|
|
26
28
|
/**
|
|
27
29
|
* dialog render method
|
|
@@ -35,7 +37,11 @@ var DialogRenderer = /** @class */ (function () {
|
|
|
35
37
|
var dlgObj;
|
|
36
38
|
e.beforeOpen = this.beforeOpen.bind(this);
|
|
37
39
|
e.open = this.open.bind(this);
|
|
38
|
-
e.position = {
|
|
40
|
+
e.position = {
|
|
41
|
+
X: 'center',
|
|
42
|
+
Y: (e.target !== 'string' && e.target.nodeName === 'BODY' &&
|
|
43
|
+
!isNOU(e.position)) ? e.position.Y : this.getDialogPosition()
|
|
44
|
+
};
|
|
39
45
|
if (isNOU(e.close)) {
|
|
40
46
|
e.close = this.close.bind(this);
|
|
41
47
|
}
|
|
@@ -68,10 +74,14 @@ var DialogRenderer = /** @class */ (function () {
|
|
|
68
74
|
DialogRenderer.prototype.open = function (args) {
|
|
69
75
|
this.parent.trigger(events.dialogOpen, args);
|
|
70
76
|
};
|
|
77
|
+
DialogRenderer.prototype.documentClickClosedBy = function (args) {
|
|
78
|
+
this.outsideClickClosedBy = args.closedBy;
|
|
79
|
+
};
|
|
71
80
|
DialogRenderer.prototype.beforeClose = function (args) {
|
|
72
81
|
if (this.dialogEle) {
|
|
73
82
|
this.dialogEle.removeEventListener('keydown', this.handleEnterKeyDown);
|
|
74
83
|
}
|
|
84
|
+
args.closedBy = this.outsideClickClosedBy === 'outside click' ? this.outsideClickClosedBy : args.closedBy;
|
|
75
85
|
this.parent.trigger(events.beforeDialogClose, args, function (closeArgs) {
|
|
76
86
|
if (!closeArgs.cancel) {
|
|
77
87
|
if (closeArgs.container.classList.contains('e-popup-close')) {
|
|
@@ -79,11 +89,21 @@ var DialogRenderer = /** @class */ (function () {
|
|
|
79
89
|
}
|
|
80
90
|
}
|
|
81
91
|
});
|
|
92
|
+
this.outsideClickClosedBy = "";
|
|
82
93
|
};
|
|
83
94
|
DialogRenderer.prototype.getDialogPosition = function () {
|
|
84
95
|
var distanceFromVisibleTop = this.parent.element.getBoundingClientRect().top;
|
|
85
96
|
if (distanceFromVisibleTop < 0) {
|
|
86
|
-
|
|
97
|
+
var topHeight = 0;
|
|
98
|
+
var parentElement = this.parent.element;
|
|
99
|
+
while (parentElement.nodeName !== 'BODY') {
|
|
100
|
+
var top_1 = parentElement.getBoundingClientRect().top;
|
|
101
|
+
if (top_1 > 0) {
|
|
102
|
+
topHeight = top_1;
|
|
103
|
+
}
|
|
104
|
+
parentElement = parentElement.parentElement;
|
|
105
|
+
}
|
|
106
|
+
distanceFromVisibleTop = Math.abs(distanceFromVisibleTop) + topHeight;
|
|
87
107
|
return distanceFromVisibleTop.toString();
|
|
88
108
|
}
|
|
89
109
|
else {
|
|
@@ -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-
|
|
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;
|
|
@@ -67,6 +74,7 @@ export declare class Image {
|
|
|
67
74
|
private editImgLink;
|
|
68
75
|
private removeImgLink;
|
|
69
76
|
private onKeyDown;
|
|
77
|
+
private handleSelectAll;
|
|
70
78
|
private openDialog;
|
|
71
79
|
private showDialog;
|
|
72
80
|
private closeDialog;
|