@innovastudio/contentbuilder 1.3.52 → 1.3.54

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.52",
4
+ "version": "1.3.54",
5
5
  "description": "",
6
6
  "main": "public/contentbuilder/contentbuilder.esm.js",
7
7
  "files": [
@@ -4165,10 +4165,8 @@ class Util {
4165
4165
  dom.addClass(pop, 'active');
4166
4166
 
4167
4167
  const handleClickOut = e => {
4168
- if (!pop.contains(e.target) && !btn.contains(e.target)) {
4168
+ if (!pop.contains(e.target) && !btn.contains(e.target) && !e.target.closest('.pickcolormore')) {
4169
4169
  // click outside
4170
- const pickcolormore = document.querySelector('.pickcolormore.active');
4171
- if (pickcolormore) if (pickcolormore.contains(e.target)) return;
4172
4170
  this.hideRtePop(pop); // hide
4173
4171
 
4174
4172
  pop.removeEventListener('keydown', handleKeyDown);
@@ -17175,10 +17173,10 @@ const renderQuickAdd = builder => {
17175
17173
  elm = quickadd.querySelector('.add-image');
17176
17174
  dom.addEventListener(elm, 'click', () => {
17177
17175
  const mode = quickadd.getAttribute('data-mode');
17178
- let html = `<img onload="imageLoaded(this)" src="${builder.opts.snippetPath}example.png" alt="" />`;
17176
+ let html = `<img src="${builder.opts.snippetPath}example.png" alt="" />`;
17179
17177
 
17180
17178
  if (builder.opts.snippetSampleImage) {
17181
- html = `<img onload="imageLoaded(this)" src="${builder.opts.snippetSampleImage}" alt="" />`;
17179
+ html = `<img src="${builder.opts.snippetSampleImage}" alt="" />`;
17182
17180
  }
17183
17181
 
17184
17182
  util.addContent(html, mode);
@@ -73008,7 +73006,10 @@ class Resize {
73008
73006
  // setTimeout(()=>{
73009
73007
  // col.click();
73010
73008
  // },30);
73009
+ //Trigger Change event
73011
73010
 
73011
+
73012
+ this.builder.opts.onChange();
73012
73013
  }
73013
73014
  });
73014
73015
  }
@@ -75351,11 +75352,8 @@ class ContentBuilder {
75351
75352
  window.selectImage = this.selectImage.bind(this);
75352
75353
  window.selectVideo = this.selectVideo.bind(this);
75353
75354
  window.selectAsset = this.selectAsset.bind(this);
75354
- window.imageLoaded = this.imageLoaded.bind(this); //this.imageLoaded;
75355
-
75356
75355
  window.assetType = this.assetType.bind(this);
75357
75356
  window.hideModal = this.hideModal.bind(this);
75358
- this.win.imageLoaded = this.imageLoaded.bind(this); //this.imageLoaded;
75359
75357
  } // constructor
75360
75358
  // Convenience constructor, so that the plugin can be called directly using: ContentBuilder.run({ ... });
75361
75359
 
@@ -76343,10 +76341,6 @@ class ContentBuilder {
76343
76341
 
76344
76342
  saveForUndo(checkLater) {
76345
76343
  this.uo.saveForUndo(checkLater);
76346
- }
76347
-
76348
- imageLoaded(obj) {
76349
- obj.removeAttribute('onload');
76350
76344
  } // Module related
76351
76345
 
76352
76346