@syncfusion/ej2-richtexteditor 21.1.39 → 21.2.3
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 +20 -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 +187 -92
- package/dist/es6/ej2-richtexteditor.es2015.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es5.js +187 -93
- 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 -16
- package/src/editor-manager/plugin/clearformat-exec.js +1 -1
- package/src/editor-manager/plugin/clearformat.d.ts +1 -1
- package/src/editor-manager/plugin/clearformat.js +2 -2
- package/src/editor-manager/plugin/selection-commands.d.ts +1 -0
- package/src/editor-manager/plugin/selection-commands.js +102 -63
- package/src/rich-text-editor/actions/paste-clean-up.d.ts +2 -0
- package/src/rich-text-editor/actions/paste-clean-up.js +60 -23
- package/src/rich-text-editor/actions/xhtml-validation.js +2 -1
- package/src/rich-text-editor/base/rich-text-editor.js +18 -0
- package/src/rich-text-editor/renderer/iframe-content-renderer.js +1 -1
- package/src/rich-text-editor/renderer/video-module.js +2 -2
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 21.
|
|
3
|
+
* version : 21.2.3
|
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2020. All rights reserved.
|
|
5
5
|
* Use of this code is subject to the terms of our license.
|
|
6
6
|
* A copy of the current license can be obtained at any time by e-mailing
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"_from": "@syncfusion/ej2-richtexteditor@*",
|
|
3
|
-
"_id": "@syncfusion/ej2-richtexteditor@21.1.
|
|
3
|
+
"_id": "@syncfusion/ej2-richtexteditor@21.1.41",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-sZ+UzPwJaEg2z7jTscOziWpIJmJSRML5niE2J0Pq1UauQLPicefJT4M3a+qqWqQM7Nrw/cMMTXaR+7LIACWH5w==",
|
|
6
6
|
"_location": "/@syncfusion/ej2-richtexteditor",
|
|
7
7
|
"_phantomChildren": {},
|
|
8
8
|
"_requested": {
|
|
@@ -19,15 +19,12 @@
|
|
|
19
19
|
"_requiredBy": [
|
|
20
20
|
"/",
|
|
21
21
|
"/@syncfusion/ej2",
|
|
22
|
-
"/@syncfusion/ej2-angular-richtexteditor",
|
|
23
22
|
"/@syncfusion/ej2-gantt",
|
|
24
23
|
"/@syncfusion/ej2-inplace-editor",
|
|
25
|
-
"/@syncfusion/ej2-pdfviewer"
|
|
26
|
-
"/@syncfusion/ej2-react-richtexteditor",
|
|
27
|
-
"/@syncfusion/ej2-vue-richtexteditor"
|
|
24
|
+
"/@syncfusion/ej2-pdfviewer"
|
|
28
25
|
],
|
|
29
|
-
"_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-richtexteditor/-/ej2-richtexteditor-21.1.
|
|
30
|
-
"_shasum": "
|
|
26
|
+
"_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-richtexteditor/-/ej2-richtexteditor-21.1.41.tgz",
|
|
27
|
+
"_shasum": "424e4613c9bdab39c5a2aafa1da22f8e2bedb831",
|
|
31
28
|
"_spec": "@syncfusion/ej2-richtexteditor@*",
|
|
32
29
|
"_where": "/jenkins/workspace/elease-automation_release_21.1.1/packages/included",
|
|
33
30
|
"author": {
|
|
@@ -38,13 +35,13 @@
|
|
|
38
35
|
},
|
|
39
36
|
"bundleDependencies": false,
|
|
40
37
|
"dependencies": {
|
|
41
|
-
"@syncfusion/ej2-base": "~21.
|
|
42
|
-
"@syncfusion/ej2-buttons": "~21.
|
|
43
|
-
"@syncfusion/ej2-filemanager": "~21.
|
|
44
|
-
"@syncfusion/ej2-inputs": "~21.
|
|
45
|
-
"@syncfusion/ej2-navigations": "~21.
|
|
46
|
-
"@syncfusion/ej2-popups": "~21.
|
|
47
|
-
"@syncfusion/ej2-splitbuttons": "~21.
|
|
38
|
+
"@syncfusion/ej2-base": "~21.2.3",
|
|
39
|
+
"@syncfusion/ej2-buttons": "~21.2.3",
|
|
40
|
+
"@syncfusion/ej2-filemanager": "~21.2.3",
|
|
41
|
+
"@syncfusion/ej2-inputs": "~21.2.3",
|
|
42
|
+
"@syncfusion/ej2-navigations": "~21.2.3",
|
|
43
|
+
"@syncfusion/ej2-popups": "~21.2.3",
|
|
44
|
+
"@syncfusion/ej2-splitbuttons": "~21.2.3"
|
|
48
45
|
},
|
|
49
46
|
"deprecated": false,
|
|
50
47
|
"description": "Essential JS 2 RichTextEditor component",
|
|
@@ -70,6 +67,6 @@
|
|
|
70
67
|
"url": "git+https://github.com/syncfusion/ej2-javascript-ui-controls.git"
|
|
71
68
|
},
|
|
72
69
|
"typings": "index.d.ts",
|
|
73
|
-
"version": "21.
|
|
70
|
+
"version": "21.2.3",
|
|
74
71
|
"sideEffects": false
|
|
75
72
|
}
|
|
@@ -34,7 +34,7 @@ var ClearFormatExec = /** @class */ (function () {
|
|
|
34
34
|
};
|
|
35
35
|
ClearFormatExec.prototype.applyClear = function (e) {
|
|
36
36
|
if (e.subCommand === 'ClearFormat') {
|
|
37
|
-
ClearFormat.clear(this.parent.currentDocument, this.parent.editableElement, e.enterAction, e.selector);
|
|
37
|
+
ClearFormat.clear(this.parent.currentDocument, this.parent.editableElement, e.enterAction, e.selector, e.subCommand);
|
|
38
38
|
if (e.callBack) {
|
|
39
39
|
e.callBack({
|
|
40
40
|
requestType: e.subCommand,
|
|
@@ -16,7 +16,7 @@ export declare class ClearFormat {
|
|
|
16
16
|
* @hidden
|
|
17
17
|
|
|
18
18
|
*/
|
|
19
|
-
static clear(docElement: Document, endNode: Node, enterAction: string, selector?: string): void;
|
|
19
|
+
static clear(docElement: Document, endNode: Node, enterAction: string, selector?: string, command?: string): void;
|
|
20
20
|
private static reSelection;
|
|
21
21
|
private static clearBlocks;
|
|
22
22
|
private static spliceParent;
|
|
@@ -22,7 +22,7 @@ var ClearFormat = /** @class */ (function () {
|
|
|
22
22
|
* @hidden
|
|
23
23
|
|
|
24
24
|
*/
|
|
25
|
-
ClearFormat.clear = function (docElement, endNode, enterAction, selector) {
|
|
25
|
+
ClearFormat.clear = function (docElement, endNode, enterAction, selector, command) {
|
|
26
26
|
this.domNode = new DOMNode(endNode, docElement);
|
|
27
27
|
this.defaultTag = enterAction === 'P' ? this.defaultTag : 'div';
|
|
28
28
|
var nodeSelection = new NodeSelection();
|
|
@@ -32,7 +32,7 @@ var ClearFormat = /** @class */ (function () {
|
|
|
32
32
|
nodeSelection.getSelectionNodeCollectionBr(range);
|
|
33
33
|
var save = nodeSelection.save(range, docElement);
|
|
34
34
|
var cursorRange = false;
|
|
35
|
-
if (range.collapsed) {
|
|
35
|
+
if (range.collapsed && command !== 'ClearFormat') {
|
|
36
36
|
cursorRange = true;
|
|
37
37
|
range = nodeCutter.GetCursorRange(docElement, range, nodes[0]);
|
|
38
38
|
}
|
|
@@ -21,6 +21,7 @@ export declare class SelectionCommands {
|
|
|
21
21
|
private static removeFormat;
|
|
22
22
|
private static insertFormat;
|
|
23
23
|
private static applyStyles;
|
|
24
|
+
private static getPriorityFormatNode;
|
|
24
25
|
private static getInsertNode;
|
|
25
26
|
private static getChildNode;
|
|
26
27
|
private static applySelection;
|
|
@@ -96,18 +96,13 @@ var SelectionCommands = /** @class */ (function () {
|
|
|
96
96
|
isSubSup = formatNode === null ? false : true;
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
|
-
else if ((format === 'fontsize' || format === 'fontname' || format === 'fontcolor' || format === 'backgroundcolor') && range.startContainer.parentElement === endNode) {
|
|
100
|
-
formatNode = null;
|
|
101
|
-
}
|
|
102
99
|
if (index === 0 && formatNode === null) {
|
|
103
100
|
isFormat = true;
|
|
104
101
|
}
|
|
105
102
|
if (formatNode !== null && (!isFormat || isFontStyle)) {
|
|
106
103
|
nodes[index] = this.removeFormat(nodes, index, formatNode, isCursor, isFormat, isFontStyle, range, nodeCutter, format, value, domSelection, endNode, domNode);
|
|
107
104
|
}
|
|
108
|
-
else
|
|
109
|
-
(range.commonAncestorContainer !== endNode && range.startContainer.parentElement === endNode)
|
|
110
|
-
|| (range.commonAncestorContainer === endNode || nodes.length === 1)) {
|
|
105
|
+
else {
|
|
111
106
|
nodes[index] = this.insertFormat(docElement, nodes, index, formatNode, isCursor, isFormat, isFontStyle, range, nodeCutter, format, value, painterValues, domNode, endNode);
|
|
112
107
|
}
|
|
113
108
|
domSelection = this.applySelection(nodes, domSelection, nodeCutter, index, isCollapsed);
|
|
@@ -259,6 +254,27 @@ var SelectionCommands = /** @class */ (function () {
|
|
|
259
254
|
nodes[index] = lastNode.firstChild;
|
|
260
255
|
}
|
|
261
256
|
}
|
|
257
|
+
else if (isFontStyle && !nodes[index].contains(formatNode) && nodes[index].nodeType === 3 &&
|
|
258
|
+
nodes[index].textContent !== formatNode.textContent) {
|
|
259
|
+
// If the selection is within the format node .
|
|
260
|
+
var isFullNodeSelected = nodes[index].textContent === nodes[index].wholeText;
|
|
261
|
+
var nodeTraverse = nodes[index];
|
|
262
|
+
var styleElement = this.GetFormatNode(format, value);
|
|
263
|
+
// while loop and traverse back until text content does not match with parent text content
|
|
264
|
+
while (nodeTraverse && nodeTraverse.textContent === nodeTraverse.parentElement.textContent) {
|
|
265
|
+
nodeTraverse = nodeTraverse.parentElement;
|
|
266
|
+
}
|
|
267
|
+
if (isFullNodeSelected && formatNode.textContent !== nodeTraverse.textContent) {
|
|
268
|
+
var nodeArray = [];
|
|
269
|
+
var priorityNode = this.getPriorityFormatNode(nodeTraverse, endNode);
|
|
270
|
+
if (priorityNode && priorityNode.textContent === nodeTraverse.textContent) {
|
|
271
|
+
nodeTraverse = priorityNode;
|
|
272
|
+
}
|
|
273
|
+
nodeArray.push(nodeTraverse);
|
|
274
|
+
this.applyStyles(nodeArray, 0, styleElement);
|
|
275
|
+
return nodes[index];
|
|
276
|
+
}
|
|
277
|
+
}
|
|
262
278
|
var fontStyle;
|
|
263
279
|
if (format === 'backgroundcolor') {
|
|
264
280
|
fontStyle = formatNode.style.fontSize;
|
|
@@ -405,23 +421,9 @@ var SelectionCommands = /** @class */ (function () {
|
|
|
405
421
|
return nodes[index];
|
|
406
422
|
};
|
|
407
423
|
SelectionCommands.insertFormat = function (docElement, nodes, index, formatNode, isCursor, isFormat, isFontStyle, range, nodeCutter, format, value, painterValues, domNode, endNode) {
|
|
408
|
-
var rootElementNode;
|
|
409
424
|
if (!isCursor) {
|
|
410
425
|
if ((formatNode === null && isFormat) || isFontStyle) {
|
|
411
426
|
if (nodes[index].nodeName !== 'BR') {
|
|
412
|
-
if (format === 'fontsize' || format === 'fontname' || format === 'fontcolor' || format === 'backgroundcolor') {
|
|
413
|
-
var rangeNode = nodes[index];
|
|
414
|
-
while (rangeNode && !domNode.isBlockNode(rangeNode) && rangeNode !== endNode) {
|
|
415
|
-
if (domNode.isBlockNode(rangeNode.parentElement)) {
|
|
416
|
-
rootElementNode = rangeNode;
|
|
417
|
-
}
|
|
418
|
-
rangeNode = rangeNode.parentElement;
|
|
419
|
-
}
|
|
420
|
-
if (rootElementNode && rootElementNode.nodeType !== 3) {
|
|
421
|
-
nodeCutter.SplitNode(range, rootElementNode, true).cloneNode(true);
|
|
422
|
-
nodeCutter.SplitNode(range, rootElementNode, false).cloneNode(false);
|
|
423
|
-
}
|
|
424
|
-
}
|
|
425
427
|
nodes[index] = nodeCutter.GetSpliceNode(range, nodes[index]);
|
|
426
428
|
nodes[index].textContent = nodeCutter.TrimLineBreak(nodes[index].textContent);
|
|
427
429
|
}
|
|
@@ -431,57 +433,63 @@ var SelectionCommands = /** @class */ (function () {
|
|
|
431
433
|
}
|
|
432
434
|
else if (!(isFontStyle === true && value === '')) {
|
|
433
435
|
var element = this.GetFormatNode(format, value);
|
|
434
|
-
if (value === 'formatPainter' ||
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
436
|
+
if (value === 'formatPainter' || isFontStyle) {
|
|
437
|
+
var liElement = nodes[index].parentElement;
|
|
438
|
+
var parentElement = nodes[index].parentElement;
|
|
439
|
+
while (!isNOU(parentElement) && parentElement.tagName.toLowerCase() !== 'li') {
|
|
440
|
+
parentElement = parentElement.parentElement;
|
|
441
|
+
liElement = parentElement;
|
|
442
|
+
}
|
|
443
|
+
if (!isNOU(liElement) && liElement.tagName.toLowerCase() === 'li' &&
|
|
444
|
+
liElement.textContent.trim() === nodes[index].textContent.trim()) {
|
|
445
|
+
if (format === 'fontsize') {
|
|
446
|
+
liElement.style.fontSize = value;
|
|
441
447
|
}
|
|
442
|
-
if (
|
|
443
|
-
liElement.
|
|
444
|
-
|
|
445
|
-
liElement.style.fontSize = value;
|
|
446
|
-
}
|
|
447
|
-
else {
|
|
448
|
-
liElement.style.color = value;
|
|
449
|
-
liElement.style.textDecoration = 'inherit';
|
|
450
|
-
}
|
|
448
|
+
else if (format === 'fontcolor') {
|
|
449
|
+
liElement.style.color = value;
|
|
450
|
+
liElement.style.textDecoration = 'inherit';
|
|
451
451
|
}
|
|
452
452
|
}
|
|
453
|
-
if (
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
var
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
453
|
+
if (value === 'formatPainter') {
|
|
454
|
+
return this.insertFormatPainterElem(nodes, index, range, nodeCutter, painterValues, domNode);
|
|
455
|
+
}
|
|
456
|
+
var currentNode = nodes[index];
|
|
457
|
+
var priorityNode = this.getPriorityFormatNode(currentNode, endNode);
|
|
458
|
+
// 1. Checking is there any priority node present in the selection range. (Use case for nested styles);
|
|
459
|
+
// 2 Or font style is applied. (Use case not a nested style)
|
|
460
|
+
if (!isNOU(priorityNode) || isFontStyle) {
|
|
461
|
+
var currentFormatNode = isNOU(priorityNode) ? currentNode : priorityNode;
|
|
462
|
+
currentFormatNode = !isNOU(priorityNode) && priorityNode.style.fontSize !== '' ?
|
|
463
|
+
currentFormatNode.firstChild : currentFormatNode;
|
|
464
|
+
if (isNOU(priorityNode) || format === 'fontsize') {
|
|
465
|
+
while (currentFormatNode) {
|
|
466
|
+
var isSameTextContent = currentFormatNode.parentElement.textContent.trim()
|
|
467
|
+
=== nodes[index].textContent.trim();
|
|
468
|
+
if (!domNode.isBlockNode(currentFormatNode.parentElement) && isSameTextContent) {
|
|
469
|
+
currentFormatNode = currentFormatNode.parentElement;
|
|
470
|
+
}
|
|
471
|
+
else {
|
|
472
|
+
break;
|
|
473
|
+
}
|
|
468
474
|
}
|
|
469
475
|
}
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
476
|
+
var nodeList = [];
|
|
477
|
+
// Since color is different for different themnes, we need to wrap the fontColor over the text node.
|
|
478
|
+
if (format === 'fontcolor') {
|
|
479
|
+
var closestAnchor = closest(nodes[index].parentElement, 'A');
|
|
480
|
+
if (!isNOU(closestAnchor) && closestAnchor.firstChild.textContent.trim()
|
|
481
|
+
=== nodes[index].textContent.trim()) {
|
|
482
|
+
currentFormatNode = nodes[index];
|
|
483
|
+
}
|
|
475
484
|
}
|
|
476
|
-
|
|
477
|
-
|
|
485
|
+
if (nodes[index].textContent.trim() !== currentFormatNode.textContent.trim()) {
|
|
486
|
+
currentFormatNode = nodes[index];
|
|
478
487
|
}
|
|
488
|
+
nodeList[0] = currentFormatNode;
|
|
489
|
+
this.applyStyles(nodeList, 0, element);
|
|
479
490
|
}
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
if (!isNOU(bg)) {
|
|
483
|
-
nodes[index].parentElement.style.backgroundColor = bg.style.backgroundColor;
|
|
484
|
-
}
|
|
491
|
+
else {
|
|
492
|
+
nodes[index] = this.applyStyles(nodes, index, element);
|
|
485
493
|
}
|
|
486
494
|
}
|
|
487
495
|
else {
|
|
@@ -514,6 +522,37 @@ var SelectionCommands = /** @class */ (function () {
|
|
|
514
522
|
}
|
|
515
523
|
return nodes[index];
|
|
516
524
|
};
|
|
525
|
+
SelectionCommands.getPriorityFormatNode = function (node, endNode) {
|
|
526
|
+
var isFormatted = new IsFormatted();
|
|
527
|
+
var fontSizeNode = isFormatted.getFormattedNode(node, 'fontsize', endNode);
|
|
528
|
+
var fontColorNode;
|
|
529
|
+
var backgroundColorNode;
|
|
530
|
+
var fontNameNode;
|
|
531
|
+
if (isNOU(fontSizeNode)) {
|
|
532
|
+
backgroundColorNode = isFormatted.getFormattedNode(node, 'backgroundcolor', endNode);
|
|
533
|
+
if (isNOU(backgroundColorNode)) {
|
|
534
|
+
fontNameNode = isFormatted.getFormattedNode(node, 'fontname', endNode);
|
|
535
|
+
if (isNOU(fontNameNode)) {
|
|
536
|
+
fontColorNode = isFormatted.getFormattedNode(node, 'fontcolor', endNode);
|
|
537
|
+
if (isNOU(fontColorNode)) {
|
|
538
|
+
return null;
|
|
539
|
+
}
|
|
540
|
+
else {
|
|
541
|
+
return fontColorNode;
|
|
542
|
+
}
|
|
543
|
+
}
|
|
544
|
+
else {
|
|
545
|
+
return fontNameNode;
|
|
546
|
+
}
|
|
547
|
+
}
|
|
548
|
+
else {
|
|
549
|
+
return backgroundColorNode;
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
else {
|
|
553
|
+
return fontSizeNode;
|
|
554
|
+
}
|
|
555
|
+
};
|
|
517
556
|
SelectionCommands.getInsertNode = function (docElement, range, format, value) {
|
|
518
557
|
var element = this.GetFormatNode(format, value);
|
|
519
558
|
element.innerHTML = '​';
|
|
@@ -27,6 +27,7 @@ export declare class PasteCleanup {
|
|
|
27
27
|
private destroy;
|
|
28
28
|
private removeEventListener;
|
|
29
29
|
private pasteClean;
|
|
30
|
+
private fireFoxImageUpload;
|
|
30
31
|
private splitBreakLine;
|
|
31
32
|
private makeSpace;
|
|
32
33
|
private imgUploading;
|
|
@@ -55,6 +56,7 @@ export declare class PasteCleanup {
|
|
|
55
56
|
private destroyDialog;
|
|
56
57
|
private cleanAppleClass;
|
|
57
58
|
private formatting;
|
|
59
|
+
private setImageProperties;
|
|
58
60
|
private addTempClass;
|
|
59
61
|
private removeTempClass;
|
|
60
62
|
private sanitizeHelper;
|
|
@@ -5,6 +5,7 @@ import { isNullOrUndefined as isNOU, isNullOrUndefined, detach, extend, addClass
|
|
|
5
5
|
import { getUniqueID, Browser } from '@syncfusion/ej2-base';
|
|
6
6
|
import { CLS_RTE_PASTE_KEEP_FORMAT, CLS_RTE_PASTE_REMOVE_FORMAT, CLS_RTE_PASTE_PLAIN_FORMAT } from '../base/classes';
|
|
7
7
|
import { CLS_RTE_PASTE_OK, CLS_RTE_PASTE_CANCEL, CLS_RTE_DIALOG_MIN_HEIGHT } from '../base/classes';
|
|
8
|
+
import { CLS_RTE_IMAGE, CLS_IMGINLINE, CLS_IMGBREAK } from '../base/classes';
|
|
8
9
|
import { pasteCleanupGroupingTags } from '../../common/config';
|
|
9
10
|
import { NodeSelection } from '../../selection/selection';
|
|
10
11
|
import * as EVENTS from './../../common/constant';
|
|
@@ -120,14 +121,22 @@ var PasteCleanup = /** @class */ (function () {
|
|
|
120
121
|
this.parent.trigger(events.afterPasteCleanup, { value: value }, function (updatedArgs) {
|
|
121
122
|
value = updatedArgs.value;
|
|
122
123
|
});
|
|
124
|
+
var tempDivElem = this.parent.createElement('div');
|
|
125
|
+
tempDivElem.innerHTML = value;
|
|
126
|
+
var isValueNotEmpty = tempDivElem.textContent !== '' || !isNOU(tempDivElem.querySelector('img')) ||
|
|
127
|
+
!isNOU(tempDivElem.querySelector('table'));
|
|
123
128
|
if (this.parent.pasteCleanupSettings.prompt) {
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
tempDivElem.innerHTML = value;
|
|
127
|
-
if (tempDivElem.textContent !== '' || !isNOU(tempDivElem.querySelector('img')) ||
|
|
128
|
-
!isNOU(tempDivElem.querySelector('table'))) {
|
|
129
|
+
if (isValueNotEmpty) {
|
|
130
|
+
e.args.preventDefault();
|
|
129
131
|
this.pasteDialog(value, args);
|
|
130
132
|
}
|
|
133
|
+
else if (Browser.userAgent.indexOf('Firefox') !== -1) {
|
|
134
|
+
this.fireFoxImageUpload();
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
else if (!isValueNotEmpty && !this.parent.pasteCleanupSettings.plainText &&
|
|
138
|
+
Browser.userAgent.indexOf('Firefox') !== -1) {
|
|
139
|
+
this.fireFoxImageUpload();
|
|
131
140
|
}
|
|
132
141
|
else if (this.parent.pasteCleanupSettings.plainText) {
|
|
133
142
|
e.args.preventDefault();
|
|
@@ -143,6 +152,31 @@ var PasteCleanup = /** @class */ (function () {
|
|
|
143
152
|
}
|
|
144
153
|
}
|
|
145
154
|
};
|
|
155
|
+
PasteCleanup.prototype.fireFoxImageUpload = function () {
|
|
156
|
+
var _this = this;
|
|
157
|
+
// Timeout 500 is added to capture after default paste image from file manager is completed.
|
|
158
|
+
setTimeout(function () {
|
|
159
|
+
if (Browser.userAgent.indexOf('Firefox') !== -1) {
|
|
160
|
+
var currentFocusNode = _this.nodeSelectionObj.getRange(_this.contentRenderer.getDocument()).startContainer;
|
|
161
|
+
if (currentFocusNode.nodeName !== '#text') {
|
|
162
|
+
currentFocusNode = currentFocusNode.childNodes[_this.nodeSelectionObj.getRange(_this.contentRenderer.getDocument()).startOffset];
|
|
163
|
+
}
|
|
164
|
+
if (currentFocusNode.previousSibling.nodeName === 'IMG') {
|
|
165
|
+
currentFocusNode.previousSibling.classList.add('pasteContent_Img');
|
|
166
|
+
currentFocusNode.previousSibling.classList.add(CLS_RTE_IMAGE);
|
|
167
|
+
if (_this.parent.insertImageSettings.display === 'inline') {
|
|
168
|
+
currentFocusNode.previousSibling.classList.add(CLS_IMGINLINE);
|
|
169
|
+
}
|
|
170
|
+
else {
|
|
171
|
+
currentFocusNode.previousSibling.classList.add(CLS_IMGBREAK);
|
|
172
|
+
}
|
|
173
|
+
currentFocusNode.previousSibling.classList.add();
|
|
174
|
+
_this.setImageProperties(currentFocusNode.previousSibling);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
_this.imgUploading(_this.parent.inputElement);
|
|
178
|
+
}, 500);
|
|
179
|
+
};
|
|
146
180
|
PasteCleanup.prototype.splitBreakLine = function (value) {
|
|
147
181
|
var enterSplitText = value.split('\n');
|
|
148
182
|
var contentInnerElem = '';
|
|
@@ -626,24 +660,7 @@ var PasteCleanup = /** @class */ (function () {
|
|
|
626
660
|
var allImg = clipBoardElem.querySelectorAll('img');
|
|
627
661
|
for (var i = 0; i < allImg.length; i++) {
|
|
628
662
|
allImg[i].classList.add('pasteContent_Img');
|
|
629
|
-
|
|
630
|
-
allImg[i].setAttribute('width', this.parent.insertImageSettings.width);
|
|
631
|
-
}
|
|
632
|
-
if (this.parent.insertImageSettings.minWidth !== '0' && this.parent.insertImageSettings.minWidth !== 0) {
|
|
633
|
-
allImg[i].style.minWidth = this.parent.insertImageSettings.minWidth.toString();
|
|
634
|
-
}
|
|
635
|
-
if (this.parent.insertImageSettings.maxWidth !== null) {
|
|
636
|
-
allImg[i].style.maxWidth = this.parent.getInsertImgMaxWidth().toString();
|
|
637
|
-
}
|
|
638
|
-
if (this.parent.insertImageSettings.height !== 'auto') {
|
|
639
|
-
allImg[i].setAttribute('height', this.parent.insertImageSettings.height);
|
|
640
|
-
}
|
|
641
|
-
if (this.parent.insertImageSettings.minHeight !== '0' && this.parent.insertImageSettings.minHeight !== 0) {
|
|
642
|
-
allImg[i].style.minHeight = this.parent.insertImageSettings.minHeight.toString();
|
|
643
|
-
}
|
|
644
|
-
if (this.parent.insertImageSettings.maxHeight !== null) {
|
|
645
|
-
allImg[i].style.maxHeight = this.parent.insertImageSettings.maxHeight.toString();
|
|
646
|
-
}
|
|
663
|
+
this.setImageProperties(allImg[i]);
|
|
647
664
|
}
|
|
648
665
|
this.addTempClass(clipBoardElem);
|
|
649
666
|
if (clipBoardElem.textContent !== '' || !isNOU(clipBoardElem.querySelector('img')) ||
|
|
@@ -660,6 +677,26 @@ var PasteCleanup = /** @class */ (function () {
|
|
|
660
677
|
}
|
|
661
678
|
}
|
|
662
679
|
};
|
|
680
|
+
PasteCleanup.prototype.setImageProperties = function (allImg) {
|
|
681
|
+
if (this.parent.insertImageSettings.width !== 'auto') {
|
|
682
|
+
allImg.setAttribute('width', this.parent.insertImageSettings.width);
|
|
683
|
+
}
|
|
684
|
+
if (this.parent.insertImageSettings.minWidth !== '0' && this.parent.insertImageSettings.minWidth !== 0) {
|
|
685
|
+
allImg.style.minWidth = this.parent.insertImageSettings.minWidth.toString();
|
|
686
|
+
}
|
|
687
|
+
if (this.parent.insertImageSettings.maxWidth !== null) {
|
|
688
|
+
allImg.style.maxWidth = this.parent.getInsertImgMaxWidth().toString();
|
|
689
|
+
}
|
|
690
|
+
if (this.parent.insertImageSettings.height !== 'auto') {
|
|
691
|
+
allImg.setAttribute('height', this.parent.insertImageSettings.height);
|
|
692
|
+
}
|
|
693
|
+
if (this.parent.insertImageSettings.minHeight !== '0' && this.parent.insertImageSettings.minHeight !== 0) {
|
|
694
|
+
allImg.style.minHeight = this.parent.insertImageSettings.minHeight.toString();
|
|
695
|
+
}
|
|
696
|
+
if (this.parent.insertImageSettings.maxHeight !== null) {
|
|
697
|
+
allImg.style.maxHeight = this.parent.insertImageSettings.maxHeight.toString();
|
|
698
|
+
}
|
|
699
|
+
};
|
|
663
700
|
PasteCleanup.prototype.addTempClass = function (clipBoardElem) {
|
|
664
701
|
var allChild = clipBoardElem.children;
|
|
665
702
|
for (var i = 0; i < allChild.length; i++) {
|
|
@@ -145,7 +145,8 @@ var XhtmlValidation = /** @class */ (function () {
|
|
|
145
145
|
var childEle = ele.childNodes[j];
|
|
146
146
|
if (childEle.nodeType !== 3 && childEle.nodeName !== 'TABLE' && childEle.nodeName !== 'TBODY' &&
|
|
147
147
|
childEle.nodeName !== 'THEAD' && childEle.nodeName !== 'TH' && childEle.nodeName !== 'TR' &&
|
|
148
|
-
childEle.nodeName !== 'TD' && childEle.hasAttribute(attrName)
|
|
148
|
+
childEle.nodeName !== 'TD' && childEle.hasAttribute(attrName) &&
|
|
149
|
+
!childEle.classList.contains('e-mention-chip')) {
|
|
149
150
|
childEle.removeAttribute(attrName);
|
|
150
151
|
}
|
|
151
152
|
if (childEle.hasChildNodes()) {
|
|
@@ -642,6 +642,7 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
642
642
|
var currentEndContainer = range.endContainer;
|
|
643
643
|
var currentStartOffset = range.startOffset;
|
|
644
644
|
var isSameContainer = currentStartContainer === currentEndContainer ? true : false;
|
|
645
|
+
var currentEndOffset = currentEndContainer.textContent.length;
|
|
645
646
|
var endNode = range.endContainer.nodeName === '#text' ? range.endContainer.parentElement :
|
|
646
647
|
range.endContainer;
|
|
647
648
|
var closestLI = closest(endNode, 'LI');
|
|
@@ -754,6 +755,9 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
754
755
|
if ((!isNOU(this.placeHolderWrapper)) && (this.inputElement.textContent.length !== 1)) {
|
|
755
756
|
this.placeHolderWrapper.style.display = 'none';
|
|
756
757
|
}
|
|
758
|
+
else if (this.iframeSettings.enable && this.inputElement.classList.contains("e-rte-placeholder")) {
|
|
759
|
+
removeClass([this.inputElement], "e-rte-placeholder");
|
|
760
|
+
}
|
|
757
761
|
else {
|
|
758
762
|
this.setPlaceHolder();
|
|
759
763
|
}
|
|
@@ -1457,6 +1461,17 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
1457
1461
|
this.inputElement.setAttribute('placeholder', this.placeholder);
|
|
1458
1462
|
}
|
|
1459
1463
|
}
|
|
1464
|
+
if (this.placeholder && this.iframeSettings.enable) {
|
|
1465
|
+
if (this.inputElement.textContent.length === 0 && this.inputElement.childNodes.length < 2 && !isNOU(this.inputElement.firstChild) && (this.inputElement.firstChild.nodeName === 'BR' ||
|
|
1466
|
+
((this.inputElement.firstChild.nodeName === 'P' || this.inputElement.firstChild.nodeName === 'DIV') && !isNOU(this.inputElement.firstChild.firstChild) &&
|
|
1467
|
+
this.inputElement.firstChild.firstChild.nodeName === 'BR'))) {
|
|
1468
|
+
addClass([this.inputElement], "e-rte-placeholder");
|
|
1469
|
+
this.inputElement.setAttribute('placeholder', this.placeholder);
|
|
1470
|
+
}
|
|
1471
|
+
else {
|
|
1472
|
+
removeClass([this.inputElement], "e-rte-placeholder");
|
|
1473
|
+
}
|
|
1474
|
+
}
|
|
1460
1475
|
};
|
|
1461
1476
|
RichTextEditor.prototype.setWidth = function (width) {
|
|
1462
1477
|
if (width !== 'auto') {
|
|
@@ -2182,6 +2197,9 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
2182
2197
|
clearInterval(this.timeInterval);
|
|
2183
2198
|
this.timeInterval = null;
|
|
2184
2199
|
}
|
|
2200
|
+
if (!isNOU(this.placeHolderWrapper) && this.element.querySelector('[title = Preview]')) {
|
|
2201
|
+
this.placeHolderWrapper.style.display = "none";
|
|
2202
|
+
}
|
|
2185
2203
|
EventHandler.remove(document, 'mousedown', this.onDocumentClick);
|
|
2186
2204
|
}
|
|
2187
2205
|
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-audio, .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-image.e-imginline, .e-rte-audio.e-audio-inline, .e-rte-video.e-video-inline {display: inline-block;float: none;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-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 { 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 { background: #4a90e2; border: 1px solid #fff; }\n .e-mob-rte span.e-rte-imageboxmark { 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 { 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, .e-img-caption .e-rte-image.e-imgleft { float: none; 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 </style>\n </head>";
|
|
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-audio, .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-image.e-imginline, .e-rte-audio.e-audio-inline, .e-rte-video.e-video-inline {display: inline-block;float: none;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-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 { 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 { background: #4a90e2; border: 1px solid #fff; }\n .e-mob-rte span.e-rte-imageboxmark { 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 { 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, .e-img-caption .e-rte-image.e-imgleft { float: none; 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;\n padding-top: 16px; position: absolute; text-align: start; top: 0; z-index: 1; }\n </style>\n </head>";
|
|
18
18
|
/**
|
|
19
19
|
* Content module is used to render Rich Text Editor content
|
|
20
20
|
*
|
|
@@ -1124,7 +1124,7 @@ var Video = /** @class */ (function () {
|
|
|
1124
1124
|
videoUrl.appendChild(urlContent);
|
|
1125
1125
|
this.embedInputUrl = this.parent.createElement('textarea', {
|
|
1126
1126
|
className: 'e-input e-embed-video-url',
|
|
1127
|
-
attrs: { placeholder: 'Paste
|
|
1127
|
+
attrs: { placeholder: 'Paste Embedded Code here', type: 'text', tabindex: '-1', 'aria-label': this.i10n.getConstant('embedVideoLinkHeader') }
|
|
1128
1128
|
});
|
|
1129
1129
|
this.embedInputUrl.addEventListener('keyup', function () {
|
|
1130
1130
|
if (!isNOU(_this.embedInputUrl)) {
|
|
@@ -1151,7 +1151,7 @@ var Video = /** @class */ (function () {
|
|
|
1151
1151
|
}
|
|
1152
1152
|
});
|
|
1153
1153
|
var embedUrlBtn = new RadioButton({
|
|
1154
|
-
label: '
|
|
1154
|
+
label: 'Embedded Code',
|
|
1155
1155
|
checked: true,
|
|
1156
1156
|
name: 'URL',
|
|
1157
1157
|
created: function () {
|