@innovastudio/contentbuilder 1.1.16 → 1.1.19
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,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@innovastudio/contentbuilder",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.19",
|
|
4
|
+
"type":"module",
|
|
4
5
|
"description": "",
|
|
5
6
|
"main": "public/contentbuilder/contentbuilder.esm.js",
|
|
6
7
|
"files": [
|
|
@@ -38,20 +39,21 @@
|
|
|
38
39
|
"style-loader": "^3.3.0",
|
|
39
40
|
"webpack": "^5.53.0",
|
|
40
41
|
"webpack-cli": "^4.8.0",
|
|
41
|
-
"webpack-dev-server": "^4.2.1"
|
|
42
|
+
"webpack-dev-server": "^4.2.1",
|
|
43
|
+
|
|
44
|
+
"express": "^4.17.1",
|
|
45
|
+
"express-session": "^1.17.2",
|
|
46
|
+
"formidable-serverless": "^1.1.1",
|
|
47
|
+
"cors": "^2.8.5",
|
|
48
|
+
"serve-static": "^1.14.1",
|
|
49
|
+
"sharp": "^0.30.3"
|
|
42
50
|
},
|
|
43
51
|
"dependencies": {
|
|
44
52
|
"blueimp-load-image": "^5.16.0",
|
|
45
|
-
"cors": "^2.8.5",
|
|
46
53
|
"cropperjs": "^1.5.12",
|
|
47
|
-
"express": "^4.17.1",
|
|
48
|
-
"express-session": "^1.17.2",
|
|
49
|
-
"formidable-serverless": "^1.1.1",
|
|
50
54
|
"js-beautify": "^1.14.0",
|
|
51
55
|
"moveable": "^0.26.0",
|
|
52
56
|
"rangy": "^1.3.0",
|
|
53
|
-
"serve-static": "^1.14.1",
|
|
54
|
-
"sharp": "^0.30.3",
|
|
55
57
|
"sortablejs": "^1.14.0"
|
|
56
58
|
}
|
|
57
59
|
}
|
|
@@ -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>
|
|
@@ -56641,6 +56648,8 @@ class ElementTextStyles {
|
|
|
56641
56648
|
<option value="em">em</option>
|
|
56642
56649
|
<option value="vw">vw</option>
|
|
56643
56650
|
<option value="vh">vh</option>
|
|
56651
|
+
<option value="vmin">vmin</option>
|
|
56652
|
+
<option value="vmax">vmax</option>
|
|
56644
56653
|
<option value="%">%</option>
|
|
56645
56654
|
</select>
|
|
56646
56655
|
</div>
|
|
@@ -57065,6 +57074,14 @@ class ElementTextStyles {
|
|
|
57065
57074
|
sFontSizeUnit = 'vh';
|
|
57066
57075
|
}
|
|
57067
57076
|
|
|
57077
|
+
if (s.indexOf('vmin') !== -1) {
|
|
57078
|
+
sFontSizeUnit = 'vmin';
|
|
57079
|
+
}
|
|
57080
|
+
|
|
57081
|
+
if (s.indexOf('vmax') !== -1) {
|
|
57082
|
+
sFontSizeUnit = 'vmax';
|
|
57083
|
+
}
|
|
57084
|
+
|
|
57068
57085
|
if (s.indexOf('%') !== -1) {
|
|
57069
57086
|
sFontSizeUnit = '%';
|
|
57070
57087
|
}
|
|
@@ -61015,7 +61032,7 @@ class Rte {
|
|
|
61015
61032
|
<div title="${util.out('Heading 3')}" data-block="h3" role="button" tabindex="0"><h3>Heading 3</h3></div>
|
|
61016
61033
|
<div title="${util.out('Heading 4')}" data-block="h4" role="button" tabindex="0"><h4>Heading 4</h4></div>
|
|
61017
61034
|
<div title="${util.out('Paragraph')}" data-block="p" role="button" tabindex="0"><p>Paragraph</p></div>
|
|
61018
|
-
<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>
|
|
61019
61036
|
</div>
|
|
61020
61037
|
</div>
|
|
61021
61038
|
|
|
@@ -66102,7 +66119,9 @@ class ContentBuilder {
|
|
|
66102
66119
|
const cropperConfig = {
|
|
66103
66120
|
checkCrossOrigin:false,
|
|
66104
66121
|
checkOrientation:false,
|
|
66105
|
-
crossOrigin:'anonymous'
|
|
66122
|
+
crossOrigin:'anonymous',
|
|
66123
|
+
zoomable: false,
|
|
66124
|
+
viewMode: 1
|
|
66106
66125
|
};
|
|
66107
66126
|
builder.setCropperConfig = cropperConfig;
|
|
66108
66127
|
return true;
|
|
@@ -66849,12 +66868,8 @@ class ContentBuilder {
|
|
|
66849
66868
|
imageResizer.style.left = '-10px';
|
|
66850
66869
|
imageResizer.style.width = '1px';
|
|
66851
66870
|
imageResizer.style.height = '1px';
|
|
66852
|
-
|
|
66853
|
-
|
|
66854
|
-
this.moveable.updateRect();
|
|
66855
|
-
document.querySelector('.moveable-control-box').style.display = 'none';
|
|
66856
|
-
} catch (e) {// Do Nothing
|
|
66857
|
-
}
|
|
66871
|
+
this.moveable.updateRect();
|
|
66872
|
+
document.querySelector('.moveable-control-box').style.display = 'none';
|
|
66858
66873
|
}
|
|
66859
66874
|
|
|
66860
66875
|
if (!(a || b || c || d || f || g || h || i || j || o || isSpecialElement) || rowClicked && !i || containerClicked) {
|