@innovastudio/contentbox 1.5.15 → 1.5.16

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@innovastudio/contentbox",
3
3
  "type": "module",
4
- "version": "1.5.15",
4
+ "version": "1.5.16",
5
5
  "description": "",
6
6
  "main": "public/contentbox/contentbox.esm.js",
7
7
  "files": [
@@ -46,7 +46,7 @@
46
46
  "webpack-dev-server": "^4.0.0"
47
47
  },
48
48
  "dependencies": {
49
- "@innovastudio/contentbuilder": "^1.4.16",
49
+ "@innovastudio/contentbuilder": "^1.4.17",
50
50
  "js-beautify": "^1.14.0"
51
51
  }
52
52
  }
@@ -2028,7 +2028,7 @@ class SideBar {
2028
2028
  html = html.replace(regex, snippetPathReplace[1]);
2029
2029
  }
2030
2030
  }
2031
-
2031
+
2032
2032
  html = html.replace(/\\[%IMAGE_PATH%\\]/g, designPath);
2033
2033
  html = html.replace(/%5B%25IMAGE_PATH%25%5D/g, designPath); //If [%IMAGE_PATH%] is encoded (inside data-html)
2034
2034
 
@@ -13557,7 +13557,9 @@ class EditBox {
13557
13557
  iframe.style.transition = 'opacity 0.1s ease'; // iframe.setAttribute('src', this.builder.settings.modulePath + moduleName + '.html'); //load module panel on iframe
13558
13558
 
13559
13559
  let result = await fetch(this.builder.settings.modulePath + moduleName + '.html');
13560
- result = await result.text();
13560
+ result = await result.text(); // replace {assetpath}
13561
+
13562
+ result = result.replace(/{assetpath}/g, this.builder.assetPath);
13561
13563
  let doc = iframe.contentWindow.document;
13562
13564
  doc.open();
13563
13565
  doc.write(result);
@@ -29911,9 +29913,9 @@ class HtmlUtil {
29911
29913
 
29912
29914
  html_others += htmlSection;
29913
29915
  }
29914
- });
29915
- if (html_footer !== '') html_footer = '<!---FOOTER--->\n' + html_footer;
29916
- if (html_others !== '') html_others = '<!---OTHERS--->\n' + html_others;
29916
+ }); // if (html_footer !== '') html_footer = '<!---FOOTER--->\n' + html_footer;
29917
+ // if (html_others !== '') html_others = '<!---OTHERS--->\n' + html_others;
29918
+
29917
29919
  let contentbox = document.querySelector('[data-contentbox]');
29918
29920
  let disableStaticSection = false;
29919
29921
 
@@ -108085,10 +108087,6 @@ class ContentBox {
108085
108087
 
108086
108088
  addIdea(newArea) {
108087
108089
  this.editor.saveForUndo();
108088
- const designPath = this.designPath;
108089
- newArea = newArea.replace(/\[%IMAGE_PATH%\]/g, designPath);
108090
- newArea = newArea.replace(/%5B%25IMAGE_PATH%25%5D/g, designPath); //If [%IMAGE_PATH%] is encoded (inside data-html)
108091
-
108092
108090
  let newSection;
108093
108091
  let arrSections = [];
108094
108092