@innovastudio/contentbuilder 1.0.61 → 1.0.66

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.0.61",
3
+ "version": "1.0.66",
4
4
  "description": "",
5
5
  "main": "public/contentbuilder/contentbuilder.esm.js",
6
6
  "files": [
@@ -9120,8 +9120,8 @@ class HtmlUtil {
9120
9120
  Array.prototype.forEach.call(emptystyles, emptystyle => {
9121
9121
  emptystyle.removeAttribute('style');
9122
9122
  });
9123
- dom$E.removeEmptyStyle(tmp);
9124
- dom$E.cleanEmptySpans(tmp);
9123
+ dom$E.removeEmptyStyle(tmp); // dom.cleanEmptySpans(tmp);
9124
+
9125
9125
  elms = tmp.querySelectorAll('[data-keep]');
9126
9126
  dom$E.removeAttributes(elms, 'data-keep'); //Cleanup button <span contenteditable="false"><a contenteditable="true">button</a></span>
9127
9127
 
@@ -39280,6 +39280,10 @@ class Image {
39280
39280
  let modalImageSelect = builderStuff.querySelector('.is-modal.imageselect');
39281
39281
  let iframe = modalImageSelect.querySelector('iframe');
39282
39282
 
39283
+ if (this.builder.opts.assetRefresh) {
39284
+ iframe.src = this.builder.opts.imageselect;
39285
+ }
39286
+
39283
39287
  if (iframe.src === 'about:blank') {
39284
39288
  iframe.src = this.builder.opts.imageselect;
39285
39289
  }
@@ -39302,6 +39306,10 @@ class Image {
39302
39306
  let modalImageSelect = builderStuff.querySelector('.is-modal.imageselect');
39303
39307
  let iframe = modalImageSelect.querySelector('iframe');
39304
39308
 
39309
+ if (this.builder.opts.assetRefresh) {
39310
+ iframe.src = this.builder.opts.imageselect;
39311
+ }
39312
+
39305
39313
  if (iframe.src === 'about:blank') {
39306
39314
  iframe.src = this.builder.opts.imageselect;
39307
39315
  }
@@ -39989,6 +39997,10 @@ class Image {
39989
39997
  resize = false;
39990
39998
  }
39991
39999
 
40000
+ if (this.builder.opts.maxEmbedImageWidth === -1) {
40001
+ resize = false;
40002
+ }
40003
+
39992
40004
  if (!resize) {
39993
40005
  // NEW: this is to prevent using MegaPixImage (problem with some PNG. PNG doesn't need to resize, so no need to use MegaPixImage)
39994
40006
  let tmpCanvasNoCrop = document.getElementById('myTmpCanvasNoCrop');
@@ -41419,6 +41431,10 @@ class Hyperlink {
41419
41431
  } else {
41420
41432
  let modalFileSelect = this.builderStuff.querySelector('.is-modal.fileselect');
41421
41433
 
41434
+ if (this.builder.opts.assetRefresh) {
41435
+ modalFileSelect.querySelector('iframe').src = this.builder.opts.fileselect;
41436
+ }
41437
+
41422
41438
  if (modalFileSelect.querySelector('iframe').src === 'about:blank') {
41423
41439
  modalFileSelect.querySelector('iframe').src = this.builder.opts.fileselect;
41424
41440
  }
@@ -41511,6 +41527,10 @@ class Hyperlink {
41511
41527
  } else {
41512
41528
  let modalFileSelect = this.builderStuff.querySelector('.is-modal.fileselect');
41513
41529
 
41530
+ if (this.builder.opts.assetRefresh) {
41531
+ modalFileSelect.querySelector('iframe').src = this.builder.opts.fileselect;
41532
+ }
41533
+
41514
41534
  if (modalFileSelect.querySelector('iframe').src === 'about:blank') {
41515
41535
  modalFileSelect.querySelector('iframe').src = this.builder.opts.fileselect;
41516
41536
  }
@@ -42940,6 +42960,10 @@ class Video {
42940
42960
  let modalVideoSelect = builderStuff.querySelector('.is-modal.videoselect');
42941
42961
  let iframe = modalVideoSelect.querySelector('iframe');
42942
42962
 
42963
+ if (this.builder.opts.assetRefresh) {
42964
+ iframe.src = this.builder.opts.videoSelect;
42965
+ }
42966
+
42943
42967
  if (iframe.src === 'about:blank') {
42944
42968
  iframe.src = this.builder.opts.videoSelect;
42945
42969
  }
@@ -45640,6 +45664,7 @@ class ColumnTool {
45640
45664
 
45641
45665
  this.showHideLockIndicator(cell);
45642
45666
  this.builder.element.applyBehavior(cell);
45667
+ this.columnMore.style.display = '';
45643
45668
  e.preventDefault();
45644
45669
  }); // Open Column Settings
45645
45670
 
@@ -53624,6 +53649,10 @@ class Rte {
53624
53649
  let modalImageSelect = this.builderStuff.querySelector('.is-modal.imageselect');
53625
53650
  let iframe = modalImageSelect.querySelector('iframe');
53626
53651
 
53652
+ if (this.builder.opts.assetRefresh) {
53653
+ iframe.src = this.builder.opts.imageselect;
53654
+ }
53655
+
53627
53656
  if (iframe.src === 'about:blank') {
53628
53657
  iframe.src = this.builder.opts.imageselect;
53629
53658
  }
@@ -57620,6 +57649,8 @@ class ContentBuilder {
57620
57649
  imageSelect: '',
57621
57650
  fileSelect: '',
57622
57651
  videoSelect: '',
57652
+ assetRefresh: true,
57653
+ // asset manager specified in imageSelect, fileSelect & videoSelect will always refreshed on click/open
57623
57654
  customTags: [],
57624
57655
  buttons: ['bold', 'italic', 'underline', 'formatting', 'color', 'align', 'textsettings', 'createLink', 'tags', '|', 'undo', 'redo', 'zoom', 'more'],
57625
57656
  buttonsMore: ['icon', 'image', '|', 'list', 'font', 'formatPara', '|', 'html', 'preferences'],
@@ -58369,6 +58400,8 @@ class ContentBuilder {
58369
58400
  this.colTool.showColumnTool(this.activeCol);
58370
58401
  }
58371
58402
  }
58403
+
58404
+ this.util.checkEmpty(); // for multiple instances check
58372
58405
  },
58373
58406
  onAdd: evt => {
58374
58407
  var itemEl = evt.item;
@@ -59549,11 +59582,13 @@ class ContentBuilder {
59549
59582
  } else if (url.toLowerCase().indexOf('youtube.com') !== -1 || url.toLowerCase().indexOf('vimeo.com') !== -1) {
59550
59583
  this.lightbox.openExternalVideo(url, 'dark', color);
59551
59584
  } else {
59552
- // Will go to the link
59553
- const answer = window.confirm(this.util.out('Do you really want to leave?')); // cancel the navigation and stay on the same page
59585
+ if (url.indexOf('#') === 0) ; else {
59586
+ // Will go to the link
59587
+ const answer = window.confirm(this.util.out('Do you really want to leave?')); // cancel the navigation and stay on the same page
59554
59588
 
59555
- if (!answer) {
59556
- return false;
59589
+ if (!answer) {
59590
+ return false;
59591
+ }
59557
59592
  }
59558
59593
 
59559
59594
  window.location.href = url;
@@ -59672,20 +59707,31 @@ class ContentBuilder {
59672
59707
  return false;
59673
59708
  } else {
59674
59709
  // Will go to the link
59675
- const answer = window.confirm(this.util.out('Do you really want to leave?')); // cancel the navigation and stay on the same page
59710
+ if (url.indexOf('#') === 0) ; else {
59711
+ const answer = window.confirm(this.util.out('Do you really want to leave?')); // cancel the navigation and stay on the same page
59676
59712
 
59677
- if (!answer) {
59678
- e.preventDefault();
59679
- return false;
59713
+ if (!answer) {
59714
+ e.preventDefault();
59715
+ return false;
59716
+ }
59680
59717
  }
59681
59718
  }
59682
59719
  } else {
59683
- const answer = window.confirm(this.util.out('Do you really want to leave?')); // cancel the navigation and stay on the same page
59720
+ let url = link.getAttribute('href');
59684
59721
 
59685
- if (!answer) {
59722
+ if (!url) {
59686
59723
  e.preventDefault();
59687
59724
  return false;
59688
59725
  }
59726
+
59727
+ if (url.indexOf('#') === 0) ; else {
59728
+ const answer = window.confirm(this.util.out('Do you really want to leave?')); // cancel the navigation and stay on the same page
59729
+
59730
+ if (!answer) {
59731
+ e.preventDefault();
59732
+ return false;
59733
+ }
59734
+ }
59689
59735
  }
59690
59736
  }
59691
59737
  } // e.preventDefault();