@innovastudio/contentbuilder 1.5.112 → 1.5.114
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
@@ -10,7 +10,7 @@ class Snippets {
|
|
10
10
|
const snippetPath = this.builder.opts.snippetPath;
|
11
11
|
let snippetCategoriesString = '[';
|
12
12
|
for (let i = 0; i < this.builder.opts.snippetCategories.length; i++) {
|
13
|
-
snippetCategoriesString += `[${this.builder.opts.snippetCategories[i][0]},'${util.out(this.builder.opts.snippetCategories[i][1])}'],`;
|
13
|
+
snippetCategoriesString += `[${this.builder.opts.snippetCategories[i][0]},'${util.out(this.builder.opts.snippetCategories[i][1]).replaceAll('\'', '\\\'')}'],`;
|
14
14
|
}
|
15
15
|
snippetCategoriesString += ']';
|
16
16
|
const defaultSnippetCategory = this.builder.opts.defaultSnippetCategory;
|
@@ -1333,7 +1333,7 @@ const renderQuickAdd = builder => {
|
|
1333
1333
|
dom.addEventListener(elm, 'click', () => {
|
1334
1334
|
const mode = quickadd.getAttribute('data-mode');
|
1335
1335
|
let html = `<div>
|
1336
|
-
<a href="#" role="button" class="transition-all inline-block whitespace-nowrap cursor-pointer no-underline border-2 border-solid mr-2 mt-2 mb-1 py-2 size-
|
1336
|
+
<a href="#" role="button" class="transition-all inline-block whitespace-nowrap cursor-pointer no-underline border-2 border-solid mr-2 mt-2 mb-1 py-2 size-18 px-6 text-black leading-14 rounded border-transparent hover:border-transparent font-normal tracking-wide" style="color: rgb(0, 0, 0);background-color: rgb(240, 240, 240);">Read More</a>
|
1337
1337
|
</div>`;
|
1338
1338
|
if (builder.opts.emailMode) {
|
1339
1339
|
html = '<div><a href="#" role="button" style="margin-top: ;margin-right: ;margin-bottom: ;margin-left: ;display: inline-block; text-decoration: none; transition: all 0.16s ease 0s; border-style: solid; cursor: pointer; background-color: rgb(220, 220, 220); color: rgb(0, 0, 0); border-color: rgb(220, 220, 220); border-width: 2px; border-radius: 0px; padding: 13px 28px; line-height: 21px; text-transform: uppercase; font-weight: 400; font-size: 14px; letter-spacing: 3px;">Read More</a></div>';
|
@@ -1344,8 +1344,8 @@ const renderQuickAdd = builder => {
|
|
1344
1344
|
dom.addEventListener(elm, 'click', () => {
|
1345
1345
|
const mode = quickadd.getAttribute('data-mode');
|
1346
1346
|
let html = `<div>
|
1347
|
-
<a href="#" role="button" class="transition-all inline-block whitespace-nowrap cursor-pointer no-underline border-2 border-solid mr-2 mt-2 mb-1 py-2 size-
|
1348
|
-
<a href="#" role="button" class="transition-all inline-block whitespace-nowrap cursor-pointer no-underline border-2 border-solid mr-2 mt-2 mb-1 py-2 size-
|
1347
|
+
<a href="#" role="button" class="transition-all inline-block whitespace-nowrap cursor-pointer no-underline border-2 border-solid mr-2 mt-2 mb-1 py-2 size-18 px-6 text-black leading-14 rounded border-transparent hover:border-transparent font-normal tracking-wide" style="color: rgb(0, 0, 0);background-color: rgb(240, 240, 240);">Read More</a>
|
1348
|
+
<a href="#" role="button" class="transition-all inline-block whitespace-nowrap cursor-pointer no-underline border-2 border-solid mr-2 mt-2 mb-1 py-2 size-18 px-6 border-current hover:border-current font-normal leading-14 rounded tracking-wide">Get Started</a>
|
1349
1349
|
</div>`;
|
1350
1350
|
if (builder.opts.emailMode) {
|
1351
1351
|
html = `<div>
|
@@ -1418,8 +1418,8 @@ const renderQuickAdd = builder => {
|
|
1418
1418
|
let html = builder.opts.formTemplate.trim() || `
|
1419
1419
|
<div class="row">
|
1420
1420
|
<div class="column" data-noedit
|
1421
|
-
data-dialog-width="
|
1422
|
-
data-dialog-height="
|
1421
|
+
data-dialog-width="1800px"
|
1422
|
+
data-dialog-height="93vh"
|
1423
1423
|
data-module="form-builder"
|
1424
1424
|
data-module-desc="Form Builder"
|
1425
1425
|
data-html="
|
@@ -17890,7 +17890,7 @@ const renderSnippetPanel = (builder, snippetOpen) => {
|
|
17890
17890
|
builder.opts.snippetCategories.forEach(item => {
|
17891
17891
|
const jsonItem = {};
|
17892
17892
|
jsonItem.value = item[0];
|
17893
|
-
jsonItem.label = item[1];
|
17893
|
+
jsonItem.label = util.out(item[1]);
|
17894
17894
|
snippetList.push(jsonItem);
|
17895
17895
|
});
|
17896
17896
|
const inpSnippet = new CustomSelect('.inp-snippets', {
|
@@ -48601,86 +48601,86 @@ class ButtonEditor {
|
|
48601
48601
|
|
48602
48602
|
{
|
48603
48603
|
html: `
|
48604
|
-
<a href="#" role="button" class="transition-all inline-block whitespace-nowrap cursor-pointer no-underline border-2 border-solid mr-2 mt-2 mb-1 py-2 size-
|
48604
|
+
<a href="#" role="button" class="transition-all inline-block whitespace-nowrap cursor-pointer no-underline border-2 border-solid mr-2 mt-2 mb-1 py-2 size-18 px-7 border-current hover:border-current font-normal leading-14 rounded-full tracking-wide">Read More</a>
|
48605
48605
|
`
|
48606
48606
|
}, {
|
48607
48607
|
html: `
|
48608
|
-
<a href="#" role="button" class="transition-all inline-block whitespace-nowrap cursor-pointer no-underline border-2 border-solid mr-2 mt-2 mb-1 py-2 size-
|
48608
|
+
<a href="#" role="button" class="transition-all inline-block whitespace-nowrap cursor-pointer no-underline border-2 border-solid mr-2 mt-2 mb-1 py-2 size-18 px-7 text-black leading-14 rounded-full border-transparent hover:border-transparent font-normal tracking-wide" style="color: rgb(0, 0, 0); background-color: rgb(240, 240, 240);">Get Started</a>
|
48609
48609
|
`
|
48610
48610
|
}, {
|
48611
48611
|
html: `
|
48612
|
-
<a href="#" role="button" class="transition-all inline-block whitespace-nowrap cursor-pointer no-underline border-2 border-solid mr-2 mt-2 mb-1 py-2 px-7 font-normal leading-14 border-transparent rounded-full size-
|
48612
|
+
<a href="#" role="button" class="transition-all inline-block whitespace-nowrap cursor-pointer no-underline border-2 border-solid mr-2 mt-2 mb-1 py-2 px-7 font-normal leading-14 border-transparent rounded-full size-18 tracking-wide hover:border-transparent" style="color: rgb(255, 255, 255); background-color: rgb(255, 127, 0);">Get Started</a>
|
48613
48613
|
`
|
48614
48614
|
}, {
|
48615
48615
|
html: `
|
48616
|
-
<a href="#" role="button" class="transition-all inline-block whitespace-nowrap cursor-pointer no-underline border-2 border-solid mr-2 mt-2 mb-1 py-2 px-7 font-normal leading-14 border-transparent rounded-full size-
|
48616
|
+
<a href="#" role="button" class="transition-all inline-block whitespace-nowrap cursor-pointer no-underline border-2 border-solid mr-2 mt-2 mb-1 py-2 px-7 font-normal leading-14 border-transparent rounded-full size-18 tracking-wide hover:border-transparent" style="color: rgb(255, 255, 255); background-color: rgb(83,98,208);">Get Started</a>
|
48617
48617
|
`
|
48618
48618
|
}, {
|
48619
48619
|
html: `
|
48620
|
-
<a href="#" role="button" class="transition-all inline-block whitespace-nowrap cursor-pointer no-underline border-2 border-solid mr-2 mt-2 mb-1 py-2 px-7 font-normal leading-14 border-transparent rounded-full size-
|
48620
|
+
<a href="#" role="button" class="transition-all inline-block whitespace-nowrap cursor-pointer no-underline border-2 border-solid mr-2 mt-2 mb-1 py-2 px-7 font-normal leading-14 border-transparent rounded-full size-18 tracking-wide hover:border-transparent" style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">Get Started</a>
|
48621
48621
|
`
|
48622
48622
|
}, {
|
48623
48623
|
html: `
|
48624
|
-
<a href="#" role="button" class="transition-all inline-block whitespace-nowrap cursor-pointer no-underline border-2 border-solid mr-2 mt-2 mb-1 py-2 size-
|
48624
|
+
<a href="#" role="button" class="transition-all inline-block whitespace-nowrap cursor-pointer no-underline border-2 border-solid mr-2 mt-2 mb-1 py-2 size-18 px-7 border-current hover:border-current font-normal leading-14 tracking-wide rounded-full" style="color: rgb(255, 255, 255);">Get Started</a>
|
48625
48625
|
`
|
48626
48626
|
}, /* colors */
|
48627
48627
|
{
|
48628
48628
|
html: `
|
48629
|
-
<a href="#" role="button" class="transition-all inline-block whitespace-nowrap cursor-pointer no-underline border-2 border-solid mr-2 mt-2 mb-1 py-2 px-7 font-normal leading-14 border-transparent rounded-full size-
|
48629
|
+
<a href="#" role="button" class="transition-all inline-block whitespace-nowrap cursor-pointer no-underline border-2 border-solid mr-2 mt-2 mb-1 py-2 px-7 font-normal leading-14 border-transparent rounded-full size-18 tracking-wide hover:border-transparent" style="color: rgb(255, 255, 255); background-color: rgb(0, 200, 218);">Get Started</a>
|
48630
48630
|
`
|
48631
48631
|
}, {
|
48632
48632
|
html: `
|
48633
|
-
<a href="#" role="button" class="transition-all inline-block whitespace-nowrap cursor-pointer no-underline border-2 border-solid mr-2 mt-2 mb-1 py-2 px-7 font-normal leading-14 border-transparent rounded-full size-
|
48633
|
+
<a href="#" role="button" class="transition-all inline-block whitespace-nowrap cursor-pointer no-underline border-2 border-solid mr-2 mt-2 mb-1 py-2 px-7 font-normal leading-14 border-transparent rounded-full size-18 tracking-wide hover:border-transparent" style="color: rgb(255, 255, 255); background-color: rgb(55, 148, 59);">Get Started</a>
|
48634
48634
|
`
|
48635
48635
|
}, {
|
48636
48636
|
html: `
|
48637
|
-
<a href="#" role="button" class="transition-all inline-block whitespace-nowrap cursor-pointer no-underline border-2 border-solid mr-2 mt-2 mb-1 py-2 px-7 font-normal leading-14 border-transparent rounded-full size-
|
48637
|
+
<a href="#" role="button" class="transition-all inline-block whitespace-nowrap cursor-pointer no-underline border-2 border-solid mr-2 mt-2 mb-1 py-2 px-7 font-normal leading-14 border-transparent rounded-full size-18 tracking-wide hover:border-transparent" style="color: rgb(255, 255, 255); background-color: rgb(233,2,0);">Get Started</a>
|
48638
48638
|
`
|
48639
48639
|
}, {
|
48640
48640
|
html: `
|
48641
|
-
<a href="#" role="button" class="transition-all inline-block whitespace-nowrap cursor-pointer no-underline border-2 border-solid mr-2 mt-2 mb-1 py-2 px-7 font-normal leading-14 border-transparent rounded-full size-
|
48641
|
+
<a href="#" role="button" class="transition-all inline-block whitespace-nowrap cursor-pointer no-underline border-2 border-solid mr-2 mt-2 mb-1 py-2 px-7 font-normal leading-14 border-transparent rounded-full size-18 tracking-wide hover:border-transparent" style="color: rgb(0, 0, 0); background-color: rgb(254, 222, 76);">Get Started</a>
|
48642
48642
|
`
|
48643
48643
|
}, /* square */
|
48644
48644
|
{
|
48645
48645
|
html: `
|
48646
|
-
<a href="#" role="button" class="transition-all inline-block whitespace-nowrap cursor-pointer no-underline border-2 border-solid mr-2 mt-2 mb-1 py-2 size-
|
48646
|
+
<a href="#" role="button" class="transition-all inline-block whitespace-nowrap cursor-pointer no-underline border-2 border-solid mr-2 mt-2 mb-1 py-2 size-18 px-6 border-current hover:border-current font-normal leading-14 rounded tracking-wide">Read More</a>
|
48647
48647
|
`
|
48648
48648
|
}, {
|
48649
48649
|
html: `
|
48650
|
-
<a href="#" role="button" class="transition-all inline-block whitespace-nowrap cursor-pointer no-underline border-2 border-solid mr-2 mt-2 mb-1 py-2 size-
|
48650
|
+
<a href="#" role="button" class="transition-all inline-block whitespace-nowrap cursor-pointer no-underline border-2 border-solid mr-2 mt-2 mb-1 py-2 size-18 px-6 text-black leading-14 rounded border-transparent hover:border-transparent font-normal tracking-wide" style="color: rgb(0, 0, 0); background-color: rgb(240, 240, 240);">Get Started</a>
|
48651
48651
|
`
|
48652
48652
|
}, {
|
48653
48653
|
html: `
|
48654
|
-
<a href="#" role="button" class="transition-all inline-block whitespace-nowrap cursor-pointer no-underline border-2 border-solid mr-2 mt-2 mb-1 py-2 px-6 font-normal leading-14 border-transparent rounded size-
|
48654
|
+
<a href="#" role="button" class="transition-all inline-block whitespace-nowrap cursor-pointer no-underline border-2 border-solid mr-2 mt-2 mb-1 py-2 px-6 font-normal leading-14 border-transparent rounded size-18 tracking-wide hover:border-transparent" style="color: rgb(255, 255, 255); background-color: rgb(255, 127, 0);">Get Started</a>
|
48655
48655
|
`
|
48656
48656
|
}, {
|
48657
48657
|
html: `
|
48658
|
-
<a href="#" role="button" class="transition-all inline-block whitespace-nowrap cursor-pointer no-underline border-2 border-solid mr-2 mt-2 mb-1 py-2 px-6 font-normal leading-14 border-transparent rounded size-
|
48658
|
+
<a href="#" role="button" class="transition-all inline-block whitespace-nowrap cursor-pointer no-underline border-2 border-solid mr-2 mt-2 mb-1 py-2 px-6 font-normal leading-14 border-transparent rounded size-18 tracking-wide hover:border-transparent" style="color: rgb(255, 255, 255); background-color: rgb(83,98,208);">Get Started</a>
|
48659
48659
|
`
|
48660
48660
|
}, {
|
48661
48661
|
html: `
|
48662
|
-
<a href="#" role="button" class="transition-all inline-block whitespace-nowrap cursor-pointer no-underline border-2 border-solid mr-2 mt-2 mb-1 py-2 px-6 font-normal leading-14 border-transparent rounded size-
|
48662
|
+
<a href="#" role="button" class="transition-all inline-block whitespace-nowrap cursor-pointer no-underline border-2 border-solid mr-2 mt-2 mb-1 py-2 px-6 font-normal leading-14 border-transparent rounded size-18 tracking-wide hover:border-transparent" style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">Get Started</a>
|
48663
48663
|
`
|
48664
48664
|
}, {
|
48665
48665
|
html: `
|
48666
|
-
<a href="#" role="button" class="transition-all inline-block whitespace-nowrap cursor-pointer no-underline border-2 border-solid mr-2 mt-2 mb-1 py-2 size-
|
48666
|
+
<a href="#" role="button" class="transition-all inline-block whitespace-nowrap cursor-pointer no-underline border-2 border-solid mr-2 mt-2 mb-1 py-2 size-18 px-6 border-current hover:border-current font-normal leading-14 tracking-wide rounded" style="color: rgb(255, 255, 255);">Get Started</a>
|
48667
48667
|
`
|
48668
48668
|
}, /* colors */
|
48669
48669
|
{
|
48670
48670
|
html: `
|
48671
|
-
<a href="#" role="button" class="transition-all inline-block whitespace-nowrap cursor-pointer no-underline border-2 border-solid mr-2 mt-2 mb-1 py-2 px-6 font-normal leading-14 border-transparent rounded size-
|
48671
|
+
<a href="#" role="button" class="transition-all inline-block whitespace-nowrap cursor-pointer no-underline border-2 border-solid mr-2 mt-2 mb-1 py-2 px-6 font-normal leading-14 border-transparent rounded size-18 tracking-wide hover:border-transparent" style="color: rgb(255, 255, 255); background-color: rgb(0, 200, 218);">Get Started</a>
|
48672
48672
|
`
|
48673
48673
|
}, {
|
48674
48674
|
html: `
|
48675
|
-
<a href="#" role="button" class="transition-all inline-block whitespace-nowrap cursor-pointer no-underline border-2 border-solid mr-2 mt-2 mb-1 py-2 px-6 font-normal leading-14 border-transparent rounded size-
|
48675
|
+
<a href="#" role="button" class="transition-all inline-block whitespace-nowrap cursor-pointer no-underline border-2 border-solid mr-2 mt-2 mb-1 py-2 px-6 font-normal leading-14 border-transparent rounded size-18 tracking-wide hover:border-transparent" style="color: rgb(255, 255, 255); background-color: rgb(55, 148, 59);">Get Started</a>
|
48676
48676
|
`
|
48677
48677
|
}, {
|
48678
48678
|
html: `
|
48679
|
-
<a href="#" role="button" class="transition-all inline-block whitespace-nowrap cursor-pointer no-underline border-2 border-solid mr-2 mt-2 mb-1 py-2 px-6 font-normal leading-14 border-transparent rounded size-
|
48679
|
+
<a href="#" role="button" class="transition-all inline-block whitespace-nowrap cursor-pointer no-underline border-2 border-solid mr-2 mt-2 mb-1 py-2 px-6 font-normal leading-14 border-transparent rounded size-18 tracking-wide hover:border-transparent" style="color: rgb(255, 255, 255); background-color: rgb(233,2,0);">Get Started</a>
|
48680
48680
|
`
|
48681
48681
|
}, {
|
48682
48682
|
html: `
|
48683
|
-
<a href="#" role="button" class="transition-all inline-block whitespace-nowrap cursor-pointer no-underline border-2 border-solid mr-2 mt-2 mb-1 py-2 px-6 font-normal leading-14 border-transparent rounded ml-0 mt-1 size-
|
48683
|
+
<a href="#" role="button" class="transition-all inline-block whitespace-nowrap cursor-pointer no-underline border-2 border-solid mr-2 mt-2 mb-1 py-2 px-6 font-normal leading-14 border-transparent rounded ml-0 mt-1 size-18 tracking-wide hover:border-transparent" style="color: rgb(0, 0, 0); background-color: rgb(254, 222, 76);">Get Started</a>
|
48684
48684
|
`
|
48685
48685
|
}, /* MEDIUM */
|
48686
48686
|
|
@@ -48692,7 +48692,7 @@ class ButtonEditor {
|
|
48692
48692
|
`
|
48693
48693
|
}, {
|
48694
48694
|
html: `
|
48695
|
-
<a href="#" role="button" class="transition-all inline-block whitespace-nowrap cursor-pointer no-underline border-2 border-solid mr-2 mt-2 mb-1 py-2 size-18 px-9 text-black leading-relaxed rounded-full border-transparent hover:border-transparent font-normal tracking-wide" style="background-color: rgb(240, 240, 240);">Get Started</a>
|
48695
|
+
<a href="#" role="button" class="transition-all inline-block whitespace-nowrap cursor-pointer no-underline border-2 border-solid mr-2 mt-2 mb-1 py-2 size-18 px-9 text-black leading-relaxed rounded-full border-transparent hover:border-transparent font-normal tracking-wide" style="color: rgb(0, 0, 0); background-color: rgb(240, 240, 240);">Get Started</a>
|
48696
48696
|
`
|
48697
48697
|
}, {
|
48698
48698
|
html: `
|
@@ -48734,7 +48734,7 @@ class ButtonEditor {
|
|
48734
48734
|
`
|
48735
48735
|
}, {
|
48736
48736
|
html: `
|
48737
|
-
<a href="#" role="button" class="transition-all inline-block whitespace-nowrap cursor-pointer no-underline border-2 border-solid mr-2 mt-2 mb-1 py-2 size-18 px-8 text-black leading-relaxed rounded border-transparent hover:border-transparent font-normal tracking-wide" style="background-color: rgb(240, 240, 240);">Get Started</a>
|
48737
|
+
<a href="#" role="button" class="transition-all inline-block whitespace-nowrap cursor-pointer no-underline border-2 border-solid mr-2 mt-2 mb-1 py-2 size-18 px-8 text-black leading-relaxed rounded border-transparent hover:border-transparent font-normal tracking-wide" style="color: rgb(0, 0, 0); background-color: rgb(240, 240, 240);">Get Started</a>
|
48738
48738
|
`
|
48739
48739
|
}, {
|
48740
48740
|
html: `
|
@@ -48779,7 +48779,7 @@ class ButtonEditor {
|
|
48779
48779
|
`
|
48780
48780
|
}, {
|
48781
48781
|
html: `
|
48782
|
-
<a href="#" role="button" class="transition-all inline-block whitespace-nowrap cursor-pointer no-underline border-2 border-solid mr-2 mt-2 mb-1 pt-3 pb-3 size-16 px-12 uppercase text-black leading-relaxed rounded-full border-transparent hover:border-transparent font-normal tracking-75" style="background-color: rgb(240, 240, 240);">Get Started</a>
|
48782
|
+
<a href="#" role="button" class="transition-all inline-block whitespace-nowrap cursor-pointer no-underline border-2 border-solid mr-2 mt-2 mb-1 pt-3 pb-3 size-16 px-12 uppercase text-black leading-relaxed rounded-full border-transparent hover:border-transparent font-normal tracking-75" style="color: rgb(0, 0, 0); background-color: rgb(240, 240, 240);">Get Started</a>
|
48783
48783
|
`
|
48784
48784
|
}, {
|
48785
48785
|
html: `
|
@@ -48821,7 +48821,7 @@ class ButtonEditor {
|
|
48821
48821
|
`
|
48822
48822
|
}, {
|
48823
48823
|
html: `
|
48824
|
-
<a href="#" role="button" class="transition-all inline-block whitespace-nowrap cursor-pointer no-underline border-2 border-solid mr-2 mt-2 mb-1 pt-3 pb-3 size-16 px-11 uppercase text-black leading-relaxed rounded border-transparent hover:border-transparent font-normal tracking-75" style="background-color: rgb(240, 240, 240);">Get Started</a>
|
48824
|
+
<a href="#" role="button" class="transition-all inline-block whitespace-nowrap cursor-pointer no-underline border-2 border-solid mr-2 mt-2 mb-1 pt-3 pb-3 size-16 px-11 uppercase text-black leading-relaxed rounded border-transparent hover:border-transparent font-normal tracking-75" style="color: rgb(0, 0, 0); background-color: rgb(240, 240, 240);">Get Started</a>
|
48825
48825
|
`
|
48826
48826
|
}, {
|
48827
48827
|
html: `
|
@@ -51183,6 +51183,12 @@ class Video {
|
|
51183
51183
|
let source = video.querySelector('source');
|
51184
51184
|
let url = '';
|
51185
51185
|
if (source) url = source.getAttribute('src');
|
51186
|
+
|
51187
|
+
// base64 handling: save the value and display "[Image Data]"
|
51188
|
+
if (url.startsWith('data:')) {
|
51189
|
+
this.builder.base64Data = url;
|
51190
|
+
url = '[Image Data]';
|
51191
|
+
}
|
51186
51192
|
videoModal.querySelector('.input-url').value = url;
|
51187
51193
|
const inpShowControls = videoModal.querySelector('.input-video-controls');
|
51188
51194
|
if (video.hasAttribute('controls')) {
|
@@ -51359,6 +51365,12 @@ class Video {
|
|
51359
51365
|
}
|
51360
51366
|
if (videoModal.querySelector('.input-url').value !== '') {
|
51361
51367
|
let url = videoModal.querySelector('.input-url').value;
|
51368
|
+
|
51369
|
+
// base64 handling: Apply base64 data
|
51370
|
+
if (url === '[Image Data]') {
|
51371
|
+
url = this.builder.base64Data;
|
51372
|
+
this.builder.base64Data = '';
|
51373
|
+
}
|
51362
51374
|
let source = video.querySelector('source');
|
51363
51375
|
if (url !== source.getAttribute('src')) {
|
51364
51376
|
if (source) source.setAttribute('src', url);
|
@@ -51376,6 +51388,8 @@ class Video {
|
|
51376
51388
|
});
|
51377
51389
|
let btnCancel = videoModal.querySelector('.input-cancel');
|
51378
51390
|
dom.addEventListener(btnCancel, 'click', () => {
|
51391
|
+
// base64 handling: Clear previously saved base64 data
|
51392
|
+
this.builder.base64Data = '';
|
51379
51393
|
this.builder.hideModal(videoModal);
|
51380
51394
|
});
|
51381
51395
|
}
|
@@ -51460,6 +51474,12 @@ class Audio {
|
|
51460
51474
|
if (source) url = source.getAttribute('src');
|
51461
51475
|
this.renderPanel();
|
51462
51476
|
const audioModal = this.audioModal;
|
51477
|
+
|
51478
|
+
// base64 handling: save the value and display "[Image Data]"
|
51479
|
+
if (url.startsWith('data:')) {
|
51480
|
+
this.builder.base64Data = url;
|
51481
|
+
url = '[Image Data]';
|
51482
|
+
}
|
51463
51483
|
audioModal.querySelector('.input-url').value = url;
|
51464
51484
|
util.showModal(audioModal, true, () => {
|
51465
51485
|
btn.removeAttribute('data-focus');
|
@@ -51488,7 +51508,7 @@ class Audio {
|
|
51488
51508
|
<form class="form-upload-larger" target="frameTargetAudioUpload" method="post" action="${this.builder.opts.audioHandler}" enctype="multipart/form-data" style="position:absolute;top:0;left:0;display:flex;justify-content:center;align-items:center;width:100%;height:100%;">
|
51489
51509
|
<input id="hidRefAudio" name="hidRefId" type="hidden" value="" />
|
51490
51510
|
<svg style="width:16px;height:16px;"><use xlink:href="#icon-upload"></use></svg>
|
51491
|
-
<input title="${util.out('Select')}" id="fileAudio1" name="fileImage" type="file" accept="audio
|
51511
|
+
<input title="${util.out('Select')}" id="fileAudio1" name="fileImage" type="file" accept="audio/*" style="position:absolute;top:-30px;left:0;width:100%;height:80px;opacity: 0;cursor: pointer;">
|
51492
51512
|
</form>
|
51493
51513
|
|
51494
51514
|
<iframe tabindex="0" id="frameTargetAudioUpload" name="frameTargetAudioUpload" tabIndex="-1" src="about:blank" style="width:1px;height:1px;position:absolute;top:0;right:-100000px"></iframe>
|
@@ -51581,6 +51601,12 @@ class Audio {
|
|
51581
51601
|
if (audioModal.querySelector('.input-url').value !== '') {
|
51582
51602
|
let url = audioModal.querySelector('.input-url').value;
|
51583
51603
|
|
51604
|
+
// base64 handling: Apply base64 data
|
51605
|
+
if (url === '[Image Data]') {
|
51606
|
+
url = this.builder.base64Data;
|
51607
|
+
this.builder.base64Data = '';
|
51608
|
+
}
|
51609
|
+
|
51584
51610
|
//Render
|
51585
51611
|
let source = audio.querySelector('source');
|
51586
51612
|
if (url !== source.getAttribute('src')) {
|
@@ -51600,6 +51626,8 @@ class Audio {
|
|
51600
51626
|
});
|
51601
51627
|
let btnCancel = audioModal.querySelector('.input-cancel');
|
51602
51628
|
dom.addEventListener(btnCancel, 'click', () => {
|
51629
|
+
// base64 handling: Clear previously saved base64 data
|
51630
|
+
this.builder.base64Data = '';
|
51603
51631
|
this.builder.hideModal(audioModal);
|
51604
51632
|
});
|
51605
51633
|
}
|
@@ -80764,12 +80792,20 @@ class MediaPicker {
|
|
80764
80792
|
const btnImageOk = modalMediaSelect.querySelector('.input-ok');
|
80765
80793
|
dom.addEventListener(btnImageOk, 'click', () => {
|
80766
80794
|
const inpSrc = modalMediaSelect.querySelector('.input-src');
|
80767
|
-
|
80795
|
+
let url = inpSrc.value;
|
80796
|
+
|
80797
|
+
// base64 handling: Apply base64 data
|
80798
|
+
if (url === '[Image Data]') {
|
80799
|
+
url = this.builder.base64Data;
|
80800
|
+
this.builder.base64Data = '';
|
80801
|
+
}
|
80768
80802
|
if (this.builder.mediaSelectedCallback) this.builder.mediaSelectedCallback(url);
|
80769
80803
|
this.builder.hideModal(modalMediaSelect);
|
80770
80804
|
});
|
80771
80805
|
const btnImageCancel = modalMediaSelect.querySelector('.input-cancel');
|
80772
80806
|
dom.addEventListener(btnImageCancel, 'click', () => {
|
80807
|
+
// base64 handling: Clear previously saved base64 data
|
80808
|
+
this.builder.base64Data = '';
|
80773
80809
|
this.builder.hideModal(modalMediaSelect);
|
80774
80810
|
});
|
80775
80811
|
}
|
@@ -96491,7 +96527,14 @@ Add an image for each feature.`, 'Create a new content showcasing a photo galler
|
|
96491
96527
|
Array.prototype.forEach.call(forms, formUpload => {
|
96492
96528
|
if (this.dom.hasClass(formUpload, 'please-wait')) {
|
96493
96529
|
this.dom.removeClass(formUpload, 'please-wait');
|
96494
|
-
if (s)
|
96530
|
+
if (s) {
|
96531
|
+
// base64 handling: save the value and display "[Image Data]"
|
96532
|
+
if (s.startsWith('data:')) {
|
96533
|
+
this.base64Data = s;
|
96534
|
+
s = '[Image Data]';
|
96535
|
+
}
|
96536
|
+
formUpload.parentNode.parentNode.querySelector('input[type="text"]').value = s;
|
96537
|
+
}
|
96495
96538
|
formUpload.parentNode.parentNode.querySelector('input[type="file"]').value = '';
|
96496
96539
|
}
|
96497
96540
|
});
|
@@ -96557,7 +96600,7 @@ Add an image for each feature.`, 'Create a new content showcasing a photo galler
|
|
96557
96600
|
alert(this.util.out('Please select an mp4 file.'));
|
96558
96601
|
}
|
96559
96602
|
} else if (this.targetAssetType === 'audio') {
|
96560
|
-
if (extension === 'mp3') {
|
96603
|
+
if (extension === 'mp3' || extension === 'wav') {
|
96561
96604
|
ok = true;
|
96562
96605
|
} else {
|
96563
96606
|
alert(this.util.out('Please select an mp3 file.'));
|
@@ -96647,7 +96690,7 @@ Add an image for each feature.`, 'Create a new content showcasing a photo galler
|
|
96647
96690
|
ok = true;
|
96648
96691
|
} else if (targetAssetType === 'video' && ext === 'mp4') {
|
96649
96692
|
ok = true;
|
96650
|
-
} else if (targetAssetType === 'audio' && ext === 'mp3') {
|
96693
|
+
} else if (targetAssetType === 'audio' && (ext === 'mp3' || ext === 'wav')) {
|
96651
96694
|
ok = true;
|
96652
96695
|
} else if (targetAssetType === 'media' && (s.includes('base64') || ext === 'mp4' || ext === 'jpg' || ext === 'jpeg' || ext === 'png' || ext === 'gif' || ext === 'webm' || ext === 'webp')) {
|
96653
96696
|
ok = true;
|
@@ -96711,7 +96754,7 @@ Add an image for each feature.`, 'Create a new content showcasing a photo galler
|
|
96711
96754
|
alert(out('Please select an image file.'));
|
96712
96755
|
}
|
96713
96756
|
} else if (targetAssetType === 'audio') {
|
96714
|
-
if (extension === 'mp3') {
|
96757
|
+
if (extension === 'mp3' || extension === 'wav') {
|
96715
96758
|
ok = true;
|
96716
96759
|
} else {
|
96717
96760
|
alert(out('Please select an mp3 file.'));
|