@syncfusion/ej2-richtexteditor 24.2.3 → 24.2.4

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.
@@ -2661,7 +2661,7 @@ var defaultLocale = {
2661
2661
  'audioLayoutOption': 'Layout option',
2662
2662
  'videoLayoutOption': 'Layout option',
2663
2663
  'align': 'Align',
2664
- 'caption': 'Image Caption',
2664
+ 'caption': 'Caption',
2665
2665
  'remove': 'Remove',
2666
2666
  'insertLink': 'Insert Link',
2667
2667
  'display': 'Display',
@@ -2725,14 +2725,14 @@ var defaultLocale = {
2725
2725
  'cellspacing': 'Cell Spacing',
2726
2726
  'columns': 'Number of columns',
2727
2727
  'rows': 'Number of rows',
2728
- 'tableRows': 'Table Rows',
2729
- 'tableColumns': 'Table Columns',
2728
+ 'tableRows': 'Row',
2729
+ 'tableColumns': 'Column',
2730
2730
  'tableCellHorizontalAlign': 'Table Cell Horizontal Align',
2731
- 'tableCellVerticalAlign': 'Table Vertical Align',
2731
+ 'tableCellVerticalAlign': 'Vertical Align',
2732
2732
  'createTable': 'Create Table',
2733
2733
  'removeTable': 'Remove Table',
2734
- 'tableHeader': 'Table Header',
2735
- 'tableRemove': 'Table Remove',
2734
+ 'tableHeader': 'Header Row',
2735
+ 'tableRemove': 'Delete',
2736
2736
  'tableCellBackground': 'Table Cell Background',
2737
2737
  'tableEditProperties': 'Table Edit Properties',
2738
2738
  'styles': 'Styles',
@@ -7937,6 +7937,33 @@ function getDefaultMDTbStatus() {
7937
7937
  formats: null
7938
7938
  };
7939
7939
  }
7940
+ /**
7941
+ * @param {Range} range - specifies the range
7942
+ * @returns {void}
7943
+ * @hidden
7944
+ */
7945
+ function nestedListCleanUp(range) {
7946
+ if (range.startContainer.parentElement.closest('ol,ul') !== null && range.endContainer.parentElement.closest('ol,ul') !== null) {
7947
+ range.extractContents();
7948
+ while ((range.startContainer.nodeName === "#text" ? range.startContainer.parentElement : range.startContainer).querySelectorAll('li :empty').length > 0 ||
7949
+ (range.startContainer.nodeName === "#text" ? range.startContainer.parentElement : range.startContainer).querySelectorAll('ol :empty').length > 0) {
7950
+ var emptyLI = (range.startContainer.nodeName === "#text" ? range.startContainer.parentElement : range.startContainer).querySelectorAll('li :empty');
7951
+ if (emptyLI.length > 0) {
7952
+ emptyLI.forEach(function (item) {
7953
+ item.remove();
7954
+ });
7955
+ }
7956
+ }
7957
+ var liElem = (range.startContainer.nodeName === "#text" ? range.startContainer.parentElement : range.startContainer).querySelectorAll("li");
7958
+ if (liElem.length > 0) {
7959
+ liElem.forEach(function (item) {
7960
+ if (item.firstChild.nodeName === "OL" || item.firstChild.nodeName === "UL") {
7961
+ item.style.listStyleType = "none";
7962
+ }
7963
+ });
7964
+ }
7965
+ }
7966
+ }
7940
7967
 
7941
7968
  /**
7942
7969
  * MarkdownToolbarStatus module for refresh the toolbar status
@@ -10911,6 +10938,9 @@ var NodeSelection = /** @__PURE__ @class */ (function () {
10911
10938
  || this.isChildNode(nodeCollection, startNode))) {
10912
10939
  return null;
10913
10940
  }
10941
+ if (startNode.nodeType === 3 && startNode.previousSibling === endNode && endNode.nodeName === 'IMG') {
10942
+ return null;
10943
+ }
10914
10944
  if (nodeCollection.indexOf(startNode.firstChild) === -1 && startNode.firstChild && !this.isChildNode(nodeCollection, startNode)) {
10915
10945
  return startNode.firstChild;
10916
10946
  }
@@ -13636,7 +13666,12 @@ var InsertHtml = /** @__PURE__ @class */ (function () {
13636
13666
  lasNode.textContent.length : lasNode.childNodes.length);
13637
13667
  range = nodeSelection.getRange(docElement);
13638
13668
  }
13639
- range.extractContents();
13669
+ if (range.startContainer.parentElement.closest('ol,ul') !== null && range.endContainer.parentElement.closest('ol,ul') !== null) {
13670
+ nestedListCleanUp(range);
13671
+ }
13672
+ else {
13673
+ range.extractContents();
13674
+ }
13640
13675
  if (insertNode.tagName === 'TABLE') {
13641
13676
  this.removeEmptyElements(editNode);
13642
13677
  }
@@ -20559,7 +20594,7 @@ var __extends$3 = (undefined && undefined.__extends) || (function () {
20559
20594
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
20560
20595
  };
20561
20596
  })();
20562
- 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; padding-top: 16px; position: absolute; text-align: start; top: 0; z-index: 1; }\n </style>\n </head>";
20597
+ 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, span.e-rte-videoboxmark { width: 10px; height: 10px; position: absolute; display: block;\n background: #4a90e2; border: 1px solid #fff; z-index: 1000;}\n .e-mob-rte.e-mob-span span.e-rte-imageboxmark, .e-mob-rte.e-mob-span span.e-rte-videoboxmark { background: #4a90e2; border: 1px solid #fff; }\n .e-mob-rte span.e-rte-imageboxmark, .e-mob-rte span.e-rte-videoboxmark { background: #fff; border: 1px solid #4a90e2;\n border-radius: 15px; height: 20px; width: 20px; }\n .e-mob-rte.e-mob-span span.e-rte-imageboxmark, .e-mob-rte.e-mob-span span.e-rte-videoboxmark { background: #4a90e2; border: 1px solid #fff; }\n .e-rte-content .e-content img.e-resize, .e-rte-content .e-content video.e-resize { z-index: 1000; }\n .e-img-caption .e-img-inner { outline: 0; }\n .e-img-caption a:focus-visible { outline: none; }\n .e-img-caption .e-rte-image.e-imgright, .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; padding-top: 16px; position: absolute; text-align: start; top: 0; z-index: 1; }\n </style>\n </head>";
20563
20598
  /**
20564
20599
  * Content module is used to render Rich Text Editor content
20565
20600
  *
@@ -28305,6 +28340,7 @@ var Video = /** @__PURE__ @class */ (function () {
28305
28340
  this.isAllowedTypes = true;
28306
28341
  this.pageX = null;
28307
28342
  this.pageY = null;
28343
+ this.mouseX = null;
28308
28344
  this.deletedVid = [];
28309
28345
  this.parent = parent;
28310
28346
  this.rteID = parent.element.id;
@@ -28704,62 +28740,50 @@ var Video = /** @__PURE__ @class */ (function () {
28704
28740
  if (isNullOrUndefined(vidEleStyle)) {
28705
28741
  return;
28706
28742
  }
28707
- // eslint-disable-next-line
28743
+ /* eslint-disable */
28708
28744
  var width = vidEleStyle.width !== '' ? vidEleStyle.width.match(/^\d+(\.\d*)?%$/g) ? parseFloat(vidEleStyle.width) :
28709
28745
  parseInt(vidEleStyle.width, 10) : vid.style.width !== '' ? vid.style.width : vid.width;
28710
28746
  var height = vidEleStyle.height !== '' ? parseInt(vidEleStyle.height, 10) : vid.style.height !== '' ? vid.style.height : vid.height;
28747
+ width = width.toString().match(/\b\d+(\.\d*)?(%|$)\b/g) ? parseFloat(width.toString()) : parseInt(width.toString(), 10);
28748
+ height = height.toString().match(/\b\d+(\.\d*)?(%|$)\b/g) ? parseFloat(height.toString()) : parseInt(height.toString(), 10);
28749
+ /* eslint-enable */
28711
28750
  if (width > height) {
28712
28751
  vid.style.minWidth = this.parent.insertVideoSettings.minWidth === 0 ? '200px' : formatUnit(this.parent.insertVideoSettings.minWidth);
28713
28752
  vid.style.minHeight = this.parent.insertVideoSettings.minHeight === 0 ? '90px' : formatUnit(this.parent.insertVideoSettings.minHeight);
28714
28753
  if (this.parent.insertVideoSettings.resizeByPercent) {
28715
- if (parseInt('' + vid.getBoundingClientRect().width + '', 10) !== 0 && parseInt('' + width + '', 10) !== 0) {
28716
- var percentageValue = this.pixToPerc((parseInt(width.toString(), 10) / parseInt(height.toString(), 10) * expectedY), (vid.previousElementSibling || vid.parentElement));
28717
- vid.style.width = Math.min(Math.round((percentageValue / vid.getBoundingClientRect().width) * expectedX * 100) / 100, 100) + '%';
28718
- }
28719
- else {
28720
- vid.style.width = this.pixToPerc(parseInt(width.toString(), 10) / parseInt(height.toString(), 10) * expectedY, (vid.previousElementSibling || vid.parentElement)) + '%';
28721
- }
28722
- vid.style.height = null;
28723
- vid.removeAttribute('height');
28754
+ this.updateVidEleWidth(vid, width, height, expectedX, expectedY);
28724
28755
  }
28725
28756
  else if ((vid.style.width === '' && vid.style.height !== '') || (vidEleStyle.width === '' && vidEleStyle.height !== '')) {
28726
28757
  vid.style.height = expectedY + 'px';
28727
28758
  }
28728
28759
  else if ((vid.style.width !== '' && vid.style.height === '') || (vidEleStyle.width !== '' && vidEleStyle.height === '')) {
28729
- var currentWidth = ((parseInt(width.toString(), 10) / parseInt(height.toString(), 10) * expectedY) +
28730
- parseInt(width.toString(), 10) / parseInt(height.toString(), 10)) <
28760
+ var currentWidth = ((width / height * expectedY) +
28761
+ width / height) <
28731
28762
  (this.parent.inputElement.getBoundingClientRect().right - 32) ?
28732
- ((parseInt(width.toString(), 10) / parseInt(height.toString(), 10) * expectedY) +
28733
- parseInt(width.toString(), 10) / parseInt(height.toString(), 10)) :
28763
+ ((width / height * expectedY) +
28764
+ width / height) :
28734
28765
  (this.parent.inputElement.getBoundingClientRect().right - 32);
28735
28766
  vid.style.width = currentWidth.toString() + 'px';
28736
28767
  }
28737
28768
  else if (vid.style.width !== '' || vidEleStyle.width !== '') {
28738
- var currentWidth = (parseInt(width.toString(), 10) / parseInt(height.toString(), 10) * expectedY) <
28769
+ var currentWidth = (width / height * expectedY) <
28739
28770
  (this.parent.inputElement.getBoundingClientRect().right - 32) ?
28740
- (parseInt(width.toString(), 10) / parseInt(height.toString(), 10) * expectedY) :
28771
+ (width / height * expectedY) :
28741
28772
  (this.parent.inputElement.getBoundingClientRect().right - 32);
28742
28773
  vid.style.width = currentWidth + 'px';
28743
28774
  vid.style.height = expectedY + 'px';
28744
28775
  }
28745
28776
  else {
28746
- vid.setAttribute('width', (parseInt(((parseInt(width.toString(), 10) / parseInt(height.toString(), 10) * expectedY) + parseInt(width.toString(), 10) / parseInt(height.toString(), 10)).toString(), 10)).toString());
28777
+ vid.setAttribute('width', (parseInt(((width / height * expectedY) + width / height).toString(), 10)).toString());
28747
28778
  }
28748
28779
  }
28749
28780
  else if (height > width) {
28750
28781
  if (this.parent.insertVideoSettings.resizeByPercent) {
28751
- if (parseInt('' + vid.getBoundingClientRect().width + '', 10) !== 0 && parseInt('' + width + '', 10) !== 0) {
28752
- vid.style.width = Math.min(Math.round((parseInt(width.toString(), 10) / vid.getBoundingClientRect().width) * expectedX * 100) / 100, 100) + '%';
28753
- }
28754
- else {
28755
- vid.style.width = this.pixToPerc((expectedX / parseInt(height.toString(), 10) * expectedY), (vid.previousElementSibling || vid.parentElement)) + '%';
28756
- }
28757
- vid.style.height = null;
28758
- vid.removeAttribute('height');
28782
+ this.updateVidEleWidth(vid, width, height, expectedX, expectedY);
28759
28783
  }
28760
28784
  else if (vid.style.width !== '' || vidEleStyle.width !== '') {
28761
28785
  vid.style.width = expectedX + 'px';
28762
- vid.style.height = (parseInt(height.toString(), 10) / parseInt(width.toString(), 10) * expectedX) + 'px';
28786
+ vid.style.height = (height / width * expectedX) + 'px';
28763
28787
  }
28764
28788
  else {
28765
28789
  vid.setAttribute('width', this.resizeBtnStat.botRight ? (this.getPointX(e.event) - vid.getBoundingClientRect().left).toString() : expectedX.toString());
@@ -28777,6 +28801,23 @@ var Video = /** @__PURE__ @class */ (function () {
28777
28801
  }
28778
28802
  }
28779
28803
  };
28804
+ Video.prototype.updateVidEleWidth = function (vid, width, height, expectedX, expectedY) {
28805
+ if (parseInt('' + vid.getBoundingClientRect().width + '', 10) !== 0 && parseInt('' + width + '', 10) !== 0) {
28806
+ var original = vid.offsetWidth + this.mouseX;
28807
+ var finalWidthByPerc = (original / vid.offsetWidth) * (parseFloat(vid.style.width).toString() === 'NaN' ? (vid.offsetWidth / (parseFloat(getComputedStyle(this.parent.element).width)) * 100) : parseFloat(vid.style.width));
28808
+ vid.style.width = ((finalWidthByPerc > 3) ? finalWidthByPerc : 3) + '%';
28809
+ }
28810
+ else {
28811
+ if (width > height) {
28812
+ vid.style.width = this.pixToPerc(width / height * expectedY, (vid.previousElementSibling || vid.parentElement)) + '%';
28813
+ }
28814
+ else {
28815
+ vid.style.width = this.pixToPerc((expectedX / height * expectedY), (vid.previousElementSibling || vid.parentElement)) + '%';
28816
+ }
28817
+ }
28818
+ vid.style.height = null;
28819
+ vid.removeAttribute('height');
28820
+ };
28780
28821
  Video.prototype.pixToPerc = function (expected, parentEle) {
28781
28822
  return expected / parseFloat(getComputedStyle(parentEle).width) * 100;
28782
28823
  };
@@ -28818,6 +28859,7 @@ var Video = /** @__PURE__ @class */ (function () {
28818
28859
  var height = parseInt(this.vidDupPos.height, 10) + mouseY;
28819
28860
  this.pageX = pageX;
28820
28861
  this.pageY = pageY;
28862
+ this.mouseX = mouseX;
28821
28863
  if (this.resizeBtnStat.botRight) {
28822
28864
  this.vidDupMouseMove(width + 'px', height + 'px', e);
28823
28865
  }
@@ -34344,7 +34386,7 @@ var RichTextEditor = /** @__PURE__ @class */ (function (_super) {
34344
34386
  if (this.valueContainer) {
34345
34387
  this.valueContainer.value = (this.enableHtmlEncode) ? this.value : value;
34346
34388
  }
34347
- if (this.editorMode === 'HTML' && this.inputElement && this.inputElement.innerHTML.replace('&amp;', '&').trim() !== value.trim()) {
34389
+ if (this.editorMode === 'HTML' && this.inputElement && this.inputElement.innerHTML.trim() !== value.trim()) {
34348
34390
  this.inputElement.innerHTML = value;
34349
34391
  }
34350
34392
  else if (this.editorMode === 'Markdown' && this.inputElement
@@ -34365,9 +34407,6 @@ var RichTextEditor = /** @__PURE__ @class */ (function (_super) {
34365
34407
  }
34366
34408
  else {
34367
34409
  this.inputElement.innerHTML = '<p><br/></p>';
34368
- if (value === '' && this.formatter && this.inputElement) {
34369
- this.formatter.editorManager.nodeSelection.setCursorPoint(this.contentModule.getDocument(), this.inputElement.firstElementChild, this.inputElement.firstElementChild.childElementCount);
34370
- }
34371
34410
  }
34372
34411
  }
34373
34412
  else {
@@ -35530,6 +35569,9 @@ var RichTextEditor = /** @__PURE__ @class */ (function (_super) {
35530
35569
  if (item[j].classList.length === 0) {
35531
35570
  item[j].removeAttribute('class');
35532
35571
  }
35572
+ if (item[j].nodeName === 'IMG' && item[j].style.outline !== '') {
35573
+ item[j].style.outline = '';
35574
+ }
35533
35575
  }
35534
35576
  }
35535
35577
  };