@syncfusion/ej2-richtexteditor 21.1.37 → 21.1.41

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.
Files changed (28) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/ej2-richtexteditor.min.js +2 -2
  3. package/dist/ej2-richtexteditor.umd.min.js +2 -2
  4. package/dist/ej2-richtexteditor.umd.min.js.map +1 -1
  5. package/dist/es6/ej2-richtexteditor.es2015.js +222 -114
  6. package/dist/es6/ej2-richtexteditor.es2015.js.map +1 -1
  7. package/dist/es6/ej2-richtexteditor.es5.js +209 -102
  8. package/dist/es6/ej2-richtexteditor.es5.js.map +1 -1
  9. package/dist/global/ej2-richtexteditor.min.js +2 -2
  10. package/dist/global/ej2-richtexteditor.min.js.map +1 -1
  11. package/dist/global/index.d.ts +1 -1
  12. package/package.json +11 -11
  13. package/src/editor-manager/plugin/clearformat-exec.js +1 -1
  14. package/src/editor-manager/plugin/clearformat.d.ts +1 -1
  15. package/src/editor-manager/plugin/clearformat.js +2 -2
  16. package/src/editor-manager/plugin/ms-word-clean-up.js +4 -3
  17. package/src/editor-manager/plugin/selection-commands.d.ts +1 -0
  18. package/src/editor-manager/plugin/selection-commands.js +102 -63
  19. package/src/editor-manager/plugin/table.js +13 -2
  20. package/src/editor-manager/plugin/video.js +2 -1
  21. package/src/rich-text-editor/actions/paste-clean-up.d.ts +2 -0
  22. package/src/rich-text-editor/actions/paste-clean-up.js +60 -23
  23. package/src/rich-text-editor/actions/xhtml-validation.js +2 -1
  24. package/src/rich-text-editor/base/rich-text-editor.js +17 -0
  25. package/src/rich-text-editor/base/util.js +2 -1
  26. package/src/rich-text-editor/renderer/iframe-content-renderer.js +1 -1
  27. package/src/rich-text-editor/renderer/image-module.js +2 -2
  28. package/src/rich-text-editor/renderer/video-module.js +2 -2
