@innovastudio/contentbuilder 1.3.13 → 1.3.14

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.13",
4
+ "version": "1.3.14",
5
5
  "description": "",
6
6
  "main": "public/contentbuilder/contentbuilder.esm.js",
7
7
  "files": [
@@ -14522,7 +14522,25 @@ class HtmlUtil {
14522
14522
  range.setStart(area, 0);
14523
14523
  area.appendChild(range.createContextualFragment(html));
14524
14524
  let builderActive = this.builder.doc.querySelector('.builder-active');
14525
- if (builderActive) this.builder.applyBehaviorOn(builderActive); //Trigger Change event
14525
+ if (builderActive) this.builder.applyBehaviorOn(builderActive);
14526
+ /*else {
14527
+ const builders = this.builder.doc.querySelectorAll(this.builder.opts.container);
14528
+ if(builders.length > 1) {
14529
+ const cell = util.cellSelected();
14530
+ if(!cell) {
14531
+ // Return first instance
14532
+ area = builders[0];
14533
+ } else {
14534
+ // Return active instance
14535
+ area = cell.parentNode.parentNode;
14536
+ }
14537
+ } else {
14538
+ // Single instance
14539
+ area = builders[0];
14540
+ }
14541
+ this.builder.applyBehaviorOn(area);
14542
+ }*/
14543
+ //Trigger Change event
14526
14544
 
14527
14545
  this.builder.opts.onChange(); //Trigger Render event
14528
14546
 
@@ -14750,9 +14768,9 @@ class HtmlUtil {
14750
14768
 
14751
14769
 
14752
14770
  let columnMore = builderStuff.querySelector('.is-pop.columnmore');
14753
- columnMore.style.display = '';
14771
+ if (columnMore) columnMore.style.display = '';
14754
14772
  let rowMore = builderStuff.querySelector('.is-pop.rowmore');
14755
- rowMore.style.display = '';
14773
+ if (rowMore) rowMore.style.display = '';
14756
14774
  this.builder.codeEditorMode = mode;
14757
14775
  this.builder.codeEditorArea = area;
14758
14776
  let codeEditor = viewhtml.querySelector('.input-code-editor');
@@ -50038,6 +50056,8 @@ class Image$1 {
50038
50056
  }
50039
50057
 
50040
50058
  newname = basename + '-edit' + this.util.makeId();
50059
+ newname = newname.replaceAll('%20', '-'); // fix 404 error after file upload
50060
+
50041
50061
  img.setAttribute('data-filename', newname + '.' + extension);
50042
50062
  }
50043
50063
 
@@ -50098,7 +50118,9 @@ class Image$1 {
50098
50118
  this.imageTool.style.display = '';
50099
50119
  }, 1000);
50100
50120
  } else {
50101
- this.refresh();
50121
+ elm.onload = () => {
50122
+ this.refresh();
50123
+ };
50102
50124
  }
50103
50125
  }
50104
50126
 
@@ -50173,7 +50195,9 @@ class Image$1 {
50173
50195
  this.builder.moveable.updateRect();
50174
50196
  document.querySelector('.moveable-control-box').style.display = 'none';
50175
50197
  }
50176
- }, 300);
50198
+
50199
+ this.util.repositionColumnTool();
50200
+ }, 0); // refesh() is called after img onload, so no need to have a delay.
50177
50201
  }
50178
50202
  }
50179
50203
 
@@ -65755,7 +65779,7 @@ class Rte {
65755
65779
  }
65756
65780
 
65757
65781
  if (this.builder.opts.toolbarAddSnippetButton && html_elementrte.indexOf('rte-addsnippet') === -1 && html_elementrtemore.indexOf('rte-addsnippet') === -1) {
65758
- html_elementrte = `<button tabindex="-1" title="${util.out('Add Snippet')}" class="rte-addsnippet"><svg class="is-icon-flex" style="width:18px;height:18px;margin-top:-1px;"><use xlink:href="#ion-ios-plus-empty"></use></svg></button>` + html_rte;
65782
+ html_elementrte = `<button tabindex="-1" title="${util.out('Add Snippet')}" class="rte-addsnippet"><svg class="is-icon-flex" style="width:18px;height:18px;margin-top:-1px;"><use xlink:href="#ion-ios-plus-empty"></use></svg></button>` + html_elementrte; //html_rte;
65759
65783
  }
65760
65784
 
65761
65785
  if (html_elementrtemore !== '' && html_elementrte.indexOf('rte-more') === -1) {
@@ -65786,7 +65810,7 @@ class Rte {
65786
65810
  }
65787
65811
 
65788
65812
  if (this.builder.opts.toolbarAddSnippetButton && html_iconrte.indexOf('rte-addsnippet') === -1 && html_iconrtemore.indexOf('rte-addsnippet') === -1) {
65789
- html_iconrte = `<button tabindex="-1" title="${util.out('Add Snippet')}" class="rte-addsnippet"><svg class="is-icon-flex" style="width:18px;height:18px;margin-top:-1px;"><use xlink:href="#ion-ios-plus-empty"></use></svg></button>` + html_rte;
65813
+ html_iconrte = `<button tabindex="-1" title="${util.out('Add Snippet')}" class="rte-addsnippet"><svg class="is-icon-flex" style="width:18px;height:18px;margin-top:-1px;"><use xlink:href="#ion-ios-plus-empty"></use></svg></button>` + html_iconrte; //html_rte;
65790
65814
  }
65791
65815
 
65792
65816
  if (html_iconrtemore !== '' && html_iconrte.indexOf('rte-more') === -1) {