@innovastudio/contentbuilder 1.1.13 → 1.1.16
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
|
@@ -2530,6 +2530,7 @@ button:focus {
|
|
|
2530
2530
|
#_cbhtml .is-modal.createlink label,
|
|
2531
2531
|
.is-ui .is-modal.createlink label {
|
|
2532
2532
|
font-size: 14px;
|
|
2533
|
+
display: block;
|
|
2533
2534
|
}
|
|
2534
2535
|
#_cbhtml .is-modal.createlink div.is-modal-content,
|
|
2535
2536
|
.is-ui .is-modal.createlink div.is-modal-content {
|
|
@@ -46618,6 +46618,7 @@ class Image {
|
|
|
46618
46618
|
|
|
46619
46619
|
if (this.builder.opts.assetRefresh) {
|
|
46620
46620
|
iframe.src = this.builder.opts.imageselect;
|
|
46621
|
+
this.builder.opts.assetRefresh = false;
|
|
46621
46622
|
}
|
|
46622
46623
|
|
|
46623
46624
|
if (iframe.src === 'about:blank') {
|
|
@@ -46645,6 +46646,7 @@ class Image {
|
|
|
46645
46646
|
|
|
46646
46647
|
if (this.builder.opts.assetRefresh) {
|
|
46647
46648
|
iframe.src = this.builder.opts.imageselect;
|
|
46649
|
+
this.builder.opts.assetRefresh = false;
|
|
46648
46650
|
}
|
|
46649
46651
|
|
|
46650
46652
|
if (iframe.src === 'about:blank') {
|
|
@@ -48783,6 +48785,7 @@ class Hyperlink {
|
|
|
48783
48785
|
|
|
48784
48786
|
if (this.builder.opts.assetRefresh) {
|
|
48785
48787
|
modalFileSelect.querySelector('iframe').src = this.builder.opts.fileselect;
|
|
48788
|
+
this.builder.opts.assetRefresh = false;
|
|
48786
48789
|
}
|
|
48787
48790
|
|
|
48788
48791
|
if (modalFileSelect.querySelector('iframe').src === 'about:blank') {
|
|
@@ -48879,6 +48882,7 @@ class Hyperlink {
|
|
|
48879
48882
|
|
|
48880
48883
|
if (this.builder.opts.assetRefresh) {
|
|
48881
48884
|
modalFileSelect.querySelector('iframe').src = this.builder.opts.fileselect;
|
|
48885
|
+
this.builder.opts.assetRefresh = false;
|
|
48882
48886
|
}
|
|
48883
48887
|
|
|
48884
48888
|
if (modalFileSelect.querySelector('iframe').src === 'about:blank') {
|
|
@@ -53379,6 +53383,11 @@ class ColumnTool {
|
|
|
53379
53383
|
let modalImageSelect = builderStuff.querySelector('.is-modal.imageselect');
|
|
53380
53384
|
let iframe = modalImageSelect.querySelector('iframe');
|
|
53381
53385
|
|
|
53386
|
+
if (this.builder.opts.assetRefresh) {
|
|
53387
|
+
iframe.src = this.builder.opts.imageselect;
|
|
53388
|
+
this.builder.opts.assetRefresh = false;
|
|
53389
|
+
}
|
|
53390
|
+
|
|
53382
53391
|
if (iframe.src === 'about:blank') {
|
|
53383
53392
|
iframe.src = this.builder.opts.imageselect;
|
|
53384
53393
|
}
|
|
@@ -54081,6 +54090,11 @@ class ColumnTool {
|
|
|
54081
54090
|
let modalFileSelect = builderStuff.querySelector('.is-modal.fileselect');
|
|
54082
54091
|
let iframe = modalFileSelect.querySelector('iframe');
|
|
54083
54092
|
|
|
54093
|
+
if (this.builder.opts.assetRefresh) {
|
|
54094
|
+
iframe.src = this.builder.opts.fileselect;
|
|
54095
|
+
this.builder.opts.assetRefresh = false;
|
|
54096
|
+
}
|
|
54097
|
+
|
|
54084
54098
|
if (iframe.src === 'about:blank') {
|
|
54085
54099
|
iframe.src = this.builder.opts.fileselect;
|
|
54086
54100
|
}
|
|
@@ -54097,6 +54111,11 @@ class ColumnTool {
|
|
|
54097
54111
|
let modalImageSelect = builderStuff.querySelector('.is-modal.imageselect');
|
|
54098
54112
|
let iframe = modalImageSelect.querySelector('iframe');
|
|
54099
54113
|
|
|
54114
|
+
if (this.builder.opts.assetRefresh) {
|
|
54115
|
+
iframe.src = this.builder.opts.imageselect;
|
|
54116
|
+
this.builder.opts.assetRefresh = false;
|
|
54117
|
+
}
|
|
54118
|
+
|
|
54100
54119
|
if (iframe.src === 'about:blank') {
|
|
54101
54120
|
iframe.src = this.builder.opts.imageselect;
|
|
54102
54121
|
}
|
|
@@ -61733,6 +61752,7 @@ class Rte {
|
|
|
61733
61752
|
|
|
61734
61753
|
if (this.builder.opts.assetRefresh) {
|
|
61735
61754
|
iframe.src = this.builder.opts.imageselect;
|
|
61755
|
+
this.builder.opts.assetRefresh = false;
|
|
61736
61756
|
}
|
|
61737
61757
|
|
|
61738
61758
|
if (iframe.src === 'about:blank') {
|
|
@@ -66095,7 +66115,7 @@ class ContentBuilder {
|
|
|
66095
66115
|
imageSelect: '',
|
|
66096
66116
|
fileSelect: '',
|
|
66097
66117
|
videoSelect: '',
|
|
66098
|
-
assetRefresh:
|
|
66118
|
+
assetRefresh: false,
|
|
66099
66119
|
// asset manager specified in imageSelect, fileSelect & videoSelect will always refreshed on click/open
|
|
66100
66120
|
customTags: [],
|
|
66101
66121
|
buttons: ['bold', 'italic', 'underline', 'formatting', 'color', 'align', 'textsettings', 'createLink', 'tags', '|', 'undo', 'redo', 'zoom', 'more'],
|
|
@@ -66829,8 +66849,12 @@ class ContentBuilder {
|
|
|
66829
66849
|
imageResizer.style.left = '-10px';
|
|
66830
66850
|
imageResizer.style.width = '1px';
|
|
66831
66851
|
imageResizer.style.height = '1px';
|
|
66832
|
-
|
|
66833
|
-
|
|
66852
|
+
|
|
66853
|
+
try {
|
|
66854
|
+
this.moveable.updateRect();
|
|
66855
|
+
document.querySelector('.moveable-control-box').style.display = 'none';
|
|
66856
|
+
} catch (e) {// Do Nothing
|
|
66857
|
+
}
|
|
66834
66858
|
}
|
|
66835
66859
|
|
|
66836
66860
|
if (!(a || b || c || d || f || g || h || i || j || o || isSpecialElement) || rowClicked && !i || containerClicked) {
|
|
@@ -67478,6 +67502,7 @@ class ContentBuilder {
|
|
|
67478
67502
|
formUpload.parentNode.parentNode.querySelector('input[type="file"]').value = '';
|
|
67479
67503
|
}
|
|
67480
67504
|
});
|
|
67505
|
+
this.opts.assetRefresh = true; // After file upload, make open asset refreshed
|
|
67481
67506
|
}
|
|
67482
67507
|
|
|
67483
67508
|
openImagePicker(currentUrl, callback) {
|
|
@@ -68932,35 +68957,35 @@ class ContentBuilder {
|
|
|
68932
68957
|
}
|
|
68933
68958
|
|
|
68934
68959
|
contentword.innerHTML = sPastedText;
|
|
68935
|
-
|
|
68936
|
-
|
|
68937
|
-
|
|
68938
|
-
|
|
68939
|
-
|
|
68940
|
-
|
|
68941
|
-
|
|
68942
|
-
|
|
68943
|
-
|
|
68944
|
-
|
|
68945
|
-
|
|
68946
|
-
|
|
68947
|
-
|
|
68948
|
-
|
|
68949
|
-
|
|
68950
|
-
|
|
68951
|
-
|
|
68952
|
-
|
|
68953
|
-
|
|
68954
|
-
|
|
68955
|
-
});
|
|
68960
|
+
/*
|
|
68961
|
+
// remove attributes
|
|
68962
|
+
if(this.opts.paste === 'html'){//with styles
|
|
68963
|
+
let elms = contentword.querySelectorAll('*');
|
|
68964
|
+
Array.prototype.forEach.call(elms, (elm) => {
|
|
68965
|
+
for(let n = 0;n<elm.attributes.length;n++) {
|
|
68966
|
+
if(elm.attributes[n].name!=='style') elm.removeAttribute(elm.attributes[n].name);
|
|
68967
|
+
}
|
|
68968
|
+
});
|
|
68969
|
+
} else { //html-without-styles (default)
|
|
68970
|
+
|
|
68971
|
+
const removeAttributes = (element) => {
|
|
68972
|
+
while (element.attributes.length > 0) {
|
|
68973
|
+
element.removeAttribute(element.attributes[0].name);
|
|
68974
|
+
}
|
|
68975
|
+
};
|
|
68976
|
+
let elms = contentword.querySelectorAll('*');
|
|
68977
|
+
Array.prototype.forEach.call(elms, (elm) => {
|
|
68978
|
+
removeAttributes(elm);
|
|
68979
|
+
});
|
|
68956
68980
|
}
|
|
68981
|
+
*/
|
|
68982
|
+
|
|
68957
68983
|
/*
|
|
68958
68984
|
Additional Cleanup:
|
|
68959
68985
|
- Remove p inside li
|
|
68960
68986
|
- Remove li with white-space: pre
|
|
68961
68987
|
*/
|
|
68962
68988
|
|
|
68963
|
-
|
|
68964
68989
|
let elms = contentword.querySelectorAll('li');
|
|
68965
68990
|
Array.prototype.forEach.call(elms, elm => {
|
|
68966
68991
|
elm.style.whiteSpace = '';
|