@innovastudio/contentbox 1.6.113 → 1.6.115

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/index.d.ts CHANGED
@@ -123,6 +123,9 @@ interface ContentBoxOptions {
123
123
 
124
124
  onRender?: () => void;
125
125
  onChange?: () => void;
126
+ onStart?: () => void;
127
+
128
+ simpleEditingBreakpoint?: string;
126
129
 
127
130
  onImageBrowseClick?: () => void;
128
131
  onImageSettingClick?: () => void;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@innovastudio/contentbox",
3
3
  "type": "module",
4
- "version": "1.6.113",
4
+ "version": "1.6.115",
5
5
  "description": "",
6
6
  "main": "public/contentbox/contentbox.esm.js",
7
7
  "types": "index.d.ts",
@@ -59,7 +59,6 @@
59
59
  "ws": "^8.13.0"
60
60
  },
61
61
  "dependencies": {
62
- "@innovastudio/contentbuilder": "^1.5.112",
63
62
  "js-beautify": "^1.14.0",
64
63
  "sortablejs": "^1.15.2"
65
64
  }
@@ -11664,11 +11664,13 @@ class PanelImage {
11664
11664
  this.updatePreview(src);
11665
11665
  const inpSrc = panel.querySelector('.inp-src');
11666
11666
 
11667
- if (src.indexOf('base64') === -1) {
11668
- inpSrc.value = src;
11669
- } else {
11667
+ if (src.startsWith('data:')) {
11668
+ const mime = src.split(';')[0].slice(5); // e.g., "image/png"
11670
11669
  // inpSrc.value = '[Image Data]';
11671
- inpSrc.value = 'image/jpeg (base64)';
11670
+
11671
+ inpSrc.value = `${mime} (base64)`;
11672
+ } else {
11673
+ inpSrc.value = src;
11672
11674
  }
11673
11675
 
11674
11676
  const divSettings = panel.querySelector('.div-image-settings');
@@ -11686,7 +11688,16 @@ class PanelImage {
11686
11688
  updateImageSrc(src) {
11687
11689
  this.builder.editor.saveForUndo();
11688
11690
  const inpSrc = this.panel.querySelector('.inp-src');
11689
- inpSrc.value = src;
11691
+
11692
+ if (src.startsWith('data:')) {
11693
+ const mime = src.split(';')[0].slice(5); // e.g., "image/png"
11694
+ // inpSrc.value = '[Image Data]';
11695
+
11696
+ inpSrc.value = `${mime} (base64)`;
11697
+ } else {
11698
+ inpSrc.value = src;
11699
+ }
11700
+
11690
11701
  this.updatePreview(src);
11691
11702
  this.refreshImage(src);
11692
11703
  this.builder.editor.onChange();
@@ -11856,11 +11867,13 @@ class PanelVideo {
11856
11867
  this.updatePreview(src);
11857
11868
  const inpSrc = panel.querySelector('.inp-src');
11858
11869
 
11859
- if (src.indexOf('base64') === -1) {
11860
- inpSrc.value = src;
11861
- } else {
11870
+ if (src.startsWith('data:')) {
11871
+ const mime = src.split(';')[0].slice(5); // e.g., "image/png"
11862
11872
  // inpSrc.value = '[Image Data]';
11863
- inpSrc.value = 'video/mp4 (base64)';
11873
+
11874
+ inpSrc.value = `${mime} (base64)`;
11875
+ } else {
11876
+ inpSrc.value = src;
11864
11877
  }
11865
11878
 
11866
11879
  const divSettings = panel.querySelector('.div-video-settings');
@@ -11899,7 +11912,16 @@ class PanelVideo {
11899
11912
  updateVideoSrc(src) {
11900
11913
  this.builder.editor.saveForUndo();
11901
11914
  const inpSrc = this.panel.querySelector('.inp-src');
11902
- inpSrc.value = src;
11915
+
11916
+ if (src.startsWith('data:')) {
11917
+ const mime = src.split(';')[0].slice(5); // e.g., "image/png"
11918
+ // inpSrc.value = '[Image Data]';
11919
+
11920
+ inpSrc.value = `${mime} (base64)`;
11921
+ } else {
11922
+ inpSrc.value = src;
11923
+ }
11924
+
11903
11925
  this.updatePreview(src);
11904
11926
  this.refreshVideo(src);
11905
11927
  this.builder.editor.onChange();
@@ -11947,7 +11969,7 @@ class PanelAudio {
11947
11969
  </label>
11948
11970
 
11949
11971
  <div class="group mt-4">
11950
- <input class="inp-file" type="file" accept="audio/mp3" style="display:none"/>
11972
+ <input class="inp-file" type="file" accept="audio/*" style="display:none"/>
11951
11973
  <button title="${out('Upload')}" class="btn-upload"><svg><use xlink:href="#icon-upload"></use></svg></button>
11952
11974
  <button title="${out('Select')}" class="btn-asset"><svg><use xlink:href="#icon-folder"></use></svg></button>
11953
11975
  </div>
@@ -12017,13 +12039,30 @@ class PanelAudio {
12017
12039
  const src = source ? source.getAttribute('src') : '';
12018
12040
  this.updatePreview(src);
12019
12041
  const inpSrc = panel.querySelector('.inp-src');
12020
- inpSrc.value = src;
12042
+
12043
+ if (src.startsWith('data:')) {
12044
+ const mime = src.split(';')[0].slice(5); // e.g., "image/png"
12045
+ // inpSrc.value = '[Image Data]';
12046
+
12047
+ inpSrc.value = `${mime} (base64)`;
12048
+ } else {
12049
+ inpSrc.value = src;
12050
+ }
12021
12051
  }
12022
12052
 
12023
12053
  updateAudioSrc(src) {
12024
12054
  this.builder.editor.saveForUndo();
12025
12055
  const inpSrc = this.panel.querySelector('.inp-src');
12026
- inpSrc.value = src;
12056
+
12057
+ if (src.startsWith('data:')) {
12058
+ const mime = src.split(';')[0].slice(5); // e.g., "image/png"
12059
+ // inpSrc.value = '[Image Data]';
12060
+
12061
+ inpSrc.value = `${mime} (base64)`;
12062
+ } else {
12063
+ inpSrc.value = src;
12064
+ }
12065
+
12027
12066
  this.updatePreview(src);
12028
12067
  this.refreshAudio(src);
12029
12068
  this.builder.editor.onChange();
@@ -14161,7 +14200,16 @@ class PanelBox {
14161
14200
  }
14162
14201
  }
14163
14202
  const inpSrc = panel.querySelector('.inp-src');
14164
- inpSrc.value = src; // Show/hide grayscale
14203
+
14204
+ if (src.startsWith('data:')) {
14205
+ const mime = src.split(';')[0].slice(5); // e.g., "image/png"
14206
+ // inpSrc.value = '[Image Data]';
14207
+
14208
+ inpSrc.value = `${mime} (base64)`;
14209
+ } else {
14210
+ inpSrc.value = src;
14211
+ } // Show/hide grayscale
14212
+
14165
14213
 
14166
14214
  const divGrayscale = panel.querySelector('.label.grayscale');
14167
14215
 
@@ -14674,7 +14722,16 @@ class PanelBox {
14674
14722
  this.imagePreview.innerHTML = previewHtml;
14675
14723
  const panel = this.panel;
14676
14724
  const inpSrc = panel.querySelector('.inp-src');
14677
- inpSrc.value = src; // Show/hide image-related controls
14725
+
14726
+ if (src.startsWith('data:')) {
14727
+ const mime = src.split(';')[0].slice(5); // e.g., "image/png"
14728
+ // inpSrc.value = '[Image Data]';
14729
+
14730
+ inpSrc.value = `${mime} (base64)`;
14731
+ } else {
14732
+ inpSrc.value = src;
14733
+ } // Show/hide image-related controls
14734
+
14678
14735
 
14679
14736
  const btnClear = panel.querySelector('.btn-clear');
14680
14737
  const btnAdjust = panel.querySelector('.btn-adjust');
@@ -14685,7 +14742,9 @@ class PanelBox {
14685
14742
  btnClear.style.display = 'none';
14686
14743
  btnAdjust.style.display = 'none';
14687
14744
  btnAccordionImage.style.display = 'none';
14745
+ btnAccordionImage.setAttribute('aria-expanded', 'false');
14688
14746
  btnAccordionImage.nextElementSibling.style.display = 'none';
14747
+ btnAccordionImage.nextElementSibling.setAttribute('aria-hidden', 'true');
14689
14748
  divStackBg.style.display = 'none';
14690
14749
  } else {
14691
14750
  btnClear.style.display = '';
@@ -26462,7 +26521,7 @@ class Snippets {
26462
26521
  const snippetPath = this.builder.opts.snippetPath;
26463
26522
  let snippetCategoriesString = '[';
26464
26523
  for (let i = 0; i < this.builder.opts.snippetCategories.length; i++) {
26465
- snippetCategoriesString += `[${this.builder.opts.snippetCategories[i][0]},'${util.out(this.builder.opts.snippetCategories[i][1])}'],`;
26524
+ snippetCategoriesString += `[${this.builder.opts.snippetCategories[i][0]},'${util.out(this.builder.opts.snippetCategories[i][1]).replaceAll('\'', '\\\'')}'],`;
26466
26525
  }
26467
26526
  snippetCategoriesString += ']';
26468
26527
  const defaultSnippetCategory = this.builder.opts.defaultSnippetCategory;
@@ -27785,7 +27844,7 @@ const renderQuickAdd = builder => {
27785
27844
  dom.addEventListener(elm, 'click', () => {
27786
27845
  const mode = quickadd.getAttribute('data-mode');
27787
27846
  let html = `<div>
27788
- <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-17 px-6 text-black leading-14 rounded border-transparent hover:border-transparent font-normal tracking-wide" style="background-color: rgb(240, 240, 240);">Read More</a>
27847
+ <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>
27789
27848
  </div>`;
27790
27849
  if (builder.opts.emailMode) {
27791
27850
  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>';
@@ -27796,8 +27855,8 @@ const renderQuickAdd = builder => {
27796
27855
  dom.addEventListener(elm, 'click', () => {
27797
27856
  const mode = quickadd.getAttribute('data-mode');
27798
27857
  let html = `<div>
27799
- <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-17 px-6 text-black leading-14 rounded border-transparent hover:border-transparent font-normal tracking-wide" style="background-color: rgb(240, 240, 240);">Read More</a>
27800
- <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-17 px-6 border-current hover:border-current font-normal leading-14 rounded tracking-wide">Get Started</a>
27858
+ <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>
27859
+ <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>
27801
27860
  </div>`;
27802
27861
  if (builder.opts.emailMode) {
27803
27862
  html = `<div>
@@ -27870,8 +27929,8 @@ const renderQuickAdd = builder => {
27870
27929
  let html = builder.opts.formTemplate.trim() || `
27871
27930
  <div class="row">
27872
27931
  <div class="column" data-noedit
27873
- data-dialog-width="1600px"
27874
- data-dialog-height="85vh"
27932
+ data-dialog-width="1800px"
27933
+ data-dialog-height="93vh"
27875
27934
  data-module="form-builder"
27876
27935
  data-module-desc="Form Builder"
27877
27936
  data-html="
@@ -44342,7 +44401,7 @@ const renderSnippetPanel = (builder, snippetOpen) => {
44342
44401
  builder.opts.snippetCategories.forEach(item => {
44343
44402
  const jsonItem = {};
44344
44403
  jsonItem.value = item[0];
44345
- jsonItem.label = item[1];
44404
+ jsonItem.label = util.out(item[1]);
44346
44405
  snippetList.push(jsonItem);
44347
44406
  });
44348
44407
  const inpSnippet = new CustomSelect('.inp-snippets', {
@@ -75053,86 +75112,86 @@ class ButtonEditor {
75053
75112
 
75054
75113
  {
75055
75114
  html: `
75056
- <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-17 px-7 border-current hover:border-current font-normal leading-14 rounded-full tracking-wide">Read More</a>
75115
+ <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>
75057
75116
  `
75058
75117
  }, {
75059
75118
  html: `
75060
- <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-17 px-7 text-black leading-14 rounded-full border-transparent hover:border-transparent font-normal tracking-wide" style="background-color: rgb(240, 240, 240);">Get Started</a>
75119
+ <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>
75061
75120
  `
75062
75121
  }, {
75063
75122
  html: `
75064
- <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-17 tracking-wide hover:border-transparent" style="color: rgb(255, 255, 255); background-color: rgb(255, 127, 0);">Get Started</a>
75123
+ <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>
75065
75124
  `
75066
75125
  }, {
75067
75126
  html: `
75068
- <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-17 tracking-wide hover:border-transparent" style="color: rgb(255, 255, 255); background-color: rgb(83,98,208);">Get Started</a>
75127
+ <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>
75069
75128
  `
75070
75129
  }, {
75071
75130
  html: `
75072
- <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-17 tracking-wide hover:border-transparent" style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">Get Started</a>
75131
+ <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>
75073
75132
  `
75074
75133
  }, {
75075
75134
  html: `
75076
- <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-17 px-7 border-current hover:border-current font-normal leading-14 tracking-wide rounded-full" style="color: rgb(255, 255, 255);">Get Started</a>
75135
+ <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>
75077
75136
  `
75078
75137
  }, /* colors */
75079
75138
  {
75080
75139
  html: `
75081
- <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-17 tracking-wide hover:border-transparent" style="color: rgb(255, 255, 255); background-color: rgb(0, 200, 218);">Get Started</a>
75140
+ <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>
75082
75141
  `
75083
75142
  }, {
75084
75143
  html: `
75085
- <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-17 tracking-wide hover:border-transparent" style="color: rgb(255, 255, 255); background-color: rgb(55, 148, 59);">Get Started</a>
75144
+ <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>
75086
75145
  `
75087
75146
  }, {
75088
75147
  html: `
75089
- <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-17 tracking-wide hover:border-transparent" style="color: rgb(255, 255, 255); background-color: rgb(233,2,0);">Get Started</a>
75148
+ <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>
75090
75149
  `
75091
75150
  }, {
75092
75151
  html: `
75093
- <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-17 tracking-wide hover:border-transparent" style="color: rgb(0, 0, 0); background-color: rgb(254, 222, 76);">Get Started</a>
75152
+ <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>
75094
75153
  `
75095
75154
  }, /* square */
75096
75155
  {
75097
75156
  html: `
75098
- <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-17 px-6 border-current hover:border-current font-normal leading-14 rounded tracking-wide">Read More</a>
75157
+ <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>
75099
75158
  `
75100
75159
  }, {
75101
75160
  html: `
75102
- <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-17 px-6 text-black leading-14 rounded border-transparent hover:border-transparent font-normal tracking-wide" style="background-color: rgb(240, 240, 240);">Get Started</a>
75161
+ <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>
75103
75162
  `
75104
75163
  }, {
75105
75164
  html: `
75106
- <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-17 tracking-wide hover:border-transparent" style="color: rgb(255, 255, 255); background-color: rgb(255, 127, 0);">Get Started</a>
75165
+ <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>
75107
75166
  `
75108
75167
  }, {
75109
75168
  html: `
75110
- <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-17 tracking-wide hover:border-transparent" style="color: rgb(255, 255, 255); background-color: rgb(83,98,208);">Get Started</a>
75169
+ <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>
75111
75170
  `
75112
75171
  }, {
75113
75172
  html: `
75114
- <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-17 tracking-wide hover:border-transparent" style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">Get Started</a>
75173
+ <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>
75115
75174
  `
75116
75175
  }, {
75117
75176
  html: `
75118
- <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-17 px-6 border-current hover:border-current font-normal leading-14 tracking-wide rounded" style="color: rgb(255, 255, 255);">Get Started</a>
75177
+ <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>
75119
75178
  `
75120
75179
  }, /* colors */
75121
75180
  {
75122
75181
  html: `
75123
- <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-17 tracking-wide hover:border-transparent" style="color: rgb(255, 255, 255); background-color: rgb(0, 200, 218);">Get Started</a>
75182
+ <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>
75124
75183
  `
75125
75184
  }, {
75126
75185
  html: `
75127
- <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-17 tracking-wide hover:border-transparent" style="color: rgb(255, 255, 255); background-color: rgb(55, 148, 59);">Get Started</a>
75186
+ <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>
75128
75187
  `
75129
75188
  }, {
75130
75189
  html: `
75131
- <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-17 tracking-wide hover:border-transparent" style="color: rgb(255, 255, 255); background-color: rgb(233,2,0);">Get Started</a>
75190
+ <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>
75132
75191
  `
75133
75192
  }, {
75134
75193
  html: `
75135
- <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-17 tracking-wide hover:border-transparent" style="color: rgb(0, 0, 0); background-color: rgb(254, 222, 76);">Get Started</a>
75194
+ <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>
75136
75195
  `
75137
75196
  }, /* MEDIUM */
75138
75197
 
@@ -75144,7 +75203,7 @@ class ButtonEditor {
75144
75203
  `
75145
75204
  }, {
75146
75205
  html: `
75147
- <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>
75206
+ <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>
75148
75207
  `
75149
75208
  }, {
75150
75209
  html: `
@@ -75186,7 +75245,7 @@ class ButtonEditor {
75186
75245
  `
75187
75246
  }, {
75188
75247
  html: `
75189
- <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>
75248
+ <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>
75190
75249
  `
75191
75250
  }, {
75192
75251
  html: `
@@ -75231,7 +75290,7 @@ class ButtonEditor {
75231
75290
  `
75232
75291
  }, {
75233
75292
  html: `
75234
- <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>
75293
+ <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>
75235
75294
  `
75236
75295
  }, {
75237
75296
  html: `
@@ -75273,7 +75332,7 @@ class ButtonEditor {
75273
75332
  `
75274
75333
  }, {
75275
75334
  html: `
75276
- <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>
75335
+ <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>
75277
75336
  `
75278
75337
  }, {
75279
75338
  html: `
@@ -77635,6 +77694,12 @@ class Video {
77635
77694
  let source = video.querySelector('source');
77636
77695
  let url = '';
77637
77696
  if (source) url = source.getAttribute('src');
77697
+
77698
+ // base64 handling: save the value and display "[Image Data]"
77699
+ if (url.startsWith('data:')) {
77700
+ this.builder.base64Data = url;
77701
+ url = '[Image Data]';
77702
+ }
77638
77703
  videoModal.querySelector('.input-url').value = url;
77639
77704
  const inpShowControls = videoModal.querySelector('.input-video-controls');
77640
77705
  if (video.hasAttribute('controls')) {
@@ -77811,6 +77876,12 @@ class Video {
77811
77876
  }
77812
77877
  if (videoModal.querySelector('.input-url').value !== '') {
77813
77878
  let url = videoModal.querySelector('.input-url').value;
77879
+
77880
+ // base64 handling: Apply base64 data
77881
+ if (url === '[Image Data]') {
77882
+ url = this.builder.base64Data;
77883
+ this.builder.base64Data = '';
77884
+ }
77814
77885
  let source = video.querySelector('source');
77815
77886
  if (url !== source.getAttribute('src')) {
77816
77887
  if (source) source.setAttribute('src', url);
@@ -77828,6 +77899,8 @@ class Video {
77828
77899
  });
77829
77900
  let btnCancel = videoModal.querySelector('.input-cancel');
77830
77901
  dom.addEventListener(btnCancel, 'click', () => {
77902
+ // base64 handling: Clear previously saved base64 data
77903
+ this.builder.base64Data = '';
77831
77904
  this.builder.hideModal(videoModal);
77832
77905
  });
77833
77906
  }
@@ -77912,6 +77985,12 @@ class Audio {
77912
77985
  if (source) url = source.getAttribute('src');
77913
77986
  this.renderPanel();
77914
77987
  const audioModal = this.audioModal;
77988
+
77989
+ // base64 handling: save the value and display "[Image Data]"
77990
+ if (url.startsWith('data:')) {
77991
+ this.builder.base64Data = url;
77992
+ url = '[Image Data]';
77993
+ }
77915
77994
  audioModal.querySelector('.input-url').value = url;
77916
77995
  util.showModal(audioModal, true, () => {
77917
77996
  btn.removeAttribute('data-focus');
@@ -77940,7 +78019,7 @@ class Audio {
77940
78019
  <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%;">
77941
78020
  <input id="hidRefAudio" name="hidRefId" type="hidden" value="" />
77942
78021
  <svg style="width:16px;height:16px;"><use xlink:href="#icon-upload"></use></svg>
77943
- <input title="${util.out('Select')}" id="fileAudio1" name="fileImage" type="file" accept="audio/mp3" style="position:absolute;top:-30px;left:0;width:100%;height:80px;opacity: 0;cursor: pointer;">
78022
+ <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;">
77944
78023
  </form>
77945
78024
 
77946
78025
  <iframe tabindex="0" id="frameTargetAudioUpload" name="frameTargetAudioUpload" tabIndex="-1" src="about:blank" style="width:1px;height:1px;position:absolute;top:0;right:-100000px"></iframe>
@@ -78033,6 +78112,12 @@ class Audio {
78033
78112
  if (audioModal.querySelector('.input-url').value !== '') {
78034
78113
  let url = audioModal.querySelector('.input-url').value;
78035
78114
 
78115
+ // base64 handling: Apply base64 data
78116
+ if (url === '[Image Data]') {
78117
+ url = this.builder.base64Data;
78118
+ this.builder.base64Data = '';
78119
+ }
78120
+
78036
78121
  //Render
78037
78122
  let source = audio.querySelector('source');
78038
78123
  if (url !== source.getAttribute('src')) {
@@ -78052,6 +78137,8 @@ class Audio {
78052
78137
  });
78053
78138
  let btnCancel = audioModal.querySelector('.input-cancel');
78054
78139
  dom.addEventListener(btnCancel, 'click', () => {
78140
+ // base64 handling: Clear previously saved base64 data
78141
+ this.builder.base64Data = '';
78055
78142
  this.builder.hideModal(audioModal);
78056
78143
  });
78057
78144
  }
@@ -107216,12 +107303,20 @@ class MediaPicker {
107216
107303
  const btnImageOk = modalMediaSelect.querySelector('.input-ok');
107217
107304
  dom.addEventListener(btnImageOk, 'click', () => {
107218
107305
  const inpSrc = modalMediaSelect.querySelector('.input-src');
107219
- const url = inpSrc.value;
107306
+ let url = inpSrc.value;
107307
+
107308
+ // base64 handling: Apply base64 data
107309
+ if (url === '[Image Data]') {
107310
+ url = this.builder.base64Data;
107311
+ this.builder.base64Data = '';
107312
+ }
107220
107313
  if (this.builder.mediaSelectedCallback) this.builder.mediaSelectedCallback(url);
107221
107314
  this.builder.hideModal(modalMediaSelect);
107222
107315
  });
107223
107316
  const btnImageCancel = modalMediaSelect.querySelector('.input-cancel');
107224
107317
  dom.addEventListener(btnImageCancel, 'click', () => {
107318
+ // base64 handling: Clear previously saved base64 data
107319
+ this.builder.base64Data = '';
107225
107320
  this.builder.hideModal(modalMediaSelect);
107226
107321
  });
107227
107322
  }
@@ -122943,7 +123038,14 @@ Add an image for each feature.`, 'Create a new content showcasing a photo galler
122943
123038
  Array.prototype.forEach.call(forms, formUpload => {
122944
123039
  if (this.dom.hasClass(formUpload, 'please-wait')) {
122945
123040
  this.dom.removeClass(formUpload, 'please-wait');
122946
- if (s) formUpload.parentNode.parentNode.querySelector('input[type="text"]').value = s;
123041
+ if (s) {
123042
+ // base64 handling: save the value and display "[Image Data]"
123043
+ if (s.startsWith('data:')) {
123044
+ this.base64Data = s;
123045
+ s = '[Image Data]';
123046
+ }
123047
+ formUpload.parentNode.parentNode.querySelector('input[type="text"]').value = s;
123048
+ }
122947
123049
  formUpload.parentNode.parentNode.querySelector('input[type="file"]').value = '';
122948
123050
  }
122949
123051
  });
@@ -123009,7 +123111,7 @@ Add an image for each feature.`, 'Create a new content showcasing a photo galler
123009
123111
  alert(this.util.out('Please select an mp4 file.'));
123010
123112
  }
123011
123113
  } else if (this.targetAssetType === 'audio') {
123012
- if (extension === 'mp3') {
123114
+ if (extension === 'mp3' || extension === 'wav') {
123013
123115
  ok = true;
123014
123116
  } else {
123015
123117
  alert(this.util.out('Please select an mp3 file.'));
@@ -123099,7 +123201,7 @@ Add an image for each feature.`, 'Create a new content showcasing a photo galler
123099
123201
  ok = true;
123100
123202
  } else if (targetAssetType === 'video' && ext === 'mp4') {
123101
123203
  ok = true;
123102
- } else if (targetAssetType === 'audio' && ext === 'mp3') {
123204
+ } else if (targetAssetType === 'audio' && (ext === 'mp3' || ext === 'wav')) {
123103
123205
  ok = true;
123104
123206
  } else if (targetAssetType === 'media' && (s.includes('base64') || ext === 'mp4' || ext === 'jpg' || ext === 'jpeg' || ext === 'png' || ext === 'gif' || ext === 'webm' || ext === 'webp')) {
123105
123207
  ok = true;
@@ -123163,7 +123265,7 @@ Add an image for each feature.`, 'Create a new content showcasing a photo galler
123163
123265
  alert(out('Please select an image file.'));
123164
123266
  }
123165
123267
  } else if (targetAssetType === 'audio') {
123166
- if (extension === 'mp3') {
123268
+ if (extension === 'mp3' || extension === 'wav') {
123167
123269
  ok = true;
123168
123270
  } else {
123169
123271
  alert(out('Please select an mp3 file.'));
@@ -140970,16 +141072,18 @@ class Box {
140970
141072
  alert(err);
140971
141073
  return;
140972
141074
  }
140973
-
141075
+ /*
140974
141076
  let activeBox;
140975
-
140976
- if (this.builder.targetBox) {
140977
- activeBox = this.builder.targetBox;
140978
- this.targetBox = null;
141077
+ if(this.builder.targetBox) {
141078
+ activeBox = this.builder.targetBox;
141079
+ this.targetBox = null;
140979
141080
  } else {
140980
- activeBox = this.builder.activeBox;
140981
- }
141081
+ activeBox = this.builder.activeBox;
141082
+ }
141083
+ */
140982
141084
 
141085
+
141086
+ let activeBox = this.builder.activeBox;
140983
141087
  this.builder.editor.saveForUndo();
140984
141088
  let overlay = activeBox.querySelector('.is-overlay');
140985
141089
 
@@ -160387,6 +160491,7 @@ Add an image for each feature.`, 'Create a new block showcasing a photo gallery
160387
160491
 
160388
160492
  editorSetup() {
160389
160493
  this.editor = new ContentBuilder({
160494
+ quickAddButtons: this.settings.quickAddButtons,
160390
160495
  assetManagerBasePath: this.settings.assetManagerBasePath || '',
160391
160496
  assetAbsoluteBasePath: this.settings.assetAbsoluteBasePath || '',
160392
160497
  metadata: this.settings.metadata,