@innovastudio/contentbuilder 1.1.4 → 1.1.5

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@innovastudio/contentbuilder",
3
- "version": "1.1.4",
3
+ "version": "1.1.5",
4
4
  "description": "",
5
5
  "main": "public/contentbuilder/contentbuilder.esm.js",
6
6
  "files": [
@@ -2093,7 +2093,7 @@ button:focus {
2093
2093
  position: fixed;
2094
2094
  overflow: hidden;
2095
2095
  width: 520px;
2096
- height: 720px;
2096
+ height: 686px;
2097
2097
  top: 50%;
2098
2098
  left: auto;
2099
2099
  right: 30%;
@@ -66357,7 +66357,8 @@ class ContentBuilder {
66357
66357
  stretch: 'items-stretch'
66358
66358
  }
66359
66359
  },
66360
- useCssClasses: false
66360
+ useCssClasses: false,
66361
+ useButtonPlugin: false
66361
66362
  }; // obj.preserveSelection = true; (can be set programmatically) to prevent click that clears selection on external custom modal.
66362
66363
 
66363
66364
  this.opts = Object.assign(this, defaults, opts);
@@ -66420,16 +66421,19 @@ class ContentBuilder {
66420
66421
  this.opts.onMediaUpload = this.opts.onLargerImageUpload;
66421
66422
  } else if (this.opts.onMediaUpload) {
66422
66423
  this.opts.onLargerImageUpload = this.opts.onMediaUpload;
66423
- } // Check if button editor plugin is used
66424
+ } // useButtonPlugin
66424
66425
 
66425
66426
 
66426
- const plugins = this.plugins;
66427
- this.useButtonPlugin = false;
66427
+ if (this.opts.emailMode) {
66428
+ this.useButtonPlugin = true;
66429
+ }
66428
66430
 
66429
- for (let i = 0; i < plugins.length; i++) {
66430
- if (plugins[i].name === 'buttoneditor') {
66431
- this.useButtonPlugin = true;
66432
- }
66431
+ if (!this.useButtonPlugin) {
66432
+ let _arr = this.plugins.filter(item => {
66433
+ return item.name !== 'buttoneditor';
66434
+ });
66435
+
66436
+ this.plugins = [..._arr];
66433
66437
  } // Alternative settions to define css grid frameworks
66434
66438
 
66435
66439