@innovastudio/contentbuilder 1.5.76 → 1.5.79
Sign up to get free protection for your applications and to get access to all the features.
package/package.json
CHANGED
@@ -1494,10 +1494,10 @@ const renderQuickAdd = builder => {
|
|
1494
1494
|
elm = quickadd.querySelector('.add-video');
|
1495
1495
|
dom.addEventListener(elm, 'click', () => {
|
1496
1496
|
const mode = quickadd.getAttribute('data-mode');
|
1497
|
-
let html = `<video style="width: 100%;" loop="" autoplay="">
|
1497
|
+
let html = `<video style="width: 100%;" loop="" playsinline="" muted="" autoplay="">
|
1498
1498
|
<source src="${builder.opts.snippetPath}example.mp4" type="video/mp4"></video>`;
|
1499
1499
|
if (builder.opts.snippetSampleVideo) {
|
1500
|
-
html = `<video style="width: 100%;" loop="" autoplay="">
|
1500
|
+
html = `<video style="width: 100%;" loop="" playsinline="" muted="" autoplay="">
|
1501
1501
|
<source src="${builder.opts.snippetSampleVideo}" type="video/mp4"></video>`;
|
1502
1502
|
}
|
1503
1503
|
util.addContent(html, mode);
|
@@ -5334,15 +5334,15 @@ class Util {
|
|
5334
5334
|
} else {
|
5335
5335
|
newelement.click();
|
5336
5336
|
}
|
5337
|
-
const builderStuff = this.builder.builderStuff;
|
5338
|
-
let quickadd = builderStuff.querySelector('.quickadd');
|
5339
|
-
this.hidePop(quickadd);
|
5340
5337
|
|
5341
5338
|
// LATER: auto scroll
|
5342
5339
|
|
5343
5340
|
// LATER: If image, then it needs time to load (resulting incorrect position), so hide element tool.
|
5344
5341
|
}
|
5345
5342
|
|
5343
|
+
const builderStuff = this.builder.builderStuff;
|
5344
|
+
let quickadd = builderStuff.querySelector('.quickadd');
|
5345
|
+
if (quickadd) this.hidePop(quickadd);
|
5346
5346
|
if (this.builder.useCssClasses) {
|
5347
5347
|
let builderActive = this.builder.doc.querySelector('.builder-active');
|
5348
5348
|
if (builderActive) dom.contentReformat(builderActive, this.builder.cssClasses);
|
@@ -14177,6 +14177,13 @@ class HtmlUtil {
|
|
14177
14177
|
|
14178
14178
|
//Trigger Render event
|
14179
14179
|
this.builder.opts.onRender();
|
14180
|
+
|
14181
|
+
// Re-select
|
14182
|
+
if (row.firstChild) row.firstChild.click();
|
14183
|
+
//Change to row selection
|
14184
|
+
row.classList.remove('row-outline');
|
14185
|
+
//Hide Column tool (new!)
|
14186
|
+
util.hideColumnTool();
|
14180
14187
|
}
|
14181
14188
|
if (mode === 'full') {
|
14182
14189
|
// freeform
|
@@ -14630,6 +14637,16 @@ class HtmlUtil {
|
|
14630
14637
|
imgUrl = convertMediaUrl(imgUrl);
|
14631
14638
|
elm.setAttribute('href', `${imgUrl}`);
|
14632
14639
|
}
|
14640
|
+
if (elm.tagName.toLowerCase() === 'a') {
|
14641
|
+
//lightbox
|
14642
|
+
let s = elm.getAttribute('href');
|
14643
|
+
let extension = s.split('.').pop().split('?')[0].split('#')[0]; //
|
14644
|
+
extension = extension.toLowerCase();
|
14645
|
+
if (extension === 'jpg' || extension === 'jpeg' || extension === 'png' || extension === 'gif' || extension === 'webm' || extension === 'webp' || extension === 'mp4' || extension === 'mp3') {
|
14646
|
+
let mediaUrl = convertMediaUrl(s);
|
14647
|
+
elm.setAttribute('href', `${mediaUrl}`);
|
14648
|
+
}
|
14649
|
+
}
|
14633
14650
|
}
|
14634
14651
|
});
|
14635
14652
|
}
|
@@ -17869,6 +17886,7 @@ const renderSnippetPanel = (builder, snippetOpen) => {
|
|
17869
17886
|
block.offsetWidth / 2;
|
17870
17887
|
let x = (snippetX - block.offsetWidth / 2 - rectContainer.left) / docContainer.offsetWidth * 100;
|
17871
17888
|
let y = (snippetY - block.offsetHeight / 2 - rectContainer.top) / docContainer.offsetHeight * 100;
|
17889
|
+
if (y < 0) y = 15; // if block is not fully loaded, block height may be incorrect (y can be negative). Adjust to 15%.
|
17872
17890
|
block.style.top = y + '%';
|
17873
17891
|
block.style.left = x + '%';
|
17874
17892
|
block.removeAttribute('data-new-dummy');
|
@@ -46772,7 +46790,7 @@ class ButtonEditor {
|
|
46772
46790
|
<div class="flex flex-row" style="margin:15px 0 0">
|
46773
46791
|
<div class="flex flex-col" style="margin-right: 40px;">
|
46774
46792
|
<div>
|
46775
|
-
<span>${util.out('Border
|
46793
|
+
<span>${util.out('Border Style')}</span>:
|
46776
46794
|
</div>
|
46777
46795
|
<div class="flex flex-row flex-wrap" style="margin-top:5px">
|
46778
46796
|
<button title="${util.out('Transparent')}" data-command="transparent" class="border-color-command" style="margin-right:4px">${util.out('Transparent')}</button>
|
@@ -46962,7 +46980,7 @@ class ButtonEditor {
|
|
46962
46980
|
|
46963
46981
|
<div class="flex flex-col" style="margin:15px 0 0">
|
46964
46982
|
<div>
|
46965
|
-
<span>${util.out('Border
|
46983
|
+
<span>${util.out('Border Style')}</span>:
|
46966
46984
|
</div>
|
46967
46985
|
<div class="flex flex-row flex-wrap" style="margin-top:5px">
|
46968
46986
|
<button title="${util.out('Transparent')}" data-command="transparent" class="border-color-hover-command" style="margin-right:4px">${util.out('Transparent')}</button>
|
@@ -50558,6 +50576,12 @@ class Video {
|
|
50558
50576
|
} else {
|
50559
50577
|
inpAutoplay.checked = false;
|
50560
50578
|
}
|
50579
|
+
const inpMuted = videoModal.querySelector('.input-video-muted');
|
50580
|
+
if (video.hasAttribute('muted')) {
|
50581
|
+
inpMuted.checked = true;
|
50582
|
+
} else {
|
50583
|
+
inpMuted.checked = false;
|
50584
|
+
}
|
50561
50585
|
util.showModal(videoModal, true, () => {
|
50562
50586
|
btn.removeAttribute('data-focus');
|
50563
50587
|
btn.focus();
|
@@ -50601,6 +50625,9 @@ class Video {
|
|
50601
50625
|
<label style="display:block;margin-top:5px;">
|
50602
50626
|
<input class="input-video-autoplay" id="__input_video_autoplay" type="checkbox" /> ${util.out('Autoplay')}
|
50603
50627
|
</label>
|
50628
|
+
<label style="display:block;margin-top:5px;">
|
50629
|
+
<input class="input-video-muted" id="__input_video_muted" type="checkbox" /> ${util.out('Muted')}
|
50630
|
+
</label>
|
50604
50631
|
|
50605
50632
|
<div style="text-align:right;margin-top:14px;">
|
50606
50633
|
<button title="${util.out('Cancel')}" class="input-cancel classic-secondary">${util.out('Cancel')}</button>
|
@@ -50679,6 +50706,11 @@ class Video {
|
|
50679
50706
|
} else {
|
50680
50707
|
video.removeAttribute('autoplay');
|
50681
50708
|
}
|
50709
|
+
if (videoModal.querySelector('.input-video-muted').checked) {
|
50710
|
+
video.setAttribute('muted', '');
|
50711
|
+
} else {
|
50712
|
+
video.removeAttribute('muted');
|
50713
|
+
}
|
50682
50714
|
if (videoModal.querySelector('.input-url').value !== '') {
|
50683
50715
|
let url = videoModal.querySelector('.input-url').value;
|
50684
50716
|
let source = video.querySelector('source');
|
@@ -68321,15 +68353,15 @@ class Rte {
|
|
68321
68353
|
activeCol = this.builder.activeCol;
|
68322
68354
|
spans = activeCol.querySelectorAll('span');
|
68323
68355
|
Array.prototype.forEach.call(spans, span => {
|
68324
|
-
let attr = span.
|
68356
|
+
let attr = span.hasAttribute('data-keep');
|
68325
68357
|
if (!attr) {
|
68326
68358
|
span.outerHTML = span.innerHTML;
|
68327
68359
|
}
|
68328
68360
|
});
|
68329
68361
|
Array.prototype.forEach.call(spans, span => {
|
68330
|
-
let attr = span.
|
68362
|
+
let attr = span.hasAttribute('data-keep');
|
68331
68363
|
if (attr) {
|
68332
|
-
|
68364
|
+
span.removeAttribute('data-keep');
|
68333
68365
|
}
|
68334
68366
|
});
|
68335
68367
|
this.getState();
|
@@ -97239,18 +97271,21 @@ Add an image for each feature.`, 'Create a new content showcasing a photo galler
|
|
97239
97271
|
}
|
97240
97272
|
|
97241
97273
|
if (this.dom.textSelection()) {
|
97242
|
-
if (e.keyCode ===
|
97274
|
+
if (e.keyCode === 38) {
|
97243
97275
|
// Up arrow
|
97244
97276
|
this.util.saveSelection();
|
97245
|
-
} else if (e.keyCode ===
|
97277
|
+
} else if (e.keyCode === 40) {
|
97246
97278
|
// Down arrow
|
97247
97279
|
this.util.saveSelection();
|
97248
|
-
} else if (e.keyCode ===
|
97280
|
+
} else if (e.keyCode === 37) {
|
97249
97281
|
// Left arrow
|
97250
97282
|
this.util.saveSelection();
|
97251
|
-
} else if (e.keyCode ===
|
97283
|
+
} else if (e.keyCode === 39) {
|
97252
97284
|
// Right arrow
|
97253
97285
|
this.util.saveSelection();
|
97286
|
+
} else if (e.keyCode === 13) {
|
97287
|
+
// Enter
|
97288
|
+
this.util.saveSelection();
|
97254
97289
|
}
|
97255
97290
|
}
|
97256
97291
|
|