@@ -3003,8 +3003,9 @@ function decode(value) {
3003
3003
  function sanitizeHelper(value, parent) {
3004
3004
  if (parent.enableHtmlSanitizer) {
3005
3005
  var item = SanitizeHtmlHelper.beforeSanitize();
3006
- if (item.selectors.tags[2] && item.selectors.tags[2].indexOf('iframe') > -1)
3006
+ if (item.selectors.tags[2] && item.selectors.tags[2].indexOf('iframe') > -1) {
3007
3007
  item.selectors.tags[2] = 'iframe:not(.e-rte-embed-url)';
3008
+ }
3008
3009
  var beforeEvent = {
3009
3010
  cancel: false,
3010
3011
  helper: null
@@ -14547,8 +14548,9 @@ var VideoCommand = /** @__PURE__ @class */ (function () {
14547
14548
  : (Browser.isIE ? selectedNode : !e.item.isEmbedUrl ? selectedNode.lastElementChild : selectedNode.querySelector('iframe'));
14548
14549
  videoElm_1.addEventListener(videoElm_1.tagName !== 'IFRAME' ? 'loadeddata' : 'load', function () {
14549
14550
  if (e.value !== 'VideoReplace' || !isReplaced) {
14550
- if (e.item.isEmbedUrl && videoElm_1)
14551
+ if (e.item.isEmbedUrl && videoElm_1) {
14551
14552
  videoElm_1.classList.add('e-rte-embed-url');
14553
+ }
14552
14554
  e.callBack({
14553
14555
  requestType: 'Videos',
14554
14556
  editorMode: 'HTML',
@@ -14979,8 +14981,19 @@ var TableCommand = /** @__PURE__ @class */ (function () {
14979
14981
  if (j === 0 || allCells[maxI][j] !== allCells[maxI][j - 1]) {
14980
14982
  if (1 < parseInt(allCells[maxI][j].getAttribute('rowspan'), 10)) {
14981
14983
  var rowSpanVal = parseInt(allCells[maxI][j].getAttribute('rowspan'), 10) - 1;
14982
- //eslint-disable-next-line
14983
- 1 === rowSpanVal ? allCells[maxI][j].removeAttribute('rowspan') : allCells[maxI][j].setAttribute('rowspan', rowSpanVal.toString());
14984
+ /* eslint-disable */
14985
+ if (1 === rowSpanVal) {
14986
+ allCells[maxI][j].removeAttribute('rowspan');
14987
+ var cell = allCells[maxI][j].cloneNode(true);
14988
+ allCells = this.getCorrespondingColumns();
14989
+ if (allCells[rowSpanVal][j] && allCells[rowSpanVal][j].parentElement) {
14990
+ allCells[rowSpanVal][j].parentElement.insertBefore(cell, allCells[rowSpanVal][j]);
14991
+ }
14992
+ }
14993
+ else {
14994
+ allCells[maxI][j].setAttribute('rowspan', rowSpanVal.toString());
14995
+ }
14996
+ /* eslint-enable */
14984
14997
  }
14985
14998
  }
14986
14999
  // eslint-disable-next-line max-len
@@ -15897,18 +15910,13 @@ var SelectionCommands = /** @__PURE__ @class */ (function () {
15897
15910
  isSubSup = formatNode === null ? false : true;
15898
15911
  }
15899
15912
  }
15900
- else if ((format === 'fontsize' || format === 'fontname' || format === 'fontcolor' || format === 'backgroundcolor') && range.startContainer.parentElement === endNode) {
15901
- formatNode = null;
15902
- }
15903
15913
  if (index === 0 && formatNode === null) {
15904
15914
  isFormat = true;
15905
15915
  }
15906
15916
  if (formatNode !== null && (!isFormat || isFontStyle)) {
15907
15917
  nodes[index] = this.removeFormat(nodes, index, formatNode, isCursor, isFormat, isFontStyle, range, nodeCutter, format, value, domSelection, endNode, domNode);
15908
15918
  }
15909
- else if (range.startContainer.parentElement !== endNode ||
15910
- (range.commonAncestorContainer !== endNode && range.startContainer.parentElement === endNode)
15911
- || (range.commonAncestorContainer === endNode || nodes.length === 1)) {
15919
+ else {
15912
15920
  nodes[index] = this.insertFormat(docElement, nodes, index, formatNode, isCursor, isFormat, isFontStyle, range, nodeCutter, format, value, painterValues, domNode, endNode);
15913
15921
  }
15914
15922
  domSelection = this.applySelection(nodes, domSelection, nodeCutter, index, isCollapsed);
@@ -16060,6 +16068,27 @@ var SelectionCommands = /** @__PURE__ @class */ (function () {
16060
16068
  nodes[index] = lastNode.firstChild;
16061
16069
  }
16062
16070
  }
16071
+ else if (isFontStyle && !nodes[index].contains(formatNode) && nodes[index].nodeType === 3 &&
16072
+ nodes[index].textContent !== formatNode.textContent) {
16073
+ // If the selection is within the format node .
16074
+ var isFullNodeSelected = nodes[index].textContent === nodes[index].wholeText;
16075
+ var nodeTraverse = nodes[index];
16076
+ var styleElement = this.GetFormatNode(format, value);
16077
+ // while loop and traverse back until text content does not match with parent text content
16078
+ while (nodeTraverse && nodeTraverse.textContent === nodeTraverse.parentElement.textContent) {
16079
+ nodeTraverse = nodeTraverse.parentElement;
16080
+ }
16081
+ if (isFullNodeSelected && formatNode.textContent !== nodeTraverse.textContent) {
16082
+ var nodeArray = [];
16083
+ var priorityNode = this.getPriorityFormatNode(nodeTraverse, endNode);
16084
+ if (priorityNode && priorityNode.textContent === nodeTraverse.textContent) {
16085
+ nodeTraverse = priorityNode;
16086
+ }
16087
+ nodeArray.push(nodeTraverse);
16088
+ this.applyStyles(nodeArray, 0, styleElement);
16089
+ return nodes[index];
16090
+ }
16091
+ }
16063
16092
  var fontStyle;
16064
16093
  if (format === 'backgroundcolor') {
16065
16094
  fontStyle = formatNode.style.fontSize;
@@ -16206,23 +16235,9 @@ var SelectionCommands = /** @__PURE__ @class */ (function () {
16206
16235
  return nodes[index];
16207
16236
  };
16208
16237
  SelectionCommands.insertFormat = function (docElement, nodes, index, formatNode, isCursor, isFormat, isFontStyle, range, nodeCutter, format, value, painterValues, domNode, endNode) {
16209
- var rootElementNode;
16210
16238
  if (!isCursor) {
16211
16239
  if ((formatNode === null && isFormat) || isFontStyle) {
16212
16240
  if (nodes[index].nodeName !== 'BR') {
16213
- if (format === 'fontsize' || format === 'fontname' || format === 'fontcolor' || format === 'backgroundcolor') {
16214
- var rangeNode = nodes[index];
16215
- while (rangeNode && !domNode.isBlockNode(rangeNode) && rangeNode !== endNode) {
16216
- if (domNode.isBlockNode(rangeNode.parentElement)) {
16217
- rootElementNode = rangeNode;
16218
- }
16219
- rangeNode = rangeNode.parentElement;
16220
- }
16221
- if (rootElementNode && rootElementNode.nodeType !== 3) {
16222
- nodeCutter.SplitNode(range, rootElementNode, true).cloneNode(true);
16223
- nodeCutter.SplitNode(range, rootElementNode, false).cloneNode(false);
16224
- }
16225
- }
16226
16241
  nodes[index] = nodeCutter.GetSpliceNode(range, nodes[index]);
16227
16242
  nodes[index].textContent = nodeCutter.TrimLineBreak(nodes[index].textContent);
16228
16243
  }
@@ -16232,57 +16247,63 @@ var SelectionCommands = /** @__PURE__ @class */ (function () {
16232
16247
  }
16233
16248
  else if (!(isFontStyle === true && value === '')) {
16234
16249
  var element = this.GetFormatNode(format, value);
16235
- if (value === 'formatPainter' || format === 'fontsize' || format === 'fontcolor' || format === 'fontname' || format === 'backgroundcolor') {
16236
- if (format !== 'fontname' && format !== 'backgroundcolor') {
16237
- var liElement = nodes[index].parentElement;
16238
- var parentElement = nodes[index].parentElement;
16239
- while (!isNullOrUndefined(parentElement) && parentElement.tagName.toLowerCase() !== 'li') {
16240
- parentElement = parentElement.parentElement;
16241
- liElement = parentElement;
16250
+ if (value === 'formatPainter' || isFontStyle) {
16251
+ var liElement = nodes[index].parentElement;
16252
+ var parentElement = nodes[index].parentElement;
16253
+ while (!isNullOrUndefined(parentElement) && parentElement.tagName.toLowerCase() !== 'li') {
16254
+ parentElement = parentElement.parentElement;
16255
+ liElement = parentElement;
16256
+ }
16257
+ if (!isNullOrUndefined(liElement) && liElement.tagName.toLowerCase() === 'li' &&
16258
+ liElement.textContent.trim() === nodes[index].textContent.trim()) {
16259
+ if (format === 'fontsize') {
16260
+ liElement.style.fontSize = value;
16242
16261
  }
16243
- if (!isNullOrUndefined(liElement) && liElement.tagName.toLowerCase() === 'li' &&
16244
- liElement.textContent.trim() === nodes[index].textContent.trim()) {
16245
- if (format === 'fontsize') {
16246
- liElement.style.fontSize = value;
16247
- }
16248
- else {
16249
- liElement.style.color = value;
16250
- liElement.style.textDecoration = 'inherit';
16251
- }
16262
+ else if (format === 'fontcolor') {
16263
+ liElement.style.color = value;
16264
+ liElement.style.textDecoration = 'inherit';
16252
16265
  }
16253
16266
  }
16254
- if (rootElementNode && rootElementNode.nodeType !== 3 && rootElementNode.nodeName !== 'A') {
16255
- var save = new NodeSelection();
16256
- save.save(range, docElement);
16257
- domNode.setMarker(save);
16258
- var cloneNode = rootElementNode.cloneNode(true);
16259
- element.appendChild(cloneNode);
16260
- domNode.replaceWith(rootElementNode, element.outerHTML);
16261
- var currentStartNode = endNode.querySelector('.e-editor-select-start');
16262
- var currrentEndNode = endNode.querySelector('.e-editor-select-end');
16263
- if (index === 0) {
16264
- nodes[index] = currentStartNode ? currentStartNode.lastChild : nodes[index];
16265
- }
16266
- if (range.startContainer.parentElement === endNode) {
16267
- if (nodes.length > 1) {
16268
- nodes[nodes.length - 1] = currrentEndNode ? currrentEndNode.lastChild : nodes[index];
16267
+ if (value === 'formatPainter') {
16268
+ return this.insertFormatPainterElem(nodes, index, range, nodeCutter, painterValues, domNode);
16269
+ }
16270
+ var currentNode = nodes[index];
16271
+ var priorityNode = this.getPriorityFormatNode(currentNode, endNode);
16272
+ // 1. Checking is there any priority node present in the selection range. (Use case for nested styles);
16273
+ // 2 Or font style is applied. (Use case not a nested style)
16274
+ if (!isNullOrUndefined(priorityNode) || isFontStyle) {
16275
+ var currentFormatNode = isNullOrUndefined(priorityNode) ? currentNode : priorityNode;
16276
+ currentFormatNode = !isNullOrUndefined(priorityNode) && priorityNode.style.fontSize !== '' ?
16277
+ currentFormatNode.firstChild : currentFormatNode;
16278
+ if (isNullOrUndefined(priorityNode) || format === 'fontsize') {
16279
+ while (currentFormatNode) {
16280
+ var isSameTextContent = currentFormatNode.parentElement.textContent.trim()
16281
+ === nodes[index].textContent.trim();
16282
+ if (!domNode.isBlockNode(currentFormatNode.parentElement) && isSameTextContent) {
16283
+ currentFormatNode = currentFormatNode.parentElement;
16284
+ }
16285
+ else {
16286
+ break;
16287
+ }
16269
16288
  }
16270
16289
  }
16271
- domNode.saveMarker(save, null);
16272
- }
16273
- else {
16274
- if (value === 'formatPainter') {
16275
- return this.insertFormatPainterElem(nodes, index, range, nodeCutter, painterValues, domNode);
16290
+ var nodeList = [];
16291
+ // Since color is different for different themnes, we need to wrap the fontColor over the text node.
16292
+ if (format === 'fontcolor') {
16293
+ var closestAnchor = closest(nodes[index].parentElement, 'A');
16294
+ if (!isNullOrUndefined(closestAnchor) && closestAnchor.firstChild.textContent.trim()
16295
+ === nodes[index].textContent.trim()) {
16296
+ currentFormatNode = nodes[index];
16297
+ }
16276
16298
  }
16277
- else {
16278
- nodes[index] = this.applyStyles(nodes, index, element);
16299
+ if (nodes[index].textContent.trim() !== currentFormatNode.textContent.trim()) {
16300
+ currentFormatNode = nodes[index];
16279
16301
  }
16302
+ nodeList[0] = currentFormatNode;
16303
+ this.applyStyles(nodeList, 0, element);
16280
16304
  }
16281
- if (format === 'fontsize') {
16282
- var bg = closest(nodes[index].parentElement, 'span[style*=' + 'background-color' + ']');
16283
- if (!isNullOrUndefined(bg)) {
16284
- nodes[index].parentElement.style.backgroundColor = bg.style.backgroundColor;
16285
- }
16305
+ else {
16306
+ nodes[index] = this.applyStyles(nodes, index, element);
16286
16307
  }
16287
16308
  }
16288
16309
  else {
@@ -16315,6 +16336,37 @@ var SelectionCommands = /** @__PURE__ @class */ (function () {
16315
16336
  }
16316
16337
  return nodes[index];
16317
16338
  };
16339
+ SelectionCommands.getPriorityFormatNode = function (node, endNode) {
16340
+ var isFormatted = new IsFormatted();
16341
+ var fontSizeNode = isFormatted.getFormattedNode(node, 'fontsize', endNode);
16342
+ var fontColorNode;
16343
+ var backgroundColorNode;
16344
+ var fontNameNode;
16345
+ if (isNullOrUndefined(fontSizeNode)) {
16346
+ backgroundColorNode = isFormatted.getFormattedNode(node, 'backgroundcolor', endNode);
16347
+ if (isNullOrUndefined(backgroundColorNode)) {
16348
+ fontNameNode = isFormatted.getFormattedNode(node, 'fontname', endNode);
16349
+ if (isNullOrUndefined(fontNameNode)) {
16350
+ fontColorNode = isFormatted.getFormattedNode(node, 'fontcolor', endNode);
16351
+ if (isNullOrUndefined(fontColorNode)) {
16352
+ return null;
16353
+ }
16354
+ else {
16355
+ return fontColorNode;
16356
+ }
16357
+ }
16358
+ else {
16359
+ return fontNameNode;
16360
+ }
16361
+ }
16362
+ else {
16363
+ return backgroundColorNode;
16364
+ }
16365
+ }
16366
+ else {
16367
+ return fontSizeNode;
16368
+ }
16369
+ };
16318
16370
  SelectionCommands.getInsertNode = function (docElement, range, format, value) {
16319
16371
  var element = this.GetFormatNode(format, value);
16320
16372
  element.innerHTML = '&#8203;';
@@ -16580,7 +16632,7 @@ var ClearFormat$1 = /** @__PURE__ @class */ (function () {
16580
16632
  * @hidden
16581
16633
  * @deprecated
16582
16634
  */
16583
- ClearFormat.clear = function (docElement, endNode, enterAction, selector) {
16635
+ ClearFormat.clear = function (docElement, endNode, enterAction, selector, command) {
16584
16636
  this.domNode = new DOMNode(endNode, docElement);
16585
16637
  this.defaultTag = enterAction === 'P' ? this.defaultTag : 'div';
16586
16638
  var nodeSelection = new NodeSelection();
@@ -16590,7 +16642,7 @@ var ClearFormat$1 = /** @__PURE__ @class */ (function () {
16590
16642
  nodeSelection.getSelectionNodeCollectionBr(range);
16591
16643
  var save = nodeSelection.save(range, docElement);
16592
16644
  var cursorRange = false;
16593
- if (range.collapsed) {
16645
+ if (range.collapsed && command !== 'ClearFormat') {
16594
16646
  cursorRange = true;
16595
16647
  range = nodeCutter.GetCursorRange(docElement, range, nodes[0]);
16596
16648
  }
@@ -16845,7 +16897,7 @@ var ClearFormatExec = /** @__PURE__ @class */ (function () {
16845
16897
  };
16846
16898
  ClearFormatExec.prototype.applyClear = function (e) {
16847
16899
  if (e.subCommand === 'ClearFormat') {
16848
- ClearFormat$1.clear(this.parent.currentDocument, this.parent.editableElement, e.enterAction, e.selector);
16900
+ ClearFormat$1.clear(this.parent.currentDocument, this.parent.editableElement, e.enterAction, e.selector, e.subCommand);
16849
16901
  if (e.callBack) {
16850
16902
  e.callBack({
16851
16903
  requestType: e.subCommand,
@@ -17191,6 +17243,7 @@ var MsWordPaste = /** @__PURE__ @class */ (function () {
17191
17243
  if (!isNullOrUndefined(imgElem[i].getAttribute('v:shapes')) &&
17192
17244
  imgElem[i].getAttribute('v:shapes').indexOf('Picture') < 0 &&
17193
17245
  imgElem[i].getAttribute('v:shapes').indexOf('圖片') < 0 &&
17246
+ imgElem[i].getAttribute('v:shapes').indexOf('Grafik') < 0 &&
17194
17247
  imgElem[i].getAttribute('v:shapes').indexOf('Image') < 0) {
17195
17248
  detach(imgElem[i]);
17196
17249
  }
@@ -17285,7 +17338,7 @@ var MsWordPaste = /** @__PURE__ @class */ (function () {
17285
17338
  MsWordPaste.prototype.hexConversion = function (rtfData) {
17286
17339
  // eslint-disable-next-line
17287
17340
  var picHead = /\{\\pict[\s\S]+?\\bliptag\-?\d+(\\blipupi\-?\d+)?(\{\\\*\\blipuid\s?[\da-fA-F]+)?[\s\}]*?/;
17288
- // eslint-disable-next-line security/detect-non-literal-regexp
17341
+ // eslint-disable-next-line
17289
17342
  var pic = new RegExp('(?:(' + picHead.source + '))([\\da-fA-F\\s]+)\\}', 'g');
17290
17343
  var fullImg = rtfData.match(pic);
17291
17344
  var imgType;
@@ -17349,9 +17402,9 @@ var MsWordPaste = /** @__PURE__ @class */ (function () {
17349
17402
  MsWordPaste.prototype.removeUnwantedElements = function (elm) {
17350
17403
  var innerElement = elm.innerHTML;
17351
17404
  for (var i = 0; i < this.removableElements.length; i++) {
17352
- // eslint-disable-next-line security/detect-non-literal-regexp
17405
+ // eslint-disable-next-line
17353
17406
  var regExpStartElem = new RegExp('<' + this.removableElements[i] + '>', 'g');
17354
- // eslint-disable-next-line security/detect-non-literal-regexp
17407
+ // eslint-disable-next-line
17355
17408
  var regExpEndElem = new RegExp('</' + this.removableElements[i] + '>', 'g');
17356
17409
  innerElement = innerElement.replace(regExpStartElem, '');
17357
17410
  innerElement = innerElement.replace(regExpEndElem, '');
@@ -19094,7 +19147,7 @@ var __extends$3 = (undefined && undefined.__extends) || (function () {
19094
19147
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
19095
19148
  };
19096
19149
  })();
19097
- 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>";
19150
+ 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>";
19098
19151
  /**
19099
19152
  * Content module is used to render Rich Text Editor content
19100
19153
  *
@@ -19315,7 +19368,8 @@ var XhtmlValidation = /** @__PURE__ @class */ (function () {
19315
19368
  var childEle = ele.childNodes[j];
19316
19369
  if (childEle.nodeType !== 3 && childEle.nodeName !== 'TABLE' && childEle.nodeName !== 'TBODY' &&
19317
19370
  childEle.nodeName !== 'THEAD' && childEle.nodeName !== 'TH' && childEle.nodeName !== 'TR' &&
19318
- childEle.nodeName !== 'TD' && childEle.hasAttribute(attrName)) {
19371
+ childEle.nodeName !== 'TD' && childEle.hasAttribute(attrName) &&
19372
+ !childEle.classList.contains('e-mention-chip')) {
19319
19373
  childEle.removeAttribute(attrName);
19320
19374
  }
19321
19375
  if (childEle.hasChildNodes()) {
@@ -20253,14 +20307,22 @@ var PasteCleanup = /** @__PURE__ @class */ (function () {
20253
20307
  this.parent.trigger(afterPasteCleanup, { value: value }, function (updatedArgs) {
20254
20308
  value = updatedArgs.value;
20255
20309
  });
20310
+ var tempDivElem = this.parent.createElement('div');
20311
+ tempDivElem.innerHTML = value;
20312
+ var isValueNotEmpty = tempDivElem.textContent !== '' || !isNullOrUndefined(tempDivElem.querySelector('img')) ||
20313
+ !isNullOrUndefined(tempDivElem.querySelector('table'));
20256
20314
  if (this.parent.pasteCleanupSettings.prompt) {
20257
- e.args.preventDefault();
20258
- var tempDivElem = this.parent.createElement('div');
20259
- tempDivElem.innerHTML = value;
20260
- if (tempDivElem.textContent !== '' || !isNullOrUndefined(tempDivElem.querySelector('img')) ||
20261
- !isNullOrUndefined(tempDivElem.querySelector('table'))) {
20315
+ if (isValueNotEmpty) {
20316
+ e.args.preventDefault();
20262
20317
  this.pasteDialog(value, args);
20263
20318
  }
20319
+ else if (Browser.userAgent.indexOf('Firefox') !== -1) {
20320
+ this.fireFoxImageUpload();
20321
+ }
20322
+ }
20323
+ else if (!isValueNotEmpty && !this.parent.pasteCleanupSettings.plainText &&
20324
+ Browser.userAgent.indexOf('Firefox') !== -1) {
20325
+ this.fireFoxImageUpload();
20264
20326
  }
20265
20327
  else if (this.parent.pasteCleanupSettings.plainText) {
20266
20328
  e.args.preventDefault();
@@ -20276,6 +20338,31 @@ var PasteCleanup = /** @__PURE__ @class */ (function () {
20276
20338
  }
20277
20339
  }
20278
20340
  };
20341
+ PasteCleanup.prototype.fireFoxImageUpload = function () {
20342
+ var _this = this;
20343
+ // Timeout 500 is added to capture after default paste image from file manager is completed.
20344
+ setTimeout(function () {
20345
+ if (Browser.userAgent.indexOf('Firefox') !== -1) {
20346
+ var currentFocusNode = _this.nodeSelectionObj.getRange(_this.contentRenderer.getDocument()).startContainer;
20347
+ if (currentFocusNode.nodeName !== '#text') {
20348
+ currentFocusNode = currentFocusNode.childNodes[_this.nodeSelectionObj.getRange(_this.contentRenderer.getDocument()).startOffset];
20349
+ }
20350
+ if (currentFocusNode.previousSibling.nodeName === 'IMG') {
20351
+ currentFocusNode.previousSibling.classList.add('pasteContent_Img');
20352
+ currentFocusNode.previousSibling.classList.add(CLS_RTE_IMAGE);
20353
+ if (_this.parent.insertImageSettings.display === 'inline') {
20354
+ currentFocusNode.previousSibling.classList.add(CLS_IMGINLINE);
20355
+ }
20356
+ else {
20357
+ currentFocusNode.previousSibling.classList.add(CLS_IMGBREAK);
20358
+ }
20359
+ currentFocusNode.previousSibling.classList.add();
20360
+ _this.setImageProperties(currentFocusNode.previousSibling);
20361
+ }
20362
+ }
20363
+ _this.imgUploading(_this.parent.inputElement);
20364
+ }, 500);
20365
+ };
20279
20366
  PasteCleanup.prototype.splitBreakLine = function (value) {
20280
20367
  var enterSplitText = value.split('\n');
20281
20368
  var contentInnerElem = '';
@@ -20759,24 +20846,7 @@ var PasteCleanup = /** @__PURE__ @class */ (function () {
20759
20846
  var allImg = clipBoardElem.querySelectorAll('img');
20760
20847
  for (var i = 0; i < allImg.length; i++) {
20761
20848
  allImg[i].classList.add('pasteContent_Img');
20762
- if (this.parent.insertImageSettings.width !== 'auto') {
20763
- allImg[i].setAttribute('width', this.parent.insertImageSettings.width);
20764
- }
20765
- if (this.parent.insertImageSettings.minWidth !== '0' && this.parent.insertImageSettings.minWidth !== 0) {
20766
- allImg[i].style.minWidth = this.parent.insertImageSettings.minWidth.toString();
20767
- }
20768
- if (this.parent.insertImageSettings.maxWidth !== null) {
20769
- allImg[i].style.maxWidth = this.parent.getInsertImgMaxWidth().toString();
20770
- }
20771
- if (this.parent.insertImageSettings.height !== 'auto') {
20772
- allImg[i].setAttribute('height', this.parent.insertImageSettings.height);
20773
- }
20774
- if (this.parent.insertImageSettings.minHeight !== '0' && this.parent.insertImageSettings.minHeight !== 0) {
20775
- allImg[i].style.minHeight = this.parent.insertImageSettings.minHeight.toString();
20776
- }
20777
- if (this.parent.insertImageSettings.maxHeight !== null) {
20778
- allImg[i].style.maxHeight = this.parent.insertImageSettings.maxHeight.toString();
20779
- }
20849
+ this.setImageProperties(allImg[i]);
20780
20850
  }
20781
20851
  this.addTempClass(clipBoardElem);
20782
20852
  if (clipBoardElem.textContent !== '' || !isNullOrUndefined(clipBoardElem.querySelector('img')) ||
@@ -20793,6 +20863,26 @@ var PasteCleanup = /** @__PURE__ @class */ (function () {
20793
20863
  }
20794
20864
  }
20795
20865
  };
20866
+ PasteCleanup.prototype.setImageProperties = function (allImg) {
20867
+ if (this.parent.insertImageSettings.width !== 'auto') {
20868
+ allImg.setAttribute('width', this.parent.insertImageSettings.width);
20869
+ }
20870
+ if (this.parent.insertImageSettings.minWidth !== '0' && this.parent.insertImageSettings.minWidth !== 0) {
20871
+ allImg.style.minWidth = this.parent.insertImageSettings.minWidth.toString();
20872
+ }
20873
+ if (this.parent.insertImageSettings.maxWidth !== null) {
20874
+ allImg.style.maxWidth = this.parent.getInsertImgMaxWidth().toString();
20875
+ }
20876
+ if (this.parent.insertImageSettings.height !== 'auto') {
20877
+ allImg.setAttribute('height', this.parent.insertImageSettings.height);
20878
+ }
20879
+ if (this.parent.insertImageSettings.minHeight !== '0' && this.parent.insertImageSettings.minHeight !== 0) {
20880
+ allImg.style.minHeight = this.parent.insertImageSettings.minHeight.toString();
20881
+ }
20882
+ if (this.parent.insertImageSettings.maxHeight !== null) {
20883
+ allImg.style.maxHeight = this.parent.insertImageSettings.maxHeight.toString();
20884
+ }
20885
+ };
20796
20886
  PasteCleanup.prototype.addTempClass = function (clipBoardElem) {
20797
20887
  var allChild = clipBoardElem.children;
20798
20888
  for (var i = 0; i < allChild.length; i++) {
@@ -22795,7 +22885,7 @@ var Image = /** @__PURE__ @class */ (function () {
22795
22885
  if (isNullOrUndefined(img.width)) {
22796
22886
  return;
22797
22887
  }
22798
- // eslint-disable-next-line security/detect-unsafe-regex
22888
+ // eslint-disable-next-line
22799
22889
  var width = img.style.width !== '' ? img.style.width.match(/^\d+(\.\d*)?%$/g) ? parseFloat(img.style.width) :
22800
22890
  parseInt(img.style.width, 10) : img.width;
22801
22891
  var height = img.style.height !== '' ? parseInt(img.style.height, 10) : img.height;
@@ -22833,7 +22923,7 @@ var Image = /** @__PURE__ @class */ (function () {
22833
22923
  img.setAttribute('width', (img.width + this.mouseX).toString());
22834
22924
  }
22835
22925
  else {
22836
- var currentWidth = img.offsetWidth === 0 ? img.width + this.mouseX + parseInt(img.style.outlineWidth.split('p')[0]) : img.offsetWidth + this.mouseX;
22926
+ var currentWidth = img.offsetWidth === 0 ? img.width + this.mouseX + parseInt(img.style.outlineWidth.split('p')[0], 10) : img.offsetWidth + this.mouseX;
22837
22927
  img.setAttribute('width', (currentWidth).toString());
22838
22928
  }
22839
22929
  }
@@ -26772,7 +26862,7 @@ var Video = /** @__PURE__ @class */ (function () {
26772
26862
  videoUrl.appendChild(urlContent);
26773
26863
  this.embedInputUrl = this.parent.createElement('textarea', {
26774
26864
  className: 'e-input e-embed-video-url',
26775
- attrs: { placeholder: 'Paste Embed URL here', type: 'text', tabindex: '-1', 'aria-label': this.i10n.getConstant('embedVideoLinkHeader') }
26865
+ attrs: { placeholder: 'Paste Embedded Code here', type: 'text', tabindex: '-1', 'aria-label': this.i10n.getConstant('embedVideoLinkHeader') }
26776
26866
  });
26777
26867
  this.embedInputUrl.addEventListener('keyup', function () {
26778
26868
  if (!isNullOrUndefined(_this.embedInputUrl)) {
@@ -26799,7 +26889,7 @@ var Video = /** @__PURE__ @class */ (function () {
26799
26889
  }
26800
26890
  });
26801
26891
  var embedUrlBtn = new RadioButton({
26802
- label: 'Embed URL',
26892
+ label: 'Embedded Code',
26803
26893
  checked: true,
26804
26894
  name: 'URL',
26805
26895
  created: function () {
@@ -30835,6 +30925,9 @@ var RichTextEditor = /** @__PURE__ @class */ (function (_super) {
30835
30925
  if ((!isNullOrUndefined(this.placeHolderWrapper)) && (this.inputElement.textContent.length !== 1)) {
30836
30926
  this.placeHolderWrapper.style.display = 'none';
30837
30927
  }
30928
+ else if (this.iframeSettings.enable && this.inputElement.classList.contains("e-rte-placeholder")) {
30929
+ removeClass([this.inputElement], "e-rte-placeholder");
30930
+ }
30838
30931
  else {
30839
30932
  this.setPlaceHolder();
30840
30933
  }
@@ -31538,6 +31631,17 @@ var RichTextEditor = /** @__PURE__ @class */ (function (_super) {
31538
31631
  this.inputElement.setAttribute('placeholder', this.placeholder);
31539
31632
  }
31540
31633
  }
31634
+ if (this.placeholder && this.iframeSettings.enable) {
31635
+ if (this.inputElement.textContent.length === 0 && this.inputElement.childNodes.length < 2 && !isNullOrUndefined(this.inputElement.firstChild) && (this.inputElement.firstChild.nodeName === 'BR' ||
31636
+ ((this.inputElement.firstChild.nodeName === 'P' || this.inputElement.firstChild.nodeName === 'DIV') && !isNullOrUndefined(this.inputElement.firstChild.firstChild) &&
31637
+ this.inputElement.firstChild.firstChild.nodeName === 'BR'))) {
31638
+ addClass([this.inputElement], "e-rte-placeholder");
31639
+ this.inputElement.setAttribute('placeholder', this.placeholder);
31640
+ }
31641
+ else {
31642
+ removeClass([this.inputElement], "e-rte-placeholder");
31643
+ }
31644
+ }
31541
31645
  };
31542
31646
  RichTextEditor.prototype.setWidth = function (width) {
31543
31647
  if (width !== 'auto') {
@@ -32263,6 +32367,9 @@ var RichTextEditor = /** @__PURE__ @class */ (function (_super) {
32263
32367
  clearInterval(this.timeInterval);
32264
32368
  this.timeInterval = null;
32265
32369
  }
32370
+ if (!isNullOrUndefined(this.placeHolderWrapper) && this.element.querySelector('[title = Preview]')) {
32371
+ this.placeHolderWrapper.style.display = "none";
32372
+ }
32266
32373
  EventHandler.remove(document, 'mousedown', this.onDocumentClick);
32267
32374
  }
32268
32375
  else {