@innovastudio/contentbuilder 1.0.56 → 1.0.60
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 +1 -1
- package/public/contentbuilder/contentbuilder.css +8 -4
- package/public/contentbuilder/contentbuilder.esm.js +59 -19
- package/public/contentbuilder/contentbuilder.min.js +1 -1
- package/public/contentbuilder/themes/colored-blue.css +1 -1
- package/public/contentbuilder/themes/colored-blue2.css +1 -1
- package/public/contentbuilder/themes/colored-blue3.css +1 -1
- package/public/contentbuilder/themes/colored-blue4.css +1 -1
- package/public/contentbuilder/themes/colored-blue5.css +1 -1
- package/public/contentbuilder/themes/colored-blue6.css +1 -1
- package/public/contentbuilder/themes/colored-blue7.css +1 -1
- package/public/contentbuilder/themes/colored-blue8.css +1 -1
- package/public/contentbuilder/themes/colored-dark.css +1 -1
- package/public/contentbuilder/themes/colored-darkblue.css +1 -1
- package/public/contentbuilder/themes/colored-gray.css +1 -1
- package/public/contentbuilder/themes/colored-green.css +1 -1
- package/public/contentbuilder/themes/colored-green2.css +1 -1
- package/public/contentbuilder/themes/colored-green3.css +1 -1
- package/public/contentbuilder/themes/colored-green4.css +1 -1
- package/public/contentbuilder/themes/colored-green5.css +1 -1
- package/public/contentbuilder/themes/colored-magenta.css +1 -1
- package/public/contentbuilder/themes/colored-orange.css +1 -1
- package/public/contentbuilder/themes/colored-orange2.css +1 -1
- package/public/contentbuilder/themes/colored-orange3.css +1 -1
- package/public/contentbuilder/themes/colored-pink.css +1 -1
- package/public/contentbuilder/themes/colored-pink2.css +1 -1
- package/public/contentbuilder/themes/colored-pink3.css +1 -1
- package/public/contentbuilder/themes/colored-pink4.css +1 -1
- package/public/contentbuilder/themes/colored-purple.css +1 -1
- package/public/contentbuilder/themes/colored-purple2.css +1 -1
- package/public/contentbuilder/themes/colored-red.css +1 -1
- package/public/contentbuilder/themes/colored-red2.css +1 -1
- package/public/contentbuilder/themes/colored-red3.css +1 -1
- package/public/contentbuilder/themes/colored-red4.css +1 -1
- package/public/contentbuilder/themes/colored-red5.css +1 -1
- package/public/contentbuilder/themes/colored-yellow.css +1 -1
- package/public/contentbuilder/themes/colored-yellow2.css +1 -1
- package/public/contentbuilder/themes/dark-blue.css +1 -1
- package/public/contentbuilder/themes/dark-blue2.css +1 -1
- package/public/contentbuilder/themes/dark-blue3.css +1 -1
- package/public/contentbuilder/themes/dark-gray.css +1 -1
- package/public/contentbuilder/themes/dark-pink.css +1 -1
- package/public/contentbuilder/themes/dark-purple.css +1 -1
- package/public/contentbuilder/themes/dark-red.css +1 -1
- package/public/contentbuilder/themes/dark.css +1 -1
- package/public/contentbuilder/themes/light-blue.css +1 -1
- package/public/contentbuilder/themes/light-blue2.css +1 -1
- package/public/contentbuilder/themes/light-blue3.css +1 -1
- package/public/contentbuilder/themes/light-cyan.css +1 -1
- package/public/contentbuilder/themes/light-gray.css +1 -1
- package/public/contentbuilder/themes/light-gray2.css +1 -1
- package/public/contentbuilder/themes/light-gray3.css +1 -1
- package/public/contentbuilder/themes/light-green.css +1 -1
- package/public/contentbuilder/themes/light-pink.css +1 -1
- package/public/contentbuilder/themes/light-pink2.css +1 -1
- package/public/contentbuilder/themes/light-purple.css +1 -1
- package/public/contentbuilder/themes/light-purple2.css +1 -1
- package/public/contentbuilder/themes/light-red.css +1 -1
- package/public/contentbuilder/themes/light-yellow.css +1 -1
- package/public/contentbuilder/themes/light-yellow2.css +1 -1
package/package.json
CHANGED
|
@@ -3681,13 +3681,15 @@ button:focus {
|
|
|
3681
3681
|
fill: #fff;
|
|
3682
3682
|
}
|
|
3683
3683
|
.is-tool.is-row-tool .row-handle {
|
|
3684
|
-
|
|
3684
|
+
display: flex;
|
|
3685
|
+
height: 25px;
|
|
3686
|
+
justify-content: center;
|
|
3687
|
+
align-items: center;
|
|
3685
3688
|
background: #169af7;
|
|
3686
3689
|
}
|
|
3687
3690
|
.is-tool.is-row-tool .row-handle svg {
|
|
3688
3691
|
width: 13px;
|
|
3689
3692
|
height: 13px;
|
|
3690
|
-
margin-top: -2px;
|
|
3691
3693
|
}
|
|
3692
3694
|
.is-tool.is-row-tool .row-grideditor {
|
|
3693
3695
|
background: rgba(216, 200, 6, 0.9);
|
|
@@ -3723,13 +3725,15 @@ button:focus {
|
|
|
3723
3725
|
fill: #000;
|
|
3724
3726
|
}
|
|
3725
3727
|
.is-builder[gray] .is-tool.is-row-tool .row-handle {
|
|
3726
|
-
|
|
3728
|
+
display: flex;
|
|
3729
|
+
height: 27px;
|
|
3730
|
+
justify-content: center;
|
|
3731
|
+
align-items: center;
|
|
3727
3732
|
background: transparent;
|
|
3728
3733
|
}
|
|
3729
3734
|
.is-builder[gray] .is-tool.is-row-tool .row-handle svg {
|
|
3730
3735
|
width: 11px;
|
|
3731
3736
|
height: 11px;
|
|
3732
|
-
margin-top: -3px;
|
|
3733
3737
|
}
|
|
3734
3738
|
.is-builder[gray] .is-tool.is-row-tool .row-grideditor {
|
|
3735
3739
|
background: transparent;
|
|
@@ -41426,6 +41426,8 @@ class Module {
|
|
|
41426
41426
|
var index = 1;
|
|
41427
41427
|
const builders = module.querySelectorAll('[data-subblock]');
|
|
41428
41428
|
Array.prototype.forEach.call(builders, builder => {
|
|
41429
|
+
// Glide Slider Support
|
|
41430
|
+
if (dom$t.hasClass(builder.parentNode, 'glide__slide--clone')) return;
|
|
41429
41431
|
let builderhtml = builder.innerHTML;
|
|
41430
41432
|
module.setAttribute('data-html-' + index, encodeURIComponent(builderhtml));
|
|
41431
41433
|
index++;
|
|
@@ -52293,12 +52295,6 @@ class Preferences {
|
|
|
52293
52295
|
|
|
52294
52296
|
}
|
|
52295
52297
|
|
|
52296
|
-
/*
|
|
52297
|
-
LATER:
|
|
52298
|
-
- Get/show current font size, line height & letter spacing
|
|
52299
|
-
- Click toggle button shows gray highlight
|
|
52300
|
-
- Image di luar domain gak bisa di-edit (kasih warning)
|
|
52301
|
-
*/
|
|
52302
52298
|
const dom$5 = new Dom();
|
|
52303
52299
|
|
|
52304
52300
|
class Rte {
|
|
@@ -52511,18 +52507,18 @@ class Rte {
|
|
|
52511
52507
|
<button title="18px" data-value="18">18</button>
|
|
52512
52508
|
<button title="21px" data-value="21">21</button>
|
|
52513
52509
|
<button title="24px" data-value="24">24</button>
|
|
52514
|
-
|
|
52510
|
+
<!--<button title="28px" data-value="28">28</button>-->
|
|
52515
52511
|
<button title="32px" data-value="32">32</button>
|
|
52516
|
-
<!--<button title="
|
|
52517
|
-
<button title="38px" data-value="38">38</button>
|
|
52518
|
-
<!--<button title="42px" data-value="42">42</button>-->
|
|
52512
|
+
<!--<button title="38px" data-value="38">38</button>-->
|
|
52519
52513
|
<button title="48px" data-value="48">48</button>
|
|
52520
|
-
<!--<button title="
|
|
52521
|
-
<button title="60px" data-value="60">60</button>
|
|
52522
|
-
<!--<button title="68px" data-value="68">68</button>-->
|
|
52514
|
+
<!--<button title="60px" data-value="60">60</button>-->
|
|
52523
52515
|
<button title="76px" data-value="76">76</button>
|
|
52524
|
-
<!--<button title="84px" data-value="84">84</button>-->
|
|
52525
52516
|
<button title="96px" data-value="96">96</button>
|
|
52517
|
+
|
|
52518
|
+
<button title="120px" data-value="120">120</button>
|
|
52519
|
+
<button title="160px" data-value="160">160</button>
|
|
52520
|
+
<button title="200px" data-value="200">200</button>
|
|
52521
|
+
|
|
52526
52522
|
<button title="${util.out('Decrease')}" data-value="-" style="font-size:13px">-</button>
|
|
52527
52523
|
<button title="${util.out('Increase')}" data-value="+" style="font-size:13px">+</button>
|
|
52528
52524
|
<button title="${util.out('Clear')}" data-value=""><svg class="is-icon-flex" style="width:18px;height:18px;margin-top: 2px;"><use xlink:href="#ion-ios-close-empty"></use></svg></button>
|
|
@@ -54160,17 +54156,58 @@ class Rte {
|
|
|
54160
54156
|
|
|
54161
54157
|
if (this.builder.activeIcon) {
|
|
54162
54158
|
elm = this.builder.activeIcon;
|
|
54159
|
+
} // Find block element (line-height only works on block element)
|
|
54160
|
+
|
|
54161
|
+
|
|
54162
|
+
let element = elm;
|
|
54163
|
+
|
|
54164
|
+
while (element) {
|
|
54165
|
+
if (element.tagName === 'BODY' || element.tagName === 'HTML') return false;
|
|
54166
|
+
|
|
54167
|
+
if (window.getComputedStyle(element).getPropertyValue('display') !== 'inline') {
|
|
54168
|
+
elm = element;
|
|
54169
|
+
break;
|
|
54170
|
+
}
|
|
54171
|
+
|
|
54172
|
+
element = element.parentNode;
|
|
54163
54173
|
} // var text = dom.getSelected();
|
|
54164
54174
|
|
|
54165
54175
|
|
|
54166
|
-
this.builder.uo.saveForUndo();
|
|
54167
|
-
|
|
54176
|
+
this.builder.uo.saveForUndo(); // let currentLineHeight = Number(window.getComputedStyle(elm).getPropertyValue('line-height').match(/\d+/)[0]);
|
|
54177
|
+
|
|
54178
|
+
let isInPx = false;
|
|
54179
|
+
let currentLineHeight = elm.style.lineHeight;
|
|
54180
|
+
|
|
54181
|
+
if (currentLineHeight) {
|
|
54182
|
+
if (currentLineHeight.indexOf('px') === -1) {
|
|
54183
|
+
currentLineHeight = parseFloat(currentLineHeight);
|
|
54184
|
+
} else {
|
|
54185
|
+
isInPx = true;
|
|
54186
|
+
}
|
|
54187
|
+
} else {
|
|
54188
|
+
isInPx = true;
|
|
54189
|
+
}
|
|
54190
|
+
|
|
54191
|
+
if (isInPx) {
|
|
54192
|
+
let fontSize = Number(window.getComputedStyle(elm).getPropertyValue('font-size').match(/\d+/)[0]);
|
|
54193
|
+
currentLineHeight = Number(window.getComputedStyle(elm).getPropertyValue('line-height').match(/\d+/)[0]);
|
|
54194
|
+
|
|
54195
|
+
if (fontSize > currentLineHeight) {
|
|
54196
|
+
currentLineHeight = fontSize / currentLineHeight;
|
|
54197
|
+
} else if (fontSize < currentLineHeight) {
|
|
54198
|
+
currentLineHeight = currentLineHeight / fontSize;
|
|
54199
|
+
} else {
|
|
54200
|
+
currentLineHeight = 1;
|
|
54201
|
+
}
|
|
54202
|
+
}
|
|
54203
|
+
|
|
54168
54204
|
let lineheight;
|
|
54169
54205
|
|
|
54170
54206
|
if (num === '+') {
|
|
54171
|
-
lineheight = currentLineHeight + 1
|
|
54207
|
+
lineheight = currentLineHeight + 0.1;
|
|
54172
54208
|
} else if (num === '-') {
|
|
54173
|
-
lineheight = currentLineHeight - 1
|
|
54209
|
+
lineheight = currentLineHeight - 0.1;
|
|
54210
|
+
if (lineheight < 0.2) lineheight = 0.2; // prevent very small number
|
|
54174
54211
|
} else if (num === '') {
|
|
54175
54212
|
lineheight = '';
|
|
54176
54213
|
} else {
|
|
@@ -54181,7 +54218,10 @@ class Rte {
|
|
|
54181
54218
|
|
|
54182
54219
|
|
|
54183
54220
|
dom$5.doFunction(elm, function (theEl) {
|
|
54184
|
-
|
|
54221
|
+
// apply to block element only
|
|
54222
|
+
if (window.getComputedStyle(theEl).getPropertyValue('display') !== 'inline') {
|
|
54223
|
+
theEl.style.lineHeight = lineheight;
|
|
54224
|
+
}
|
|
54185
54225
|
}, true); //save selection
|
|
54186
54226
|
|
|
54187
54227
|
util.saveSelection();
|