@innovastudio/contentbox 1.0.34 → 1.0.38
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/contentbox",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.38",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "public/contentbox/contentbox.esm.js",
|
|
6
6
|
"files": [
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"@ashthornton/asscroll": "^2.0.4",
|
|
42
|
-
"@innovastudio/contentbuilder": "^1.0.
|
|
42
|
+
"@innovastudio/contentbuilder": "^1.0.66",
|
|
43
43
|
"axios": "^0.21.4",
|
|
44
44
|
"cors": "^2.8.5",
|
|
45
45
|
"express": "^4.17.1",
|
|
@@ -311,7 +311,7 @@ class SideBar {
|
|
|
311
311
|
this.builderStuff = builderStuff;
|
|
312
312
|
|
|
313
313
|
if (this.builder.useSidebar) {
|
|
314
|
-
html += '<div class="is-sidebar active" style="transform: translate3d(0,0,0);display: flex;flex-direction: column;">';
|
|
314
|
+
html += '<div class="is-sidebar active" style="transform: translate3d(0,0,0);display: flex;flex-direction: column;opacity:opacity: 0.0001;">';
|
|
315
315
|
var sideIndex = 0;
|
|
316
316
|
this.builder.sidebarData.buttons.map(button => {
|
|
317
317
|
if (button.name == 'section') {
|
|
@@ -19192,8 +19192,8 @@ class HtmlUtil {
|
|
|
19192
19192
|
Array.prototype.forEach.call(emptystyles, emptystyle => {
|
|
19193
19193
|
emptystyle.removeAttribute('style');
|
|
19194
19194
|
});
|
|
19195
|
-
dom$E.removeEmptyStyle(tmp);
|
|
19196
|
-
|
|
19195
|
+
dom$E.removeEmptyStyle(tmp); // dom.cleanEmptySpans(tmp);
|
|
19196
|
+
|
|
19197
19197
|
elms = tmp.querySelectorAll('[data-keep]');
|
|
19198
19198
|
dom$E.removeAttributes(elms, 'data-keep'); //Cleanup button <span contenteditable="false"><a contenteditable="true">button</a></span>
|
|
19199
19199
|
|
|
@@ -49352,6 +49352,10 @@ class Image {
|
|
|
49352
49352
|
let modalImageSelect = builderStuff.querySelector('.is-modal.imageselect');
|
|
49353
49353
|
let iframe = modalImageSelect.querySelector('iframe');
|
|
49354
49354
|
|
|
49355
|
+
if (this.builder.opts.assetRefresh) {
|
|
49356
|
+
iframe.src = this.builder.opts.imageselect;
|
|
49357
|
+
}
|
|
49358
|
+
|
|
49355
49359
|
if (iframe.src === 'about:blank') {
|
|
49356
49360
|
iframe.src = this.builder.opts.imageselect;
|
|
49357
49361
|
}
|
|
@@ -49374,6 +49378,10 @@ class Image {
|
|
|
49374
49378
|
let modalImageSelect = builderStuff.querySelector('.is-modal.imageselect');
|
|
49375
49379
|
let iframe = modalImageSelect.querySelector('iframe');
|
|
49376
49380
|
|
|
49381
|
+
if (this.builder.opts.assetRefresh) {
|
|
49382
|
+
iframe.src = this.builder.opts.imageselect;
|
|
49383
|
+
}
|
|
49384
|
+
|
|
49377
49385
|
if (iframe.src === 'about:blank') {
|
|
49378
49386
|
iframe.src = this.builder.opts.imageselect;
|
|
49379
49387
|
}
|
|
@@ -50061,6 +50069,10 @@ class Image {
|
|
|
50061
50069
|
resize = false;
|
|
50062
50070
|
}
|
|
50063
50071
|
|
|
50072
|
+
if (this.builder.opts.maxEmbedImageWidth === -1) {
|
|
50073
|
+
resize = false;
|
|
50074
|
+
}
|
|
50075
|
+
|
|
50064
50076
|
if (!resize) {
|
|
50065
50077
|
// NEW: this is to prevent using MegaPixImage (problem with some PNG. PNG doesn't need to resize, so no need to use MegaPixImage)
|
|
50066
50078
|
let tmpCanvasNoCrop = document.getElementById('myTmpCanvasNoCrop');
|
|
@@ -51491,6 +51503,10 @@ class Hyperlink {
|
|
|
51491
51503
|
} else {
|
|
51492
51504
|
let modalFileSelect = this.builderStuff.querySelector('.is-modal.fileselect');
|
|
51493
51505
|
|
|
51506
|
+
if (this.builder.opts.assetRefresh) {
|
|
51507
|
+
modalFileSelect.querySelector('iframe').src = this.builder.opts.fileselect;
|
|
51508
|
+
}
|
|
51509
|
+
|
|
51494
51510
|
if (modalFileSelect.querySelector('iframe').src === 'about:blank') {
|
|
51495
51511
|
modalFileSelect.querySelector('iframe').src = this.builder.opts.fileselect;
|
|
51496
51512
|
}
|
|
@@ -51583,6 +51599,10 @@ class Hyperlink {
|
|
|
51583
51599
|
} else {
|
|
51584
51600
|
let modalFileSelect = this.builderStuff.querySelector('.is-modal.fileselect');
|
|
51585
51601
|
|
|
51602
|
+
if (this.builder.opts.assetRefresh) {
|
|
51603
|
+
modalFileSelect.querySelector('iframe').src = this.builder.opts.fileselect;
|
|
51604
|
+
}
|
|
51605
|
+
|
|
51586
51606
|
if (modalFileSelect.querySelector('iframe').src === 'about:blank') {
|
|
51587
51607
|
modalFileSelect.querySelector('iframe').src = this.builder.opts.fileselect;
|
|
51588
51608
|
}
|
|
@@ -53012,6 +53032,10 @@ class Video {
|
|
|
53012
53032
|
let modalVideoSelect = builderStuff.querySelector('.is-modal.videoselect');
|
|
53013
53033
|
let iframe = modalVideoSelect.querySelector('iframe');
|
|
53014
53034
|
|
|
53035
|
+
if (this.builder.opts.assetRefresh) {
|
|
53036
|
+
iframe.src = this.builder.opts.videoSelect;
|
|
53037
|
+
}
|
|
53038
|
+
|
|
53015
53039
|
if (iframe.src === 'about:blank') {
|
|
53016
53040
|
iframe.src = this.builder.opts.videoSelect;
|
|
53017
53041
|
}
|
|
@@ -63697,6 +63721,10 @@ class Rte {
|
|
|
63697
63721
|
let modalImageSelect = this.builderStuff.querySelector('.is-modal.imageselect');
|
|
63698
63722
|
let iframe = modalImageSelect.querySelector('iframe');
|
|
63699
63723
|
|
|
63724
|
+
if (this.builder.opts.assetRefresh) {
|
|
63725
|
+
iframe.src = this.builder.opts.imageselect;
|
|
63726
|
+
}
|
|
63727
|
+
|
|
63700
63728
|
if (iframe.src === 'about:blank') {
|
|
63701
63729
|
iframe.src = this.builder.opts.imageselect;
|
|
63702
63730
|
}
|
|
@@ -67693,6 +67721,8 @@ class ContentBuilder {
|
|
|
67693
67721
|
imageSelect: '',
|
|
67694
67722
|
fileSelect: '',
|
|
67695
67723
|
videoSelect: '',
|
|
67724
|
+
assetRefresh: true,
|
|
67725
|
+
// asset manager specified in imageSelect, fileSelect & videoSelect will always refreshed on click/open
|
|
67696
67726
|
customTags: [],
|
|
67697
67727
|
buttons: ['bold', 'italic', 'underline', 'formatting', 'color', 'align', 'textsettings', 'createLink', 'tags', '|', 'undo', 'redo', 'zoom', 'more'],
|
|
67698
67728
|
buttonsMore: ['icon', 'image', '|', 'list', 'font', 'formatPara', '|', 'html', 'preferences'],
|
|
@@ -73727,6 +73757,7 @@ class ContentBox {
|
|
|
73727
73757
|
if (!builderStuff) {
|
|
73728
73758
|
builderStuff = document.createElement('div');
|
|
73729
73759
|
builderStuff.id = '_cbhtml';
|
|
73760
|
+
builderStuff.style.visibility = 'hidden';
|
|
73730
73761
|
builderStuff.className = 'is-ui';
|
|
73731
73762
|
document.body.appendChild(builderStuff);
|
|
73732
73763
|
builderStuff = document.querySelector('#_cbhtml');
|
|
@@ -73979,7 +74010,8 @@ class ContentBox {
|
|
|
73979
74010
|
if (elm) elm.parentNode.removeChild(elm);
|
|
73980
74011
|
this.wrapperEl.style.opacity = 1;
|
|
73981
74012
|
let sidebar = builderStuff.querySelector('.is-sidebar');
|
|
73982
|
-
if (sidebar) sidebar.style.opacity = 1;
|
|
74013
|
+
if (sidebar) sidebar.style.opacity = 1;
|
|
74014
|
+
this.builderStuff.style.visibility = 'visible'; // Remove the page-overlay
|
|
73983
74015
|
|
|
73984
74016
|
pageOverlay = builderStuff.querySelectorAll('.page-overlay');
|
|
73985
74017
|
pageOverlay.forEach(elm => {
|