@innovastudio/contentbuilder 1.1.19 → 1.1.20

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
- "version": "1.1.19",
4
- "type":"module",
3
+ "version": "1.1.20",
4
+ "type": "module",
5
5
  "description": "",
6
6
  "main": "public/contentbuilder/contentbuilder.esm.js",
7
7
  "files": [
@@ -69085,10 +69085,8 @@ class ContentBuilder {
69085
69085
  Additional Cleanup:
69086
69086
  - Remove empty elements (empty p, etc)
69087
69087
  */
69088
- // $block.find('h1:empty,h2:empty,h3:empty,h4:empty,h5:empty,h6:empty,p:empty').remove();
69089
- this.activeCol.querySelectorAll('*:empty').forEach(x => {
69090
- x.remove();
69091
- });
69088
+ this.activeCol.find('h1:empty,h2:empty,h3:empty,h4:empty,h5:empty,h6:empty,p:empty').remove(); // this.activeCol.querySelectorAll('*:empty').forEach((x)=>{x.remove();}); // Makes <img> removed
69089
+
69092
69090
  /*
69093
69091
  Additional Cleanup:
69094
69092
  Fix HTML structure. The problem:
@@ -69136,10 +69134,9 @@ class ContentBuilder {
69136
69134
 
69137
69135
  elmActive.outerHTML = elmActive.innerHTML; //fix
69138
69136
  // Re-clean empty elements
69137
+ // this.activeCol.querySelectorAll('*:empty').forEach((x)=>{x.remove();}); // Makes <img> removed
69139
69138
 
69140
- this.activeCol.querySelectorAll('*:empty').forEach(x => {
69141
- x.remove();
69142
- }); //place cursor
69139
+ this.activeCol.find('h1:empty,h2:empty,h3:empty,h4:empty,h5:empty,h6:empty,p:empty').remove(); //place cursor
69143
69140
 
69144
69141
  if (elmClosestElement) dom.moveCursorToElement(elmClosestElement.previousElementSibling);else dom.moveCursorToElement(this.activeCol);
69145
69142
  let builderActive = document.querySelector('.builder-active');