@innovastudio/contentbox 1.1.11 → 1.1.12
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
|
@@ -9807,6 +9807,30 @@ class EditBox {
|
|
|
9807
9807
|
} //editModule
|
|
9808
9808
|
|
|
9809
9809
|
|
|
9810
|
+
refreshModule() {
|
|
9811
|
+
const modalEditModule = document.querySelector('.is-modal.editmodule');
|
|
9812
|
+
const builderStuff = this.builderStuff;
|
|
9813
|
+
let activeBox = this.builder.activeBox;
|
|
9814
|
+
let activeModule = activeBox.querySelector('.is-overlay-content[data-module]');
|
|
9815
|
+
let modalIframe = modalEditModule.querySelector('iframe');
|
|
9816
|
+
if (modalIframe.contentWindow.construct) modalIframe.contentWindow.construct();
|
|
9817
|
+
const hidModuleCode = builderStuff.querySelector('#hidModuleCode');
|
|
9818
|
+
const hidModuleSettings = builderStuff.querySelector('#hidModuleSettings'); //Save Html (original)
|
|
9819
|
+
|
|
9820
|
+
activeModule.setAttribute('data-html', encodeURIComponent(hidModuleCode.value)); //Save Settings (original)
|
|
9821
|
+
|
|
9822
|
+
activeModule.setAttribute('data-settings', encodeURIComponent(hidModuleSettings.value)); //Render (programmatically)
|
|
9823
|
+
|
|
9824
|
+
let range = document.createRange();
|
|
9825
|
+
activeModule.innerHTML = '';
|
|
9826
|
+
activeModule.appendChild(range.createContextualFragment(hidModuleCode.value)); // We use createContextualFragment so that embedded javascript code (code block) will be executed
|
|
9827
|
+
//Trigger Render event
|
|
9828
|
+
|
|
9829
|
+
this.builder.settings.onRender(); //Trigger Change event
|
|
9830
|
+
|
|
9831
|
+
this.builder.settings.onChange();
|
|
9832
|
+
}
|
|
9833
|
+
|
|
9810
9834
|
boxWidthSmaller() {
|
|
9811
9835
|
let activeBox = this.builder.activeBox;
|
|
9812
9836
|
let currentBox;
|
|
@@ -80604,6 +80628,10 @@ class ContentBox {
|
|
|
80604
80628
|
this.editor.util.hideModal(modal);
|
|
80605
80629
|
}
|
|
80606
80630
|
|
|
80631
|
+
refreshModule() {
|
|
80632
|
+
this.editbox.refreshModule();
|
|
80633
|
+
}
|
|
80634
|
+
|
|
80607
80635
|
loadStyles(mainCss, sectionCss) {
|
|
80608
80636
|
let links = document.getElementsByTagName('link');
|
|
80609
80637
|
let boxCssInBody;
|