@innovastudio/contentbuilder 1.3.42 → 1.3.44

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@innovastudio/contentbuilder",
3
3
  "type": "module",
4
- "version": "1.3.42",
4
+ "version": "1.3.44",
5
5
  "description": "",
6
6
  "main": "public/contentbuilder/contentbuilder.esm.js",
7
7
  "files": [
@@ -15306,6 +15306,8 @@ class HtmlUtil {
15306
15306
  dom$h.removeElements(elms);
15307
15307
  elms = tmp.querySelectorAll('.is-box-tool');
15308
15308
  dom$h.removeElements(elms);
15309
+ elms = tmp.querySelectorAll('.is-section-info');
15310
+ dom$h.removeElements(elms);
15309
15311
  var html_content = '';
15310
15312
  var html_footer = '';
15311
15313
  var html_others = ''; // Apply behavior on each row
@@ -75095,7 +75097,7 @@ class ContentBuilder {
75095
75097
  if (element.tagName === 'BODY' || element.tagName === 'HTML') break;
75096
75098
  if (this.dom.hasClass(element, 'is-builder')) a = true;
75097
75099
  if (this.dom.hasClass(element, 'is-modal')) b = true;
75098
- if (this.dom.hasClass(element, 'is-side')) c = true;
75100
+ if (this.dom.hasClass(element, 'is-side') || this.dom.hasClass(element, 'is-sidebar')) c = true;
75099
75101
  if (this.dom.hasClass(element, 'is-pop')) d = true;
75100
75102
  if (this.dom.hasClass(element, 'is-tool')) f = true;
75101
75103
  if (this.dom.hasClass(element, 'is-rte-tool') || this.dom.hasClass(element, 'is-elementrte-tool')) g = true;
@@ -77818,8 +77820,21 @@ class ContentBuilder {
77818
77820
  let elms = contentword.querySelectorAll('p,h1,h2,h3,h4,h5,h6');
77819
77821
  Array.prototype.forEach.call(elms, elm => {
77820
77822
  elm.innerHTML = elm.innerHTML + ' '; //add space ( )
77821
- });
77822
- sPastedText = contentword.innerText;
77823
+ }); // sPastedText = contentword.innerText;
77824
+
77825
+ sPastedText = contentword.innerHTML;
77826
+ sPastedText = sPastedText.replace(/(<([^>]+)>)/ig, '<br>');
77827
+ sPastedText = sPastedText.replace(/(<br\s*\/?>){3,}/gi, '<br>');
77828
+
77829
+ if (sPastedText.indexOf('<br>') === 0) {
77830
+ sPastedText = sPastedText.substring(4);
77831
+ }
77832
+
77833
+ if (sPastedText.substring(sPastedText.length - 4) === '<br>') {
77834
+ sPastedText = sPastedText.substring(0, sPastedText.length - 4);
77835
+ }
77836
+
77837
+ sPastedText = sPastedText.trim();
77823
77838
  } else {
77824
77839
  sPastedText = contentword.innerHTML;
77825
77840