@innovastudio/contentbuilder 1.3.42 → 1.3.43
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
|
@@ -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
|
|
@@ -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
|
-
|
|
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
|
|