@innovastudio/contentbuilder 1.1.17 → 1.1.18
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
|
@@ -5113,7 +5113,7 @@ class Util {
|
|
|
5113
5113
|
let emptyinfo = builder.querySelector('.row-add-initial');
|
|
5114
5114
|
|
|
5115
5115
|
if (!emptyinfo) {
|
|
5116
|
-
builder.innerHTML = `<button type="button" class="row-add-initial">${this.out('Empty')}<br><span>${this.out('+ Click to add content')}</span></div>`;
|
|
5116
|
+
builder.innerHTML = `<button type="button" class="row-add-initial">${this.out('Empty')}<br><span class="block">${this.out('+ Click to add content')}</span></div>`;
|
|
5117
5117
|
emptyinfo = builder.querySelector('.row-add-initial');
|
|
5118
5118
|
}
|
|
5119
5119
|
|
|
@@ -7866,6 +7866,9 @@ class Dom {
|
|
|
7866
7866
|
|
|
7867
7867
|
|
|
7868
7868
|
cleanUnusedSpan(area) {
|
|
7869
|
+
// for specific element only (during execCommand),
|
|
7870
|
+
// not for the entire ContentBuilder container,
|
|
7871
|
+
// because there can be custom blocks
|
|
7869
7872
|
let spans = area.querySelectorAll('span');
|
|
7870
7873
|
const filter = Array.prototype.filter;
|
|
7871
7874
|
let children = filter.call(spans, element => {
|
|
@@ -13543,9 +13546,8 @@ class HtmlUtil {
|
|
|
13543
13546
|
dom$I.removeClass(elm, this.builder.cssClasses.extend.unset);
|
|
13544
13547
|
});
|
|
13545
13548
|
} // Clean unused spans
|
|
13549
|
+
// dom.cleanUnusedSpan(content); // REVIEW
|
|
13546
13550
|
|
|
13547
|
-
|
|
13548
|
-
dom$I.cleanUnusedSpan(content); // REVIEW
|
|
13549
13551
|
}
|
|
13550
13552
|
|
|
13551
13553
|
const util = this.builder.util;
|
|
@@ -13948,12 +13950,12 @@ class HtmlUtil {
|
|
|
13948
13950
|
background-color: ${this.builder.styleButtonClassicBackgroundHover};
|
|
13949
13951
|
}
|
|
13950
13952
|
button:focus {outline:none;}
|
|
13951
|
-
textarea {font-family: courier;font-size: 17px;line-height: 2;letter-spacing: 1px;padding:8px 16px;box-sizing:border-box;border:1px solid rgb(199, 199, 199);}
|
|
13953
|
+
textarea {font-family: courier, monospace;font-size: 17px;line-height: 2;letter-spacing: 1px;padding:8px 16px;box-sizing:border-box;border:1px solid rgb(199, 199, 199);}
|
|
13952
13954
|
textarea:focus {outline:none}
|
|
13953
13955
|
|
|
13954
13956
|
#code {display:none;}
|
|
13955
13957
|
.CodeMirror {
|
|
13956
|
-
font-family: courier;
|
|
13958
|
+
font-family: courier, monospace;
|
|
13957
13959
|
font-size: 15px;
|
|
13958
13960
|
line-height:1.9;
|
|
13959
13961
|
width:100%;height:100%;
|
|
@@ -46711,14 +46713,16 @@ class Image {
|
|
|
46711
46713
|
elm = imageTool.querySelector('.image-edit');
|
|
46712
46714
|
dom$A.addEventListener(elm, 'click', () => {
|
|
46713
46715
|
let img = this.builder.activeImage;
|
|
46716
|
+
let preview = modalImageEdit.querySelector('.imageedit-preview');
|
|
46717
|
+
preview.innerHTML = '<img style="max-width:100%;object-fit:contain;height:100%;"/>';
|
|
46718
|
+
let imagePreview = modalImageEdit.querySelector('img');
|
|
46714
46719
|
|
|
46715
46720
|
if (this.builder.onImageEditClick) {
|
|
46716
|
-
let result = this.builder.onImageEditClick(img);
|
|
46721
|
+
let result = this.builder.onImageEditClick(img, imagePreview);
|
|
46717
46722
|
if (!result) return;
|
|
46718
46723
|
}
|
|
46719
46724
|
|
|
46720
46725
|
util.showModal(modalImageEdit, true);
|
|
46721
|
-
let preview = modalImageEdit.querySelector('.imageedit-preview');
|
|
46722
46726
|
const maxW = 800;
|
|
46723
46727
|
const maxH = 550;
|
|
46724
46728
|
preview.style.height = '';
|
|
@@ -46734,11 +46738,14 @@ class Image {
|
|
|
46734
46738
|
} else {
|
|
46735
46739
|
preview.style.height = maxH + 'px';
|
|
46736
46740
|
}
|
|
46737
|
-
}
|
|
46741
|
+
} // imagePreview.src = img.src;
|
|
46738
46742
|
|
|
46739
|
-
|
|
46740
|
-
|
|
46741
|
-
|
|
46743
|
+
|
|
46744
|
+
if (img.src.indexOf('base64') === -1) {
|
|
46745
|
+
imagePreview.src = img.src + (img.src.indexOf('?') === -1 ? '?' : '&') + `timestamp=${new Date().getTime()}`;
|
|
46746
|
+
} else {
|
|
46747
|
+
imagePreview.src = img.src;
|
|
46748
|
+
}
|
|
46742
46749
|
|
|
46743
46750
|
if (this.builder.setCropperConfig) {
|
|
46744
46751
|
this.cropper = new Cropper(imagePreview, this.builder.setCropperConfig);
|
|
@@ -54624,7 +54631,7 @@ class ELementStyleEditor {
|
|
|
54624
54631
|
<div class="is-settings clearfix" style="display:inline-block;width:100%;margin-bottom:0;">
|
|
54625
54632
|
<div>${util.out('Class')}:</div>
|
|
54626
54633
|
<div>
|
|
54627
|
-
<input type="text" id="inpElmClassName" value="" style="width:100%;padding-left: 16px;font-family: courier;font-size: 14px;line-height: 2;letter-spacing: 1px;border:none;"/>
|
|
54634
|
+
<input type="text" id="inpElmClassName" value="" style="width:100%;padding-left: 16px;font-family: courier, monospace;font-size: 14px;line-height: 2;letter-spacing: 1px;border:none;"/>
|
|
54628
54635
|
</div>
|
|
54629
54636
|
</div>
|
|
54630
54637
|
</div>
|
|
@@ -61025,7 +61032,7 @@ class Rte {
|
|
|
61025
61032
|
<div title="${util.out('Heading 3')}" data-block="h3" role="button" tabindex="0"><h3>Heading 3</h3></div>
|
|
61026
61033
|
<div title="${util.out('Heading 4')}" data-block="h4" role="button" tabindex="0"><h4>Heading 4</h4></div>
|
|
61027
61034
|
<div title="${util.out('Paragraph')}" data-block="p" role="button" tabindex="0"><p>Paragraph</p></div>
|
|
61028
|
-
<div title="${util.out('Preformatted')}" data-block="pre" role="button" tabindex="0"><p style="font-family:courier;">Preformatted</p></div>
|
|
61035
|
+
<div title="${util.out('Preformatted')}" data-block="pre" role="button" tabindex="0"><p style="font-family:courier, monospace;">Preformatted</p></div>
|
|
61029
61036
|
</div>
|
|
61030
61037
|
</div>
|
|
61031
61038
|
|
|
@@ -66112,7 +66119,9 @@ class ContentBuilder {
|
|
|
66112
66119
|
const cropperConfig = {
|
|
66113
66120
|
checkCrossOrigin:false,
|
|
66114
66121
|
checkOrientation:false,
|
|
66115
|
-
crossOrigin:'anonymous'
|
|
66122
|
+
crossOrigin:'anonymous',
|
|
66123
|
+
zoomable: false,
|
|
66124
|
+
viewMode: 1
|
|
66116
66125
|
};
|
|
66117
66126
|
builder.setCropperConfig = cropperConfig;
|
|
66118
66127
|
return true;
|