@innovastudio/contentbox 1.6.112 → 1.6.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.
@@ -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');
@@ -42544,6 +42601,11 @@ const prepareSvgIcons = builder => {
42544
42601
  <path d="M7 9l5 -5l5 5"></path>
42545
42602
  <path d="M12 4l0 12"></path>
42546
42603
  </symbol>
42604
+ <symbol id="icon-sparkles" viewBox="0 0 24 24" stroke-width="1" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
42605
+ <path stroke="none" d="M0 0h24v24H0z" fill="none"/>
42606
+ <path fill="none" d="M16 18a2 2 0 0 1 2 2a2 2 0 0 1 2 -2a2 2 0 0 1 -2 -2a2 2 0 0 1 -2 2zm0 -12a2 2 0 0 1 2 2a2 2 0 0 1 2 -2a2 2 0 0 1 -2 -2a2 2 0 0 1 -2 2zm-7 12a6 6 0 0 1 6 -6a6 6 0 0 1 -6 -6a6 6 0 0 1 -6 6a6 6 0 0 1 6 6z" />
42607
+ </symbol>
42608
+ </defs>
42547
42609
  </svg>`;
42548
42610
  builder.dom.appendHtml(builder.builderStuff, html);
42549
42611
  };
@@ -77630,6 +77692,12 @@ class Video {
77630
77692
  let source = video.querySelector('source');
77631
77693
  let url = '';
77632
77694
  if (source) url = source.getAttribute('src');
77695
+
77696
+ // base64 handling: save the value and display "[Image Data]"
77697
+ if (url.startsWith('data:')) {
77698
+ this.builder.base64Data = url;
77699
+ url = '[Image Data]';
77700
+ }
77633
77701
  videoModal.querySelector('.input-url').value = url;
77634
77702
  const inpShowControls = videoModal.querySelector('.input-video-controls');
77635
77703
  if (video.hasAttribute('controls')) {
@@ -77719,7 +77787,7 @@ class Video {
77719
77787
  videoModal.querySelector('.input-select').style.display = 'none';
77720
77788
  }
77721
77789
  let inpSelectVideo = videoModal.querySelector('.input-select');
77722
- if (inpSelectVideo) dom.addEventListener(inpSelectVideo, 'click', () => {
77790
+ if (inpSelectVideo) dom.addEventListener(inpSelectVideo, 'click', async () => {
77723
77791
  if (this.builder.opts.onVideoSelectClick) {
77724
77792
  this.builder.opts.onVideoSelectClick({
77725
77793
  targetInput: videoModal.querySelector('.input-url'),
@@ -77728,11 +77796,31 @@ class Video {
77728
77796
  } else {
77729
77797
  let modalVideoSelect = builderStuff.querySelector('.is-modal.videoselect');
77730
77798
  let iframe = modalVideoSelect.querySelector('iframe');
77731
- if (this.builder.opts.assetRefresh) {
77732
- iframe.src = this.builder.opts.videoSelect;
77733
- }
77734
- if (iframe.src === 'about:blank') {
77735
- iframe.src = this.builder.opts.videoSelect;
77799
+ if (this.builder.opts.assetManagerBasePath) {
77800
+ let src;
77801
+ if (this.builder.opts.assetRefresh) {
77802
+ src = this.builder.opts.videoSelect;
77803
+ }
77804
+ if (iframe.src === 'about:blank') {
77805
+ src = this.builder.opts.videoSelect;
77806
+ }
77807
+ let result = await fetch(src);
77808
+ result = await result.text();
77809
+ result = result.replace(/<script>/g, `${this.builder.nonce ? `<script nonce="${this.builder.nonce}">` : '<script>'}`);
77810
+
77811
+ // Add base href
77812
+ result = result.replace(/<head>/i, '<head><base href="' + this.builder.opts.assetManagerBasePath + '">');
77813
+
77814
+ // Replace assets path
77815
+ result = result.replace(/="assets\//g, '="' + this.builder.opts.assetPath);
77816
+ iframe.srcdoc = result;
77817
+ } else {
77818
+ if (this.builder.opts.assetRefresh) {
77819
+ iframe.src = this.builder.opts.videoSelect;
77820
+ }
77821
+ if (iframe.src === 'about:blank') {
77822
+ iframe.src = this.builder.opts.videoSelect;
77823
+ }
77736
77824
  }
77737
77825
  util.showModal(modalVideoSelect, false, () => {
77738
77826
  inpSelectVideo.removeAttribute('data-focus');
@@ -77786,6 +77874,12 @@ class Video {
77786
77874
  }
77787
77875
  if (videoModal.querySelector('.input-url').value !== '') {
77788
77876
  let url = videoModal.querySelector('.input-url').value;
77877
+
77878
+ // base64 handling: Apply base64 data
77879
+ if (url === '[Image Data]') {
77880
+ url = this.builder.base64Data;
77881
+ this.builder.base64Data = '';
77882
+ }
77789
77883
  let source = video.querySelector('source');
77790
77884
  if (url !== source.getAttribute('src')) {
77791
77885
  if (source) source.setAttribute('src', url);
@@ -77803,6 +77897,8 @@ class Video {
77803
77897
  });
77804
77898
  let btnCancel = videoModal.querySelector('.input-cancel');
77805
77899
  dom.addEventListener(btnCancel, 'click', () => {
77900
+ // base64 handling: Clear previously saved base64 data
77901
+ this.builder.base64Data = '';
77806
77902
  this.builder.hideModal(videoModal);
77807
77903
  });
77808
77904
  }
@@ -77887,6 +77983,12 @@ class Audio {
77887
77983
  if (source) url = source.getAttribute('src');
77888
77984
  this.renderPanel();
77889
77985
  const audioModal = this.audioModal;
77986
+
77987
+ // base64 handling: save the value and display "[Image Data]"
77988
+ if (url.startsWith('data:')) {
77989
+ this.builder.base64Data = url;
77990
+ url = '[Image Data]';
77991
+ }
77890
77992
  audioModal.querySelector('.input-url').value = url;
77891
77993
  util.showModal(audioModal, true, () => {
77892
77994
  btn.removeAttribute('data-focus');
@@ -77915,7 +78017,7 @@ class Audio {
77915
78017
  <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%;">
77916
78018
  <input id="hidRefAudio" name="hidRefId" type="hidden" value="" />
77917
78019
  <svg style="width:16px;height:16px;"><use xlink:href="#icon-upload"></use></svg>
77918
- <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;">
78020
+ <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;">
77919
78021
  </form>
77920
78022
 
77921
78023
  <iframe tabindex="0" id="frameTargetAudioUpload" name="frameTargetAudioUpload" tabIndex="-1" src="about:blank" style="width:1px;height:1px;position:absolute;top:0;right:-100000px"></iframe>
@@ -77939,7 +78041,7 @@ class Audio {
77939
78041
  audioModal.querySelector('.input-select').style.display = 'none';
77940
78042
  }
77941
78043
  let inpSelectAudio = audioModal.querySelector('.input-select');
77942
- if (inpSelectAudio) dom.addEventListener(inpSelectAudio, 'click', () => {
78044
+ if (inpSelectAudio) dom.addEventListener(inpSelectAudio, 'click', async () => {
77943
78045
  if (this.builder.opts.onAudioSelectClick) {
77944
78046
  this.builder.opts.onAudioSelectClick({
77945
78047
  targetInput: audioModal.querySelector('.input-url'),
@@ -77948,11 +78050,31 @@ class Audio {
77948
78050
  } else {
77949
78051
  let modalAudioSelect = builderStuff.querySelector('.is-modal.audioselect');
77950
78052
  let iframe = modalAudioSelect.querySelector('iframe');
77951
- if (this.builder.opts.assetRefresh) {
77952
- iframe.src = this.builder.opts.audioSelect;
77953
- }
77954
- if (iframe.src === 'about:blank') {
77955
- iframe.src = this.builder.opts.audioSelect;
78053
+ if (this.builder.opts.assetManagerBasePath) {
78054
+ let src;
78055
+ if (this.builder.opts.assetRefresh) {
78056
+ src = this.builder.opts.audioSelect;
78057
+ }
78058
+ if (iframe.src === 'about:blank') {
78059
+ src = this.builder.opts.audioSelect;
78060
+ }
78061
+ let result = await fetch(src);
78062
+ result = await result.text();
78063
+ result = result.replace(/<script>/g, `${this.builder.nonce ? `<script nonce="${this.builder.nonce}">` : '<script>'}`);
78064
+
78065
+ // Add base href
78066
+ result = result.replace(/<head>/i, '<head><base href="' + this.builder.opts.assetManagerBasePath + '">');
78067
+
78068
+ // Replace assets path
78069
+ result = result.replace(/="assets\//g, '="' + this.builder.opts.assetPath);
78070
+ iframe.srcdoc = result;
78071
+ } else {
78072
+ if (this.builder.opts.assetRefresh) {
78073
+ iframe.src = this.builder.opts.audioSelect;
78074
+ }
78075
+ if (iframe.src === 'about:blank') {
78076
+ iframe.src = this.builder.opts.audioSelect;
78077
+ }
77956
78078
  }
77957
78079
  util.showModal(modalAudioSelect, false, () => {
77958
78080
  inpSelectAudio.removeAttribute('data-focus');
@@ -77988,6 +78110,12 @@ class Audio {
77988
78110
  if (audioModal.querySelector('.input-url').value !== '') {
77989
78111
  let url = audioModal.querySelector('.input-url').value;
77990
78112
 
78113
+ // base64 handling: Apply base64 data
78114
+ if (url === '[Image Data]') {
78115
+ url = this.builder.base64Data;
78116
+ this.builder.base64Data = '';
78117
+ }
78118
+
77991
78119
  //Render
77992
78120
  let source = audio.querySelector('source');
77993
78121
  if (url !== source.getAttribute('src')) {
@@ -78007,6 +78135,8 @@ class Audio {
78007
78135
  });
78008
78136
  let btnCancel = audioModal.querySelector('.input-cancel');
78009
78137
  dom.addEventListener(btnCancel, 'click', () => {
78138
+ // base64 handling: Clear previously saved base64 data
78139
+ this.builder.base64Data = '';
78010
78140
  this.builder.hideModal(audioModal);
78011
78141
  });
78012
78142
  }
@@ -93643,7 +93773,7 @@ class Rte {
93643
93773
  var btn = builder.opts.buttonsMore[j].toLowerCase();
93644
93774
  if (btn === 'createlink') html_rtemore += `<button tabindex="-1" title="${util.out('Hyperlink')}" class="rte-link"><svg class="is-icon-flex" style="width:14px;height:14px;"><use xlink:href="#ion-link"></use></svg></button>`;else if (btn === 'icon' && !this.builder.opts.emailMode) html_rtemore += `<button tabindex="-1" title="${util.out('Icon')}" class="rte-icon"><svg class="is-icon-flex" style="width:14px;height:14px;margin-top:2px;"><use xlink:href="#ion-android-happy"></use></svg></button>`;else if (btn === 'svg' && !this.builder.opts.emailMode) html_rtemore += `<button tabindex="-1" title="${util.out('SVG')}" class="rte-svg"><svg class="is-icon-flex" style="width:19px;height:19px;margin-top:2px;"><use xlink:href="#icon-svg"></use></svg></button>`;else if (btn === 'removeformat') html_rtemore += `<button tabindex="-1" title="${util.out('Clean')}" class="rte-clean"><svg class="is-icon-flex" style="width:11px;height:11px;"><use xlink:href="#icon-clean"></use></svg></button>`;else if (btn === 'bold') html_rtemore += `<button tabindex="-1" title="${util.out('Bold')}" class="rte-format" data-command="bold"><span style="font-family:serif;font-size:14px;">B</span></button>`;else if (btn === 'italic') html_rtemore += `<button tabindex="-1" title="${util.out('Italic')}" class="rte-format" data-command="italic"><span style="font-family:serif;font-size:16px;font-style:italic;">i</span></button>`;else if (btn === 'underline') html_rtemore += `<button tabindex="-1" title="${util.out('Underline')}" class="rte-format" data-command="underline"><span style="font-family:serif;font-size:14px;text-decoration:underline;">U</span></button>`;
93645
93775
  // else if(btn==='createlink') html_rtemore += `<button tabindex="-1" title="${util.out('Hyperlink')}" class="rte-link"><svg class="is-icon-flex" style="width:14px;height:14px;"><use xlink:href="#ion-link"></use></svg></button>`;
93646
- else if (btn === 'align') html_rtemore += `<button tabindex="-1" title="${util.out('Align')}" class="rte-align"><svg class="is-icon-flex" style="width:12px;height:12px;margin-top:-2px;"><use xlink:href="#icon-align-full"></use></svg></button>`;else if (btn === 'list') html_rtemore += `<button tabindex="-1" title="${util.out('List')}" class="rte-list"><svg class="is-icon-flex" style="width:12px;height:12px;"><use xlink:href="#icon-list-bullet"></use></svg></button>`;else if (btn === 'color') html_rtemore += `<button tabindex="-1" title="${util.out('Color')}" class="rte-color"><svg class="is-icon-flex" style="width:12px;height:12px;"><use xlink:href="#ion-contrast"></use></svg></button>`;else if (btn === 'formatting') html_rtemore += `<button tabindex="-1" title="${util.out('Formatting')}" class="rte-formatting"><span style="font-family:serif;font-size:15px;display:inline-block;">A</span></button>`;else if (btn === 'tags') html_rtemore += customtag_button;else if (btn === 'image') html_rtemore += `<button tabindex="-1" title="${util.out('Image')}" class="rte-image"><svg class="is-icon-flex" style="width:13px;height:13px;"><use xlink:href="#ion-image"></use></svg></button>`;else if (btn === 'gridtool') html_rtemore += `<button tabindex="-1" title="${util.out('Grid Tool')}" class="rte-grideditor"><svg class="is-icon-flex" style="margin-right:-3px;"><use xlink:href="#ion-grid"></use></svg></button>`;else if (btn === 'html') html_rtemore += `<button tabindex="-1" title="${util.out('HTML')}" class="rte-html"><svg class="is-icon-flex" style="margin-right:-3px;width:14px;height:14px;"><use xlink:href="#ion-ios-arrow-left"></use></svg><svg class="is-icon-flex" style="margin-left:-2px;width:14px;height:14px;"><use xlink:href="#ion-ios-arrow-right"></use></svg></button>`;else if (btn === 'preferences') html_rtemore += `<button tabindex="-1" title="${util.out('Preferences')}" class="rte-preferences"><svg class="is-icon-flex" style="width:13px;height:13px;"><use xlink:href="#ion-wrench"></use></svg></button>`;else if (btn === 'addsnippet') html_rtemore += `<button tabindex="-1" title="${util.out('Add Snippet')}" class="rte-addsnippet"><svg class="is-icon-flex" style="width:18px;height:18px;margin-top:-1px;"><use xlink:href="#ion-ios-plus-empty"></use></svg></button>`;else if (btn === 'formatpara') html_rtemore += `<button tabindex="-1" title="${util.out('Paragraph')}" class="rte-paragraph"><span style="font-family:serif;font-size:14px;display:inline-block;margin-top:2px;">H</span></button>`;else if (btn === 'font') html_rtemore += `<button tabindex="-1" title="${util.out('Font')}" class="rte-fontfamily"><span style="font-family:serif;font-size:18px;text-transform:none;display:inline-block;margin-top: -3px;">a</span></button>`;else if (btn === 'textsettings') html_rtemore += `<button tabindex="-1" title="${util.out('Text Settings')}" class="rte-textsettings"><svg class="is-icon-flex" style="width:16px;height:16px;"><use xlink:href="#ion-ios-settings"></use></svg></button>`;else if (btn === 'undo') html_rtemore += `<button tabindex="-1" title="${util.out('Undo')}" class="rte-undo"><svg class="is-icon-flex" style="margin-top:2px;width:15px;height:15px;"><use xlink:href="#ion-ios-undo"></use></svg></button>`;else if (btn === 'redo') html_rtemore += `<button tabindex="-1" title="${util.out('Redo')}" class="rte-redo"><svg class="is-icon-flex" style="margin-top:2px;width:15px;height:15px;"><use xlink:href="#ion-ios-redo"></use></svg></button>`;else if (btn === 'aiassistant') html_rtemore += `<button tabindex="-1" title="${util.out('AI Assistant')}" class="rte-ai"><svg class="is-icon-flex" style="margin-top:2px;width:15px;height:15px;"><use xlink:href="#icon-message"></use></svg></button>`;else if (btn === 'snippets') html_rtemore += `<button tabindex="-1" title="${util.out('Snippets')}" class="rte-snippets"><svg class="is-icon-flex" style="width:19px;height:19px;"><use xlink:href="#icon-snippets"></use></svg></button>`;else if (btn === 'pageoptions') html_rtemore += `<button tabindex="-1" title="${util.out('Page Options')}" class="rte-pageoptions"><svg class="is-icon-flex"><use xlink:href="#icon-pagesize"></use></svg></button>`;else if (btn === 'print') html_rtemore += `<button tabindex="-1" title="${util.out('Print')}" class="rte-print"><svg class="is-icon-flex" style="width:15px;height:15px;"><use xlink:href="#icon-print"></use></svg></button>`;else if (btn === 'zoom') html_rtemore += `<button tabindex="-1" title="${util.out('Zoom')}" class="rte-zoom"><svg class="is-icon-flex" style="margin-top:1px;width:15px;height:15px;"><use xlink:href="#icon-zoom-in"></use></svg></button>`;else if (btn === 'livepreview') html_rtemore += `<button tabindex="-1" title="${util.out('Live Preview')}" class="rte-livepreview"><svg class="is-icon-flex" style="margin-top:2px;width:15px;height:15px;"><use xlink:href="#icon-device-desktop"></use></svg></button>`;else if (btn === '|') {
93776
+ else if (btn === 'align') html_rtemore += `<button tabindex="-1" title="${util.out('Align')}" class="rte-align"><svg class="is-icon-flex" style="width:12px;height:12px;margin-top:-2px;"><use xlink:href="#icon-align-full"></use></svg></button>`;else if (btn === 'list') html_rtemore += `<button tabindex="-1" title="${util.out('List')}" class="rte-list"><svg class="is-icon-flex" style="width:12px;height:12px;"><use xlink:href="#icon-list-bullet"></use></svg></button>`;else if (btn === 'color') html_rtemore += `<button tabindex="-1" title="${util.out('Color')}" class="rte-color"><svg class="is-icon-flex" style="width:12px;height:12px;"><use xlink:href="#ion-contrast"></use></svg></button>`;else if (btn === 'formatting') html_rtemore += `<button tabindex="-1" title="${util.out('Formatting')}" class="rte-formatting"><span style="font-family:serif;font-size:15px;display:inline-block;">A</span></button>`;else if (btn === 'tags') html_rtemore += customtag_button;else if (btn === 'image') html_rtemore += `<button tabindex="-1" title="${util.out('Image')}" class="rte-image"><svg class="is-icon-flex" style="width:13px;height:13px;"><use xlink:href="#ion-image"></use></svg></button>`;else if (btn === 'gridtool') html_rtemore += `<button tabindex="-1" title="${util.out('Grid Tool')}" class="rte-grideditor"><svg class="is-icon-flex" style="margin-right:-3px;"><use xlink:href="#ion-grid"></use></svg></button>`;else if (btn === 'html') html_rtemore += `<button tabindex="-1" title="${util.out('HTML')}" class="rte-html"><svg class="is-icon-flex" style="margin-right:-3px;width:14px;height:14px;"><use xlink:href="#ion-ios-arrow-left"></use></svg><svg class="is-icon-flex" style="margin-left:-2px;width:14px;height:14px;"><use xlink:href="#ion-ios-arrow-right"></use></svg></button>`;else if (btn === 'preferences') html_rtemore += `<button tabindex="-1" title="${util.out('Preferences')}" class="rte-preferences"><svg class="is-icon-flex" style="width:13px;height:13px;"><use xlink:href="#ion-wrench"></use></svg></button>`;else if (btn === 'addsnippet') html_rtemore += `<button tabindex="-1" title="${util.out('Add Snippet')}" class="rte-addsnippet"><svg class="is-icon-flex" style="width:18px;height:18px;margin-top:-1px;"><use xlink:href="#ion-ios-plus-empty"></use></svg></button>`;else if (btn === 'formatpara') html_rtemore += `<button tabindex="-1" title="${util.out('Paragraph')}" class="rte-paragraph"><span style="font-family:serif;font-size:14px;display:inline-block;margin-top:2px;">H</span></button>`;else if (btn === 'font') html_rtemore += `<button tabindex="-1" title="${util.out('Font')}" class="rte-fontfamily"><span style="font-family:serif;font-size:18px;text-transform:none;display:inline-block;margin-top: -3px;">a</span></button>`;else if (btn === 'textsettings') html_rtemore += `<button tabindex="-1" title="${util.out('Text Settings')}" class="rte-textsettings"><svg class="is-icon-flex" style="width:16px;height:16px;"><use xlink:href="#ion-ios-settings"></use></svg></button>`;else if (btn === 'undo') html_rtemore += `<button tabindex="-1" title="${util.out('Undo')}" class="rte-undo"><svg class="is-icon-flex" style="margin-top:2px;width:15px;height:15px;"><use xlink:href="#ion-ios-undo"></use></svg></button>`;else if (btn === 'redo') html_rtemore += `<button tabindex="-1" title="${util.out('Redo')}" class="rte-redo"><svg class="is-icon-flex" style="margin-top:2px;width:15px;height:15px;"><use xlink:href="#ion-ios-redo"></use></svg></button>`;else if (btn === 'aiassistant') html_rtemore += `<button tabindex="-1" title="${util.out('AI Assistant')}" class="rte-ai"><svg class="is-icon-flex" style="width:19px;height:19px;"><use xlink:href="#icon-sparkles"></use></svg></button>`;else if (btn === 'snippets') html_rtemore += `<button tabindex="-1" title="${util.out('Snippets')}" class="rte-snippets"><svg class="is-icon-flex" style="width:19px;height:19px;"><use xlink:href="#icon-snippets"></use></svg></button>`;else if (btn === 'pageoptions') html_rtemore += `<button tabindex="-1" title="${util.out('Page Options')}" class="rte-pageoptions"><svg class="is-icon-flex"><use xlink:href="#icon-pagesize"></use></svg></button>`;else if (btn === 'print') html_rtemore += `<button tabindex="-1" title="${util.out('Print')}" class="rte-print"><svg class="is-icon-flex" style="width:15px;height:15px;"><use xlink:href="#icon-print"></use></svg></button>`;else if (btn === 'zoom') html_rtemore += `<button tabindex="-1" title="${util.out('Zoom')}" class="rte-zoom"><svg class="is-icon-flex" style="margin-top:1px;width:15px;height:15px;"><use xlink:href="#icon-zoom-in"></use></svg></button>`;else if (btn === 'livepreview') html_rtemore += `<button tabindex="-1" title="${util.out('Live Preview')}" class="rte-livepreview"><svg class="is-icon-flex" style="margin-top:2px;width:15px;height:15px;"><use xlink:href="#icon-device-desktop"></use></svg></button>`;else if (btn === '|') {
93647
93777
  html_rtemore += '<div class="rte-separator"></div>';
93648
93778
  } else {
93649
93779
  html_rtemore += `<button tabindex="-1" title="button not found" data-plugin="${btn}"></button>`; //temporary (later will be replaced with plugin button)
@@ -93653,7 +93783,7 @@ class Rte {
93653
93783
  let html_rte = '';
93654
93784
  for (j = 0; j < builder.opts.buttons.length; j++) {
93655
93785
  btn = builder.opts.buttons[j].toLowerCase();
93656
- if (btn === 'bold') html_rte += `<button tabindex="-1" title="${util.out('Bold')}" class="rte-format" data-command="bold"><span style="font-family:serif;font-size:14px;">B</span></button>`;else if (btn === 'italic') html_rte += `<button tabindex="-1" title="${util.out('Italic')}" class="rte-format" data-command="italic"><span style="font-family:serif;font-size:16px;font-style:italic;">i</span></button>`;else if (btn === 'underline') html_rte += `<button tabindex="-1" title="${util.out('Underline')}" class="rte-format" data-command="underline"><span style="font-family:serif;font-size:14px;text-decoration:underline;">U</span></button>`;else if (btn === 'createlink') html_rte += `<button tabindex="-1" title="${util.out('Hyperlink')}" class="rte-link"><svg class="is-icon-flex" style="width:14px;height:14px;"><use xlink:href="#ion-link"></use></svg></button>`;else if (btn === 'align') html_rte += `<button tabindex="-1" title="${util.out('Align')}" class="rte-align"><svg class="is-icon-flex" style="width:12px;height:12px;margin-top:-2px;"><use xlink:href="#icon-align-full"></use></svg></button>`;else if (btn === 'formatpara') html_rte += `<button tabindex="-1" title="${util.out('Paragraph')}" class="rte-paragraph"><span style="font-family:serif;font-size:14px;display:inline-block;margin-top:2px;">H</span></button>`;else if (btn === 'color') html_rte += `<button tabindex="-1" title="${util.out('Color')}" class="rte-color"><svg class="is-icon-flex" style="width:12px;height:12px;"><use xlink:href="#ion-contrast"></use></svg></button>`;else if (btn === 'formatting') html_rte += `<button tabindex="-1" title="${util.out('Formatting')}" class="rte-formatting"><span style="font-family:serif;font-size:15px;display:inline-block;">A</span></button>`;else if (btn === 'list') html_rte += `<button tabindex="-1" title="${util.out('List')}" class="rte-list"><svg class="is-icon-flex" style="width:12px;height:12px;"><use xlink:href="#icon-list-bullet"></use></svg></button>`;else if (btn === 'textsettings') html_rte += `<button tabindex="-1" title="${util.out('Text Settings')}" class="rte-textsettings"><svg class="is-icon-flex" style="width:16px;height:16px;"><use xlink:href="#ion-ios-settings"></use></svg></button>`;else if (btn === 'icon' && !this.builder.opts.emailMode) html_rte += `<button tabindex="-1" title="${util.out('Icon')}" class="rte-icon"><svg class="is-icon-flex" style="width:14px;height:14px;margin-top:2px"><use xlink:href="#ion-android-happy"></use></svg></button>`;else if (btn === 'svg' && !this.builder.opts.emailMode) html_rte += `<button tabindex="-1" title="${util.out('SVG')}" class="rte-svg"><svg class="is-icon-flex" style="width:19px;height:19px;margin-top:2px"><use xlink:href="#icon-svg"></use></svg></button>`;else if (btn === 'tags') html_rte += customtag_button;else if (btn === 'removeformat') html_rte += `<button tabindex="-1" title="${util.out('Clean')}" class="rte-format" data-command="clean"><svg class="is-icon-flex" style="width:11px;height:11px;"><use xlink:href="#icon-clean"></use></svg></button>`;else if (btn === 'font') html_rte += `<button tabindex="-1" title="${util.out('Font')}" class="rte-fontfamily"><span style="font-family:serif;font-size:18px;text-transform:none;display:inline-block;margin-top: -3px;">a</span></button>`;else if (btn === 'image') html_rte += `<button tabindex="-1" title="${util.out('Image')}" class="rte-image"><svg class="is-icon-flex" style="width:13px;height:13px;"><use xlink:href="#ion-image"></use></svg></button>`;else if (btn === 'gridtool') html_rte += `<button tabindex="-1" title="${util.out('Grid Tool')}" class="rte-grideditor"><svg class="is-icon-flex" style="margin-right:-3px;width:17px;height:17px;"><use xlink:href="#ion-grid"></use></svg></button>`;else if (btn === 'html') html_rte += `<button tabindex="-1" title="${util.out('HTML')}" class="rte-html"><svg class="is-icon-flex" style="margin-right:-3px;width:14px;height:14px;"><use xlink:href="#ion-ios-arrow-left"></use></svg><svg class="is-icon-flex" style="margin-left:-2px;width:14px;height:14px;"><use xlink:href="#ion-ios-arrow-right"></use></svg></button>`;else if (btn === 'preferences') html_rte += `<button tabindex="-1" title="${util.out('Preferences')}" class="rte-preferences"><svg class="is-icon-flex" style="width:13px;height:13px;"><use xlink:href="#ion-wrench"></use></svg></button>`;else if (btn === 'addsnippet') html_rte += `<button tabindex="-1" title="${util.out('Add Snippet')}" class="rte-addsnippet"><svg class="is-icon-flex" style="width:18px;height:18px;margin-top:-1px;"><use xlink:href="#ion-ios-plus-empty"></use></svg></button>`;else if (btn === 'undo') html_rte += `<button tabindex="-1" title="${util.out('Undo')}" class="rte-undo"><svg class="is-icon-flex" style="margin-top:2px;width:15px;height:15px;"><use xlink:href="#ion-ios-undo"></use></svg></button>`;else if (btn === 'redo') html_rte += `<button tabindex="-1" title="${util.out('Redo')}" class="rte-redo"><svg class="is-icon-flex" style="margin-top:2px;width:15px;height:15px;"><use xlink:href="#ion-ios-redo"></use></svg></button>`;else if (btn === 'aiassistant') html_rte += `<button tabindex="-1" title="${util.out('AI Assistant')}" class="rte-ai"><svg class="is-icon-flex" style="margin-top:2px;width:15px;height:15px;"><use xlink:href="#icon-message"></use></svg></button>`;else if (btn === 'snippets') html_rte += `<button tabindex="-1" title="${util.out('Snippets')}" class="rte-snippets"><svg class="is-icon-flex" style="width:19px;height:19px;"><use xlink:href="#icon-snippets"></use></svg></button>`;else if (btn === 'more' && html_rtemore !== '') html_rte += `<button tabindex="-1" title="${util.out('More')}" class="rte-more"><svg class="is-icon-flex" style="width:13px;height:13px;"><use xlink:href="#ion-more"></use></svg></button>`;else if (btn === 'pageoptions') html_rte += `<button tabindex="-1" title="${util.out('Page Options')}" class="rte-pageoptions"><svg class="is-icon-flex"><use xlink:href="#icon-pagesize"></use></svg></button>`;else if (btn === 'print') html_rte += `<button tabindex="-1" title="${util.out('Print')}" class="rte-print"><svg class="is-icon-flex" style="width:15px;height:15px;"><use xlink:href="#icon-print"></use></svg></button>`;else if (btn === 'zoom') html_rte += `<button tabindex="-1" title="${util.out('Zoom')}" class="rte-zoom"><svg class="is-icon-flex" style="margin-top:1px;width:15px;height:15px;"><use xlink:href="#icon-zoom-in"></use></svg></button>`;else if (btn === 'livepreview') html_rte += `<button tabindex="-1" title="${util.out('Live Preview')}" class="rte-livepreview"><svg class="is-icon-flex" style="margin-top:2px;width:15px;height:15px;"><use xlink:href="#icon-device-desktop"></use></svg></button>`;else if (btn === '|') {
93786
+ if (btn === 'bold') html_rte += `<button tabindex="-1" title="${util.out('Bold')}" class="rte-format" data-command="bold"><span style="font-family:serif;font-size:14px;">B</span></button>`;else if (btn === 'italic') html_rte += `<button tabindex="-1" title="${util.out('Italic')}" class="rte-format" data-command="italic"><span style="font-family:serif;font-size:16px;font-style:italic;">i</span></button>`;else if (btn === 'underline') html_rte += `<button tabindex="-1" title="${util.out('Underline')}" class="rte-format" data-command="underline"><span style="font-family:serif;font-size:14px;text-decoration:underline;">U</span></button>`;else if (btn === 'createlink') html_rte += `<button tabindex="-1" title="${util.out('Hyperlink')}" class="rte-link"><svg class="is-icon-flex" style="width:14px;height:14px;"><use xlink:href="#ion-link"></use></svg></button>`;else if (btn === 'align') html_rte += `<button tabindex="-1" title="${util.out('Align')}" class="rte-align"><svg class="is-icon-flex" style="width:12px;height:12px;margin-top:-2px;"><use xlink:href="#icon-align-full"></use></svg></button>`;else if (btn === 'formatpara') html_rte += `<button tabindex="-1" title="${util.out('Paragraph')}" class="rte-paragraph"><span style="font-family:serif;font-size:14px;display:inline-block;margin-top:2px;">H</span></button>`;else if (btn === 'color') html_rte += `<button tabindex="-1" title="${util.out('Color')}" class="rte-color"><svg class="is-icon-flex" style="width:12px;height:12px;"><use xlink:href="#ion-contrast"></use></svg></button>`;else if (btn === 'formatting') html_rte += `<button tabindex="-1" title="${util.out('Formatting')}" class="rte-formatting"><span style="font-family:serif;font-size:15px;display:inline-block;">A</span></button>`;else if (btn === 'list') html_rte += `<button tabindex="-1" title="${util.out('List')}" class="rte-list"><svg class="is-icon-flex" style="width:12px;height:12px;"><use xlink:href="#icon-list-bullet"></use></svg></button>`;else if (btn === 'textsettings') html_rte += `<button tabindex="-1" title="${util.out('Text Settings')}" class="rte-textsettings"><svg class="is-icon-flex" style="width:16px;height:16px;"><use xlink:href="#ion-ios-settings"></use></svg></button>`;else if (btn === 'icon' && !this.builder.opts.emailMode) html_rte += `<button tabindex="-1" title="${util.out('Icon')}" class="rte-icon"><svg class="is-icon-flex" style="width:14px;height:14px;margin-top:2px"><use xlink:href="#ion-android-happy"></use></svg></button>`;else if (btn === 'svg' && !this.builder.opts.emailMode) html_rte += `<button tabindex="-1" title="${util.out('SVG')}" class="rte-svg"><svg class="is-icon-flex" style="width:19px;height:19px;margin-top:2px"><use xlink:href="#icon-svg"></use></svg></button>`;else if (btn === 'tags') html_rte += customtag_button;else if (btn === 'removeformat') html_rte += `<button tabindex="-1" title="${util.out('Clean')}" class="rte-format" data-command="clean"><svg class="is-icon-flex" style="width:11px;height:11px;"><use xlink:href="#icon-clean"></use></svg></button>`;else if (btn === 'font') html_rte += `<button tabindex="-1" title="${util.out('Font')}" class="rte-fontfamily"><span style="font-family:serif;font-size:18px;text-transform:none;display:inline-block;margin-top: -3px;">a</span></button>`;else if (btn === 'image') html_rte += `<button tabindex="-1" title="${util.out('Image')}" class="rte-image"><svg class="is-icon-flex" style="width:13px;height:13px;"><use xlink:href="#ion-image"></use></svg></button>`;else if (btn === 'gridtool') html_rte += `<button tabindex="-1" title="${util.out('Grid Tool')}" class="rte-grideditor"><svg class="is-icon-flex" style="margin-right:-3px;width:17px;height:17px;"><use xlink:href="#ion-grid"></use></svg></button>`;else if (btn === 'html') html_rte += `<button tabindex="-1" title="${util.out('HTML')}" class="rte-html"><svg class="is-icon-flex" style="margin-right:-3px;width:14px;height:14px;"><use xlink:href="#ion-ios-arrow-left"></use></svg><svg class="is-icon-flex" style="margin-left:-2px;width:14px;height:14px;"><use xlink:href="#ion-ios-arrow-right"></use></svg></button>`;else if (btn === 'preferences') html_rte += `<button tabindex="-1" title="${util.out('Preferences')}" class="rte-preferences"><svg class="is-icon-flex" style="width:13px;height:13px;"><use xlink:href="#ion-wrench"></use></svg></button>`;else if (btn === 'addsnippet') html_rte += `<button tabindex="-1" title="${util.out('Add Snippet')}" class="rte-addsnippet"><svg class="is-icon-flex" style="width:18px;height:18px;margin-top:-1px;"><use xlink:href="#ion-ios-plus-empty"></use></svg></button>`;else if (btn === 'undo') html_rte += `<button tabindex="-1" title="${util.out('Undo')}" class="rte-undo"><svg class="is-icon-flex" style="margin-top:2px;width:15px;height:15px;"><use xlink:href="#ion-ios-undo"></use></svg></button>`;else if (btn === 'redo') html_rte += `<button tabindex="-1" title="${util.out('Redo')}" class="rte-redo"><svg class="is-icon-flex" style="margin-top:2px;width:15px;height:15px;"><use xlink:href="#ion-ios-redo"></use></svg></button>`;else if (btn === 'aiassistant') html_rte += `<button tabindex="-1" title="${util.out('AI Assistant')}" class="rte-ai"><svg class="is-icon-flex" style="width:19px;height:19px;"><use xlink:href="#icon-sparkles"></use></svg></button>`;else if (btn === 'snippets') html_rte += `<button tabindex="-1" title="${util.out('Snippets')}" class="rte-snippets"><svg class="is-icon-flex" style="width:19px;height:19px;"><use xlink:href="#icon-snippets"></use></svg></button>`;else if (btn === 'more' && html_rtemore !== '') html_rte += `<button tabindex="-1" title="${util.out('More')}" class="rte-more"><svg class="is-icon-flex" style="width:13px;height:13px;"><use xlink:href="#ion-more"></use></svg></button>`;else if (btn === 'pageoptions') html_rte += `<button tabindex="-1" title="${util.out('Page Options')}" class="rte-pageoptions"><svg class="is-icon-flex"><use xlink:href="#icon-pagesize"></use></svg></button>`;else if (btn === 'print') html_rte += `<button tabindex="-1" title="${util.out('Print')}" class="rte-print"><svg class="is-icon-flex" style="width:15px;height:15px;"><use xlink:href="#icon-print"></use></svg></button>`;else if (btn === 'zoom') html_rte += `<button tabindex="-1" title="${util.out('Zoom')}" class="rte-zoom"><svg class="is-icon-flex" style="margin-top:1px;width:15px;height:15px;"><use xlink:href="#icon-zoom-in"></use></svg></button>`;else if (btn === 'livepreview') html_rte += `<button tabindex="-1" title="${util.out('Live Preview')}" class="rte-livepreview"><svg class="is-icon-flex" style="margin-top:2px;width:15px;height:15px;"><use xlink:href="#icon-device-desktop"></use></svg></button>`;else if (btn === '|') {
93657
93787
  html_rte += '<div class="rte-separator"></div>';
93658
93788
  } else {
93659
93789
  html_rte += `<button tabindex="-1" title="button not found" data-plugin="${btn}"></button>`; //temporary (later will be replaced with plugin button)
@@ -93671,7 +93801,7 @@ class Rte {
93671
93801
  let html_elementrtemore = '';
93672
93802
  for (j = 0; j < builder.opts.elementButtonsMore.length; j++) {
93673
93803
  btn = builder.opts.elementButtonsMore[j].toLowerCase();
93674
- if (btn === 'left') html_elementrtemore += `<button tabindex="-1" title="${util.out('Align Left')}" data-align="left"><svg class="is-icon-flex" style="width:14px;height:14px;"><use xlink:href="#icon-align-left"></use></svg></button>`;else if (btn === 'center') html_elementrtemore += `<button tabindex="-1" title="${util.out('Align Center')}" data-align="center"><svg class="is-icon-flex" style="width:14px;height:14px;"><use xlink:href="#icon-align-center"></use></svg></button>`;else if (btn === 'right') html_elementrtemore += `<button tabindex="-1" title="${util.out('Align Right')}" data-align="right"><svg class="is-icon-flex" style="width:14px;height:14px;"><use xlink:href="#icon-align-right"></use></svg></button>`;else if (btn === 'full') html_elementrtemore += `<button tabindex="-1" title="${util.out('Align Full')}" data-align="justify"><svg class="is-icon-flex" style="width:14px;height:14px;"><use xlink:href="#icon-align-full"></use></svg></button>`;else if (btn === 'gridtool') html_elementrtemore += `<button tabindex="-1" title="${util.out('Grid Tool')}" class="rte-grideditor"><svg class="is-icon-flex" style="margin-right:-3px;"><use xlink:href="#ion-grid"></use></svg></button>`;else if (btn === 'html') html_elementrtemore += `<button tabindex="-1" title="${util.out('HTML')}" class="rte-html"><svg class="is-icon-flex" style="margin-right:-3px;width:14px;height:14px;"><use xlink:href="#ion-ios-arrow-left"></use></svg><svg class="is-icon-flex" style="margin-left:-2px;width:14px;height:14px;"><use xlink:href="#ion-ios-arrow-right"></use></svg></button>`;else if (btn === 'preferences') html_elementrtemore += `<button tabindex="-1" title="${util.out('Preferences')}" class="rte-preferences"><svg class="is-icon-flex" style="width:13px;height:13px;"><use xlink:href="#ion-wrench"></use></svg></button>`;else if (btn === 'addsnippet') html_elementrtemore += `<button tabindex="-1" title="${util.out('Add Snippet')}" class="rte-addsnippet"><svg class="is-icon-flex" style="width:18px;height:18px;margin-top:-1px;"><use xlink:href="#ion-ios-plus-empty"></use></svg></button>`;else if (btn === 'undo') html_elementrtemore += `<button tabindex="-1" title="${util.out('Undo')}" class="rte-undo"><svg class="is-icon-flex" style="margin-top:2px;width:15px;height:15px;"><use xlink:href="#ion-ios-undo"></use></svg></button>`;else if (btn === 'redo') html_elementrtemore += `<button tabindex="-1" title="${util.out('Redo')}" class="rte-redo"><svg class="is-icon-flex" style="margin-top:2px;width:15px;height:15px;"><use xlink:href="#ion-ios-redo"></use></svg></button>`;else if (btn === 'aiassistant') html_elementrtemore += `<button tabindex="-1" title="${util.out('AI Assistant')}" class="rte-ai"><svg class="is-icon-flex" style="margin-top:2px;width:15px;height:15px;"><use xlink:href="#icon-message"></use></svg></button>`;else if (btn === 'snippets') html_elementrtemore += `<button tabindex="-1" title="${util.out('Snippets')}" class="rte-snippets"><svg class="is-icon-flex" style="width:19px;height:19px;"><use xlink:href="#icon-snippets"></use></svg></button>`;else if (btn === 'pageoptions') html_elementrtemore += `<button tabindex="-1" title="${util.out('Page Options')}" class="rte-pageoptions"><svg class="is-icon-flex"><use xlink:href="#icon-pagesize"></use></svg></button>`;else if (btn === 'print') html_elementrtemore += `<button tabindex="-1" title="${util.out('Print')}" class="rte-print"><svg class="is-icon-flex" style="width:15px;height:15px;"><use xlink:href="#icon-print"></use></svg></button>`;else if (btn === 'zoom') html_elementrtemore += `<button tabindex="-1" title="${util.out('Zoom')}" class="rte-zoom"><svg class="is-icon-flex" style="margin-top:1px;width:15px;height:15px;"><use xlink:href="#icon-zoom-in"></use></svg></button>`;else if (btn === 'livepreview') html_elementrtemore += `<button tabindex="-1" title="${util.out('Live Preview')}" class="rte-livepreview"><svg class="is-icon-flex" style="margin-top:2px;width:15px;height:15px;"><use xlink:href="#icon-device-desktop"></use></svg></button>`;else if (btn === '|') {
93804
+ if (btn === 'left') html_elementrtemore += `<button tabindex="-1" title="${util.out('Align Left')}" data-align="left"><svg class="is-icon-flex" style="width:14px;height:14px;"><use xlink:href="#icon-align-left"></use></svg></button>`;else if (btn === 'center') html_elementrtemore += `<button tabindex="-1" title="${util.out('Align Center')}" data-align="center"><svg class="is-icon-flex" style="width:14px;height:14px;"><use xlink:href="#icon-align-center"></use></svg></button>`;else if (btn === 'right') html_elementrtemore += `<button tabindex="-1" title="${util.out('Align Right')}" data-align="right"><svg class="is-icon-flex" style="width:14px;height:14px;"><use xlink:href="#icon-align-right"></use></svg></button>`;else if (btn === 'full') html_elementrtemore += `<button tabindex="-1" title="${util.out('Align Full')}" data-align="justify"><svg class="is-icon-flex" style="width:14px;height:14px;"><use xlink:href="#icon-align-full"></use></svg></button>`;else if (btn === 'gridtool') html_elementrtemore += `<button tabindex="-1" title="${util.out('Grid Tool')}" class="rte-grideditor"><svg class="is-icon-flex" style="margin-right:-3px;"><use xlink:href="#ion-grid"></use></svg></button>`;else if (btn === 'html') html_elementrtemore += `<button tabindex="-1" title="${util.out('HTML')}" class="rte-html"><svg class="is-icon-flex" style="margin-right:-3px;width:14px;height:14px;"><use xlink:href="#ion-ios-arrow-left"></use></svg><svg class="is-icon-flex" style="margin-left:-2px;width:14px;height:14px;"><use xlink:href="#ion-ios-arrow-right"></use></svg></button>`;else if (btn === 'preferences') html_elementrtemore += `<button tabindex="-1" title="${util.out('Preferences')}" class="rte-preferences"><svg class="is-icon-flex" style="width:13px;height:13px;"><use xlink:href="#ion-wrench"></use></svg></button>`;else if (btn === 'addsnippet') html_elementrtemore += `<button tabindex="-1" title="${util.out('Add Snippet')}" class="rte-addsnippet"><svg class="is-icon-flex" style="width:18px;height:18px;margin-top:-1px;"><use xlink:href="#ion-ios-plus-empty"></use></svg></button>`;else if (btn === 'undo') html_elementrtemore += `<button tabindex="-1" title="${util.out('Undo')}" class="rte-undo"><svg class="is-icon-flex" style="margin-top:2px;width:15px;height:15px;"><use xlink:href="#ion-ios-undo"></use></svg></button>`;else if (btn === 'redo') html_elementrtemore += `<button tabindex="-1" title="${util.out('Redo')}" class="rte-redo"><svg class="is-icon-flex" style="margin-top:2px;width:15px;height:15px;"><use xlink:href="#ion-ios-redo"></use></svg></button>`;else if (btn === 'aiassistant') html_elementrtemore += `<button tabindex="-1" title="${util.out('AI Assistant')}" class="rte-ai"><svg class="is-icon-flex" style="width:19px;height:19px;"><use xlink:href="#icon-sparkles"></use></svg></button>`;else if (btn === 'snippets') html_elementrtemore += `<button tabindex="-1" title="${util.out('Snippets')}" class="rte-snippets"><svg class="is-icon-flex" style="width:19px;height:19px;"><use xlink:href="#icon-snippets"></use></svg></button>`;else if (btn === 'pageoptions') html_elementrtemore += `<button tabindex="-1" title="${util.out('Page Options')}" class="rte-pageoptions"><svg class="is-icon-flex"><use xlink:href="#icon-pagesize"></use></svg></button>`;else if (btn === 'print') html_elementrtemore += `<button tabindex="-1" title="${util.out('Print')}" class="rte-print"><svg class="is-icon-flex" style="width:15px;height:15px;"><use xlink:href="#icon-print"></use></svg></button>`;else if (btn === 'zoom') html_elementrtemore += `<button tabindex="-1" title="${util.out('Zoom')}" class="rte-zoom"><svg class="is-icon-flex" style="margin-top:1px;width:15px;height:15px;"><use xlink:href="#icon-zoom-in"></use></svg></button>`;else if (btn === 'livepreview') html_elementrtemore += `<button tabindex="-1" title="${util.out('Live Preview')}" class="rte-livepreview"><svg class="is-icon-flex" style="margin-top:2px;width:15px;height:15px;"><use xlink:href="#icon-device-desktop"></use></svg></button>`;else if (btn === '|') {
93675
93805
  html_elementrtemore += '<div class="rte-separator"></div>';
93676
93806
  } else {
93677
93807
  html_elementrtemore += `<button tabindex="-1" title="button not found" data-plugin="${btn}"></button>`; //temporary (later will be replaced with plugin button)
@@ -93681,7 +93811,7 @@ class Rte {
93681
93811
  let html_elementrte = '';
93682
93812
  for (j = 0; j < builder.opts.elementButtons.length; j++) {
93683
93813
  btn = builder.opts.elementButtons[j].toLowerCase();
93684
- if (btn === 'left') html_elementrte += `<button tabindex="-1" title="${util.out('Align Left')}" data-align="left"><svg class="is-icon-flex" style="width:14px;height:14px;"><use xlink:href="#icon-align-left"></use></svg></button>`;else if (btn === 'center') html_elementrte += `<button tabindex="-1" title="${util.out('Align Center')}" data-align="center"><svg class="is-icon-flex" style="width:14px;height:14px;"><use xlink:href="#icon-align-center"></use></svg></button>`;else if (btn === 'right') html_elementrte += `<button tabindex="-1" title="${util.out('Align Right')}" data-align="right"><svg class="is-icon-flex" style="width:14px;height:14px;"><use xlink:href="#icon-align-right"></use></svg></button>`;else if (btn === 'full') html_elementrte += `<button tabindex="-1" title="${util.out('Align Full')}" data-align="justify"><svg class="is-icon-flex" style="width:14px;height:14px;"><use xlink:href="#icon-align-full"></use></svg></button>`;else if (btn === 'gridtool') html_elementrte += `<button tabindex="-1" title="${util.out('Grid Tool')}" class="rte-grideditor"><svg class="is-icon-flex" style="margin-right:-3px;width:17px;height:17px;"><use xlink:href="#ion-grid"></use></svg></button>`;else if (btn === 'html') html_elementrte += `<button tabindex="-1" title="${util.out('HTML')}" class="rte-html"><svg class="is-icon-flex" style="margin-right:-3px;width:14px;height:14px;"><use xlink:href="#ion-ios-arrow-left"></use></svg><svg class="is-icon-flex" style="margin-left:-2px;width:14px;height:14px;"><use xlink:href="#ion-ios-arrow-right"></use></svg></button>`;else if (btn === 'preferences') html_elementrte += `<button tabindex="-1" title="${util.out('Preferences')}" class="rte-preferences"><svg class="is-icon-flex" style="width:13px;height:13px;"><use xlink:href="#ion-wrench"></use></svg></button>`;else if (btn === 'addsnippet') html_elementrte += `<button tabindex="-1" title="${util.out('Add Snippet')}" class="rte-addsnippet"><svg class="is-icon-flex" style="width:18px;height:18px;margin-top:-1px;"><use xlink:href="#ion-ios-plus-empty"></use></svg></button>`;else if (btn === 'group') html_elementrte += `<button style="display:none" tabindex="-1" title="${util.out('Group')}" class="rte-group"><svg class="is-icon-flex" style="width:20px;height:20px;margin-top:-1px;"><use xlink:href="#icon-group"></use></svg></button>`;else if (btn === 'ungroup') html_elementrte += `<button style="display:none" tabindex="-1" title="${util.out('Ungroup')}" class="rte-ungroup"><svg class="is-icon-flex" style="width:20px;height:20px;margin-top:-1px;"><use xlink:href="#icon-ungroup"></use></svg></button>`;else if (btn === 'duplicate') html_elementrte += `<button style="display:none" tabindex="-1" title="${util.out('Duplicate')}" class="rte-duplicate"><svg class="is-icon-flex" style="width:16px;height:16px;margin-top:-1px;"><use xlink:href="#icon-duplicate"></use></svg></button>`;else if (btn === 'front') html_elementrte += `<button style="display:none" tabindex="-1" title="${util.out('Bring to Front')}" class="rte-front"><svg class="is-icon-flex" style="width:18px;height:18px;margin-top:-1px;"><use xlink:href="#icon-stack-forward"></use></svg></button>`;else if (btn === 'backward') html_elementrte += `<button style="display:none" tabindex="-1" title="${util.out('Send to Back')}" class="rte-backward"><svg class="is-icon-flex" style="width:18px;height:18px;margin-top:-1px;"><use xlink:href="#icon-stack-backward"></use></svg></button>`;else if (btn === 'moveup') html_elementrte += `<button style="display:none" tabindex="-1" title="${util.out('Move Up')}" class="rte-moveup"><svg class="is-icon-flex" style="width:18px;height:18px;margin-top:-1px;"><use xlink:href="#icon-arrow-up"></use></svg></button>`;else if (btn === 'movedown') html_elementrte += `<button style="display:none" tabindex="-1" title="${util.out('Move Down')}" class="rte-movedown"><svg class="is-icon-flex" style="width:18px;height:18px;margin-top:-1px;"><use xlink:href="#icon-arrow-down"></use></svg></button>`;else if (btn === 'delete') html_elementrte += `<button style="display:none" tabindex="-1" title="${util.out('Delete')}" class="rte-delete"><svg class="is-icon-flex" style="width:18px;height:18px;margin-top:-1px;"><use xlink:href="#icon-trash"></use></svg></button>`;else if (btn === 'blocksettings' && this.builder.canvas) html_elementrte += `<button tabindex="-1" title="${util.out('Block Settings')}" class="rte-blocksettings"><svg class="is-icon-flex"><use xlink:href="#icon-settings"></use></svg></button>`;else if (btn === 'undo') html_elementrte += `<button tabindex="-1" title="${util.out('Undo')}" class="rte-undo"><svg class="is-icon-flex" style="margin-top:2px;width:15px;height:15px;"><use xlink:href="#ion-ios-undo"></use></svg></button>`;else if (btn === 'redo') html_elementrte += `<button tabindex="-1" title="${util.out('Redo')}" class="rte-redo"><svg class="is-icon-flex" style="margin-top:2px;width:15px;height:15px;"><use xlink:href="#ion-ios-redo"></use></svg></button>`;else if (btn === 'aiassistant') html_elementrte += `<button tabindex="-1" title="${util.out('AI Assistant')}" class="rte-ai"><svg class="is-icon-flex" style="margin-top:2px;width:15px;height:15px;"><use xlink:href="#icon-message"></use></svg></button>`;else if (btn === 'snippets') html_elementrte += `<button tabindex="-1" title="${util.out('Snippets')}" class="rte-snippets"><svg class="is-icon-flex" style="width:19px;height:19px;"><use xlink:href="#icon-snippets"></use></svg></button>`;else if (btn === 'more' && html_elementrtemore !== '') html_elementrte += `<button tabindex="-1" title="${util.out('More')}" class="rte-more"><svg class="is-icon-flex" style="width:13px;height:13px;"><use xlink:href="#ion-more"></use></svg></button>`;else if (btn === 'pageoptions') html_elementrte += `<button tabindex="-1" title="${util.out('Page Options')}" class="rte-pageoptions"><svg class="is-icon-flex"><use xlink:href="#icon-pagesize"></use></svg></button>`;else if (btn === 'print') html_elementrte += `<button tabindex="-1" title="${util.out('Print')}" class="rte-print"><svg class="is-icon-flex" style="width:15px;height:15px;"><use xlink:href="#icon-print"></use></svg></button>`;else if (btn === 'zoom') html_elementrte += `<button tabindex="-1" title="${util.out('Zoom')}" class="rte-zoom"><svg class="is-icon-flex" style="margin-top:1px;width:15px;height:15px;"><use xlink:href="#icon-zoom-in"></use></svg></button>`;else if (btn === 'livepreview') html_elementrte += `<button tabindex="-1" title="${util.out('Live Preview')}" class="rte-livepreview"><svg class="is-icon-flex" style="margin-top:2px;width:15px;height:15px;"><use xlink:href="#icon-device-desktop"></use></svg></button>`;else if (btn === '|') {
93814
+ if (btn === 'left') html_elementrte += `<button tabindex="-1" title="${util.out('Align Left')}" data-align="left"><svg class="is-icon-flex" style="width:14px;height:14px;"><use xlink:href="#icon-align-left"></use></svg></button>`;else if (btn === 'center') html_elementrte += `<button tabindex="-1" title="${util.out('Align Center')}" data-align="center"><svg class="is-icon-flex" style="width:14px;height:14px;"><use xlink:href="#icon-align-center"></use></svg></button>`;else if (btn === 'right') html_elementrte += `<button tabindex="-1" title="${util.out('Align Right')}" data-align="right"><svg class="is-icon-flex" style="width:14px;height:14px;"><use xlink:href="#icon-align-right"></use></svg></button>`;else if (btn === 'full') html_elementrte += `<button tabindex="-1" title="${util.out('Align Full')}" data-align="justify"><svg class="is-icon-flex" style="width:14px;height:14px;"><use xlink:href="#icon-align-full"></use></svg></button>`;else if (btn === 'gridtool') html_elementrte += `<button tabindex="-1" title="${util.out('Grid Tool')}" class="rte-grideditor"><svg class="is-icon-flex" style="margin-right:-3px;width:17px;height:17px;"><use xlink:href="#ion-grid"></use></svg></button>`;else if (btn === 'html') html_elementrte += `<button tabindex="-1" title="${util.out('HTML')}" class="rte-html"><svg class="is-icon-flex" style="margin-right:-3px;width:14px;height:14px;"><use xlink:href="#ion-ios-arrow-left"></use></svg><svg class="is-icon-flex" style="margin-left:-2px;width:14px;height:14px;"><use xlink:href="#ion-ios-arrow-right"></use></svg></button>`;else if (btn === 'preferences') html_elementrte += `<button tabindex="-1" title="${util.out('Preferences')}" class="rte-preferences"><svg class="is-icon-flex" style="width:13px;height:13px;"><use xlink:href="#ion-wrench"></use></svg></button>`;else if (btn === 'addsnippet') html_elementrte += `<button tabindex="-1" title="${util.out('Add Snippet')}" class="rte-addsnippet"><svg class="is-icon-flex" style="width:18px;height:18px;margin-top:-1px;"><use xlink:href="#ion-ios-plus-empty"></use></svg></button>`;else if (btn === 'group') html_elementrte += `<button style="display:none" tabindex="-1" title="${util.out('Group')}" class="rte-group"><svg class="is-icon-flex" style="width:20px;height:20px;margin-top:-1px;"><use xlink:href="#icon-group"></use></svg></button>`;else if (btn === 'ungroup') html_elementrte += `<button style="display:none" tabindex="-1" title="${util.out('Ungroup')}" class="rte-ungroup"><svg class="is-icon-flex" style="width:20px;height:20px;margin-top:-1px;"><use xlink:href="#icon-ungroup"></use></svg></button>`;else if (btn === 'duplicate') html_elementrte += `<button style="display:none" tabindex="-1" title="${util.out('Duplicate')}" class="rte-duplicate"><svg class="is-icon-flex" style="width:16px;height:16px;margin-top:-1px;"><use xlink:href="#icon-duplicate"></use></svg></button>`;else if (btn === 'front') html_elementrte += `<button style="display:none" tabindex="-1" title="${util.out('Bring to Front')}" class="rte-front"><svg class="is-icon-flex" style="width:18px;height:18px;margin-top:-1px;"><use xlink:href="#icon-stack-forward"></use></svg></button>`;else if (btn === 'backward') html_elementrte += `<button style="display:none" tabindex="-1" title="${util.out('Send to Back')}" class="rte-backward"><svg class="is-icon-flex" style="width:18px;height:18px;margin-top:-1px;"><use xlink:href="#icon-stack-backward"></use></svg></button>`;else if (btn === 'moveup') html_elementrte += `<button style="display:none" tabindex="-1" title="${util.out('Move Up')}" class="rte-moveup"><svg class="is-icon-flex" style="width:18px;height:18px;margin-top:-1px;"><use xlink:href="#icon-arrow-up"></use></svg></button>`;else if (btn === 'movedown') html_elementrte += `<button style="display:none" tabindex="-1" title="${util.out('Move Down')}" class="rte-movedown"><svg class="is-icon-flex" style="width:18px;height:18px;margin-top:-1px;"><use xlink:href="#icon-arrow-down"></use></svg></button>`;else if (btn === 'delete') html_elementrte += `<button style="display:none" tabindex="-1" title="${util.out('Delete')}" class="rte-delete"><svg class="is-icon-flex" style="width:18px;height:18px;margin-top:-1px;"><use xlink:href="#icon-trash"></use></svg></button>`;else if (btn === 'blocksettings' && this.builder.canvas) html_elementrte += `<button tabindex="-1" title="${util.out('Block Settings')}" class="rte-blocksettings"><svg class="is-icon-flex"><use xlink:href="#icon-settings"></use></svg></button>`;else if (btn === 'undo') html_elementrte += `<button tabindex="-1" title="${util.out('Undo')}" class="rte-undo"><svg class="is-icon-flex" style="margin-top:2px;width:15px;height:15px;"><use xlink:href="#ion-ios-undo"></use></svg></button>`;else if (btn === 'redo') html_elementrte += `<button tabindex="-1" title="${util.out('Redo')}" class="rte-redo"><svg class="is-icon-flex" style="margin-top:2px;width:15px;height:15px;"><use xlink:href="#ion-ios-redo"></use></svg></button>`;else if (btn === 'aiassistant') html_elementrte += `<button tabindex="-1" title="${util.out('AI Assistant')}" class="rte-ai"><svg class="is-icon-flex" style="width:19px;height:19px;"><use xlink:href="#icon-sparkles"></use></svg></button>`;else if (btn === 'snippets') html_elementrte += `<button tabindex="-1" title="${util.out('Snippets')}" class="rte-snippets"><svg class="is-icon-flex" style="width:19px;height:19px;"><use xlink:href="#icon-snippets"></use></svg></button>`;else if (btn === 'more' && html_elementrtemore !== '') html_elementrte += `<button tabindex="-1" title="${util.out('More')}" class="rte-more"><svg class="is-icon-flex" style="width:13px;height:13px;"><use xlink:href="#ion-more"></use></svg></button>`;else if (btn === 'pageoptions') html_elementrte += `<button tabindex="-1" title="${util.out('Page Options')}" class="rte-pageoptions"><svg class="is-icon-flex"><use xlink:href="#icon-pagesize"></use></svg></button>`;else if (btn === 'print') html_elementrte += `<button tabindex="-1" title="${util.out('Print')}" class="rte-print"><svg class="is-icon-flex" style="width:15px;height:15px;"><use xlink:href="#icon-print"></use></svg></button>`;else if (btn === 'zoom') html_elementrte += `<button tabindex="-1" title="${util.out('Zoom')}" class="rte-zoom"><svg class="is-icon-flex" style="margin-top:1px;width:15px;height:15px;"><use xlink:href="#icon-zoom-in"></use></svg></button>`;else if (btn === 'livepreview') html_elementrte += `<button tabindex="-1" title="${util.out('Live Preview')}" class="rte-livepreview"><svg class="is-icon-flex" style="margin-top:2px;width:15px;height:15px;"><use xlink:href="#icon-device-desktop"></use></svg></button>`;else if (btn === '|') {
93685
93815
  html_elementrte += '<div class="rte-separator"></div>';
93686
93816
  } else {
93687
93817
  html_elementrte += `<button tabindex="-1" title="button not found" data-plugin="${btn}"></button>`; //temporary (later will be replaced with plugin button)
@@ -93701,7 +93831,7 @@ class Rte {
93701
93831
  let html_iconrte = '';
93702
93832
  for (j = 0; j < builder.opts.iconButtonsMore.length; j++) {
93703
93833
  btn = builder.opts.iconButtonsMore[j].toLowerCase();
93704
- if (btn === 'createlink') html_iconrtemore += `<button tabindex="-1" title="${util.out('Hyperlink')}" class="rte-link"><svg class="is-icon-flex" style="width:14px;height:14px;"><use xlink:href="#ion-link"></use></svg></button>`;else if (btn === 'icon' && !this.builder.opts.emailMode) html_iconrtemore += `<button tabindex="-1" title="${util.out('Icon')}" class="rte-icon"><svg class="is-icon-flex" style="width:14px;height:14px;margin-top:2px;"><use xlink:href="#ion-android-happy"></use></svg></button>`;else if (btn === 'svg' && !this.builder.opts.emailMode) html_iconrtemore += `<button tabindex="-1" title="${util.out('SVG')}" class="rte-svg"><svg class="is-icon-flex" style="width:19px;height:19px;margin-top:2px;"><use xlink:href="#icon-svg"></use></svg></button>`;else if (btn === 'align') html_iconrtemore += `<button tabindex="-1" title="${util.out('Align')}" class="rte-align"><svg class="is-icon-flex" style="width:12px;height:12px;margin-top:-2px;"><use xlink:href="#icon-align-full"></use></svg></button>`;else if (btn === 'color') html_iconrtemore += `<button tabindex="-1" title="${util.out('Color')}" class="rte-color"><svg class="is-icon-flex" style="width:12px;height:12px;"><use xlink:href="#ion-contrast"></use></svg></button>`;else if (btn === 'gridtool') html_iconrtemore += `<button tabindex="-1" title="${util.out('Grid Tool')}" class="rte-grideditor"><svg class="is-icon-flex" style="margin-right:-3px;"><use xlink:href="#ion-grid"></use></svg></button>`;else if (btn === 'html') html_iconrtemore += `<button tabindex="-1" title="${util.out('HTML')}" class="rte-html"><svg class="is-icon-flex" style="margin-right:-3px;width:14px;height:14px;"><use xlink:href="#ion-ios-arrow-left"></use></svg><svg class="is-icon-flex" style="margin-left:-2px;width:14px;height:14px;"><use xlink:href="#ion-ios-arrow-right"></use></svg></button>`;else if (btn === 'preferences') html_iconrtemore += `<button tabindex="-1" title="${util.out('Preferences')}" class="rte-preferences"><svg class="is-icon-flex" style="width:13px;height:13px;"><use xlink:href="#ion-wrench"></use></svg></button>`;else if (btn === 'addsnippet') html_iconrtemore += `<button tabindex="-1" title="${util.out('Add Snippet')}" class="rte-addsnippet"><svg class="is-icon-flex" style="width:18px;height:18px;margin-top:-1px;"><use xlink:href="#ion-ios-plus-empty"></use></svg></button>`;else if (btn === 'textsettings') html_iconrtemore += `<button tabindex="-1" title="${util.out('Text Settings')}" class="rte-textsettings"><svg class="is-icon-flex" style="width:16px;height:16px;"><use xlink:href="#ion-ios-settings"></use></svg></button>`;else if (btn === 'undo') html_iconrtemore += `<button tabindex="-1" title="${util.out('Undo')}" class="rte-undo"><svg class="is-icon-flex" style="margin-top:2px;width:15px;height:15px;"><use xlink:href="#ion-ios-undo"></use></svg></button>`;else if (btn === 'redo') html_iconrtemore += `<button tabindex="-1" title="${util.out('Redo')}" class="rte-redo"><svg class="is-icon-flex" style="margin-top:2px;width:15px;height:15px;"><use xlink:href="#ion-ios-redo"></use></svg></button>`;else if (btn === 'aiassistant') html_iconrtemore += `<button tabindex="-1" title="${util.out('AI Assistant')}" class="rte-ai"><svg class="is-icon-flex" style="margin-top:2px;width:15px;height:15px;"><use xlink:href="#icon-message"></use></svg></button>`;else if (btn === 'snippets') html_iconrtemore += `<button tabindex="-1" title="${util.out('Snippets')}" class="rte-snippets"><svg class="is-icon-flex" style="width:19px;height:19px;"><use xlink:href="#icon-snippets"></use></svg></button>`;else if (btn === 'pageoptions') html_iconrtemore += `<button tabindex="-1" title="${util.out('Page Options')}" class="rte-pageoptions"><svg class="is-icon-flex"><use xlink:href="#icon-pagesize"></use></svg></button>`;else if (btn === 'print') html_iconrtemore += `<button tabindex="-1" title="${util.out('Print')}" class="rte-print"><svg class="is-icon-flex" style="width:15px;height:15px;"><use xlink:href="#icon-print"></use></svg></button>`;else if (btn === 'zoom') html_iconrtemore += `<button tabindex="-1" title="${util.out('Zoom')}" class="rte-zoom"><svg class="is-icon-flex" style="margin-top:1px;width:15px;height:15px;"><use xlink:href="#icon-zoom-in"></use></svg></button>`;else if (btn === 'livepreview') html_iconrtemore += `<button tabindex="-1" title="${util.out('Live Preview')}" class="rte-livepreview"><svg class="is-icon-flex" style="margin-top:2px;width:15px;height:15px;"><use xlink:href="#icon-device-desktop"></use></svg></button>`;else if (btn === '|') {
93834
+ if (btn === 'createlink') html_iconrtemore += `<button tabindex="-1" title="${util.out('Hyperlink')}" class="rte-link"><svg class="is-icon-flex" style="width:14px;height:14px;"><use xlink:href="#ion-link"></use></svg></button>`;else if (btn === 'icon' && !this.builder.opts.emailMode) html_iconrtemore += `<button tabindex="-1" title="${util.out('Icon')}" class="rte-icon"><svg class="is-icon-flex" style="width:14px;height:14px;margin-top:2px;"><use xlink:href="#ion-android-happy"></use></svg></button>`;else if (btn === 'svg' && !this.builder.opts.emailMode) html_iconrtemore += `<button tabindex="-1" title="${util.out('SVG')}" class="rte-svg"><svg class="is-icon-flex" style="width:19px;height:19px;margin-top:2px;"><use xlink:href="#icon-svg"></use></svg></button>`;else if (btn === 'align') html_iconrtemore += `<button tabindex="-1" title="${util.out('Align')}" class="rte-align"><svg class="is-icon-flex" style="width:12px;height:12px;margin-top:-2px;"><use xlink:href="#icon-align-full"></use></svg></button>`;else if (btn === 'color') html_iconrtemore += `<button tabindex="-1" title="${util.out('Color')}" class="rte-color"><svg class="is-icon-flex" style="width:12px;height:12px;"><use xlink:href="#ion-contrast"></use></svg></button>`;else if (btn === 'gridtool') html_iconrtemore += `<button tabindex="-1" title="${util.out('Grid Tool')}" class="rte-grideditor"><svg class="is-icon-flex" style="margin-right:-3px;"><use xlink:href="#ion-grid"></use></svg></button>`;else if (btn === 'html') html_iconrtemore += `<button tabindex="-1" title="${util.out('HTML')}" class="rte-html"><svg class="is-icon-flex" style="margin-right:-3px;width:14px;height:14px;"><use xlink:href="#ion-ios-arrow-left"></use></svg><svg class="is-icon-flex" style="margin-left:-2px;width:14px;height:14px;"><use xlink:href="#ion-ios-arrow-right"></use></svg></button>`;else if (btn === 'preferences') html_iconrtemore += `<button tabindex="-1" title="${util.out('Preferences')}" class="rte-preferences"><svg class="is-icon-flex" style="width:13px;height:13px;"><use xlink:href="#ion-wrench"></use></svg></button>`;else if (btn === 'addsnippet') html_iconrtemore += `<button tabindex="-1" title="${util.out('Add Snippet')}" class="rte-addsnippet"><svg class="is-icon-flex" style="width:18px;height:18px;margin-top:-1px;"><use xlink:href="#ion-ios-plus-empty"></use></svg></button>`;else if (btn === 'textsettings') html_iconrtemore += `<button tabindex="-1" title="${util.out('Text Settings')}" class="rte-textsettings"><svg class="is-icon-flex" style="width:16px;height:16px;"><use xlink:href="#ion-ios-settings"></use></svg></button>`;else if (btn === 'undo') html_iconrtemore += `<button tabindex="-1" title="${util.out('Undo')}" class="rte-undo"><svg class="is-icon-flex" style="margin-top:2px;width:15px;height:15px;"><use xlink:href="#ion-ios-undo"></use></svg></button>`;else if (btn === 'redo') html_iconrtemore += `<button tabindex="-1" title="${util.out('Redo')}" class="rte-redo"><svg class="is-icon-flex" style="margin-top:2px;width:15px;height:15px;"><use xlink:href="#ion-ios-redo"></use></svg></button>`;else if (btn === 'aiassistant') html_iconrtemore += `<button tabindex="-1" title="${util.out('AI Assistant')}" class="rte-ai"><svg class="is-icon-flex" style="width:19px;height:19px;"><use xlink:href="#icon-sparkles"></use></svg></button>`;else if (btn === 'snippets') html_iconrtemore += `<button tabindex="-1" title="${util.out('Snippets')}" class="rte-snippets"><svg class="is-icon-flex" style="width:19px;height:19px;"><use xlink:href="#icon-snippets"></use></svg></button>`;else if (btn === 'pageoptions') html_iconrtemore += `<button tabindex="-1" title="${util.out('Page Options')}" class="rte-pageoptions"><svg class="is-icon-flex"><use xlink:href="#icon-pagesize"></use></svg></button>`;else if (btn === 'print') html_iconrtemore += `<button tabindex="-1" title="${util.out('Print')}" class="rte-print"><svg class="is-icon-flex" style="width:15px;height:15px;"><use xlink:href="#icon-print"></use></svg></button>`;else if (btn === 'zoom') html_iconrtemore += `<button tabindex="-1" title="${util.out('Zoom')}" class="rte-zoom"><svg class="is-icon-flex" style="margin-top:1px;width:15px;height:15px;"><use xlink:href="#icon-zoom-in"></use></svg></button>`;else if (btn === 'livepreview') html_iconrtemore += `<button tabindex="-1" title="${util.out('Live Preview')}" class="rte-livepreview"><svg class="is-icon-flex" style="margin-top:2px;width:15px;height:15px;"><use xlink:href="#icon-device-desktop"></use></svg></button>`;else if (btn === '|') {
93705
93835
  html_iconrtemore += '<div class="rte-separator"></div>';
93706
93836
  } else {
93707
93837
  html_iconrtemore += `<button tabindex="-1" title="button not found" data-plugin="${btn}"></button>`; //temporary (later will be replaced with plugin button)
@@ -93710,7 +93840,7 @@ class Rte {
93710
93840
 
93711
93841
  for (j = 0; j < builder.opts.iconButtons.length; j++) {
93712
93842
  btn = builder.opts.iconButtons[j].toLowerCase();
93713
- if (btn === 'createlink') html_iconrte += `<button tabindex="-1" title="${util.out('Hyperlink')}" class="rte-link"><svg class="is-icon-flex" style="width:14px;height:14px;"><use xlink:href="#ion-link"></use></svg></button>`;else if (btn === 'icon' && !this.builder.opts.emailMode) html_iconrte += `<button tabindex="-1" title="${util.out('Icon')}" class="rte-icon"><svg class="is-icon-flex" style="width:14px;height:14px;margin-top:2px;"><use xlink:href="#ion-android-happy"></use></svg></button>`;else if (btn === 'svg' && !this.builder.opts.emailMode) html_iconrte += `<button tabindex="-1" title="${util.out('SVG')}" class="rte-svg"><svg class="is-icon-flex" style="width:19px;height:19px;margin-top:2px;"><use xlink:href="#icon-svg"></use></svg></button>`;else if (btn === 'align') html_iconrte += `<button tabindex="-1" title="${util.out('Align')}" class="rte-align"><svg class="is-icon-flex" style="width:12px;height:12px;margin-top:-2px;"><use xlink:href="#icon-align-full"></use></svg></button>`;else if (btn === 'color') html_iconrte += `<button tabindex="-1" title="${util.out('Color')}" class="rte-color"><svg class="is-icon-flex" style="width:12px;height:12px;"><use xlink:href="#ion-contrast"></use></svg></button>`;else if (btn === 'gridtool') html_iconrte += `<button tabindex="-1" title="${util.out('Grid Tool')}" class="rte-grideditor"><svg class="is-icon-flex" style="margin-right:-3px;"><use xlink:href="#ion-grid"></use></svg></button>`;else if (btn === 'html') html_iconrte += `<button tabindex="-1" title="${util.out('HTML')}" class="rte-html"><svg class="is-icon-flex" style="margin-right:-3px;width:14px;height:14px;"><use xlink:href="#ion-ios-arrow-left"></use></svg><svg class="is-icon-flex" style="margin-left:-2px;width:14px;height:14px;"><use xlink:href="#ion-ios-arrow-right"></use></svg></button>`;else if (btn === 'preferences') html_iconrte += `<button tabindex="-1" title="${util.out('Preferences')}" class="rte-preferences"><svg class="is-icon-flex" style="width:13px;height:13px;"><use xlink:href="#ion-wrench"></use></svg></button>`;else if (btn === 'addsnippet') html_iconrte += `<button tabindex="-1" title="${util.out('Add Snippet')}" class="rte-addsnippet"><svg class="is-icon-flex" style="width:18px;height:18px;margin-top:-1px;"><use xlink:href="#ion-ios-plus-empty"></use></svg></button>`;else if (btn === 'textsettings') html_iconrte += `<button tabindex="-1" title="${util.out('Text Settings')}" class="rte-textsettings"><svg class="is-icon-flex" style="width:16px;height:16px;"><use xlink:href="#ion-ios-settings"></use></svg></button>`;else if (btn === 'undo') html_iconrte += `<button tabindex="-1" title="${util.out('Undo')}" class="rte-undo"><svg class="is-icon-flex" style="margin-top:2px;width:15px;height:15px;"><use xlink:href="#ion-ios-undo"></use></svg></button>`;else if (btn === 'redo') html_iconrte += `<button tabindex="-1" title="${util.out('Redo')}" class="rte-redo"><svg class="is-icon-flex" style="margin-top:2px;width:15px;height:15px;"><use xlink:href="#ion-ios-redo"></use></svg></button>`;else if (btn === 'aiassistant') html_iconrte += `<button tabindex="-1" title="${util.out('AI Assistant')}" class="rte-ai"><svg class="is-icon-flex" style="margin-top:2px;width:15px;height:15px;"><use xlink:href="#icon-message"></use></svg></button>`;else if (btn === 'snippets') html_iconrte += `<button tabindex="-1" title="${util.out('Snippets')}" class="rte-snippets"><svg class="is-icon-flex" style="width:19px;height:19px;"><use xlink:href="#icon-snippets"></use></svg></button>`;else if (btn === 'pageoptions') html_iconrte += `<button tabindex="-1" title="${util.out('Page Options')}" class="rte-pageoptions"><svg class="is-icon-flex"><use xlink:href="#icon-pagesize"></use></svg></button>`;else if (btn === 'print') html_iconrte += `<button tabindex="-1" title="${util.out('Print')}" class="rte-print"><svg class="is-icon-flex" style="width:15px;height:15px;"><use xlink:href="#icon-print"></use></svg></button>`;else if (btn === 'zoom') html_iconrte += `<button tabindex="-1" title="${util.out('Zoom')}" class="rte-zoom"><svg class="is-icon-flex" style="margin-top:1px;width:15px;height:15px;"><use xlink:href="#icon-zoom-in"></use></svg></button>`;else if (btn === 'livepreview') html_iconrte += `<button tabindex="-1" title="${util.out('Live Preview')}" class="rte-livepreview"><svg class="is-icon-flex" style="margin-top:2px;width:15px;height:15px;"><use xlink:href="#icon-device-desktop"></use></svg></button>`;else if (btn === 'more' && html_rtemore !== '') html_iconrte += `<button tabindex="-1" title="${util.out('More')}" class="rte-more"><svg class="is-icon-flex" style="width:13px;height:13px;"><use xlink:href="#ion-more"></use></svg></button>`;else if (btn === '|') {
93843
+ if (btn === 'createlink') html_iconrte += `<button tabindex="-1" title="${util.out('Hyperlink')}" class="rte-link"><svg class="is-icon-flex" style="width:14px;height:14px;"><use xlink:href="#ion-link"></use></svg></button>`;else if (btn === 'icon' && !this.builder.opts.emailMode) html_iconrte += `<button tabindex="-1" title="${util.out('Icon')}" class="rte-icon"><svg class="is-icon-flex" style="width:14px;height:14px;margin-top:2px;"><use xlink:href="#ion-android-happy"></use></svg></button>`;else if (btn === 'svg' && !this.builder.opts.emailMode) html_iconrte += `<button tabindex="-1" title="${util.out('SVG')}" class="rte-svg"><svg class="is-icon-flex" style="width:19px;height:19px;margin-top:2px;"><use xlink:href="#icon-svg"></use></svg></button>`;else if (btn === 'align') html_iconrte += `<button tabindex="-1" title="${util.out('Align')}" class="rte-align"><svg class="is-icon-flex" style="width:12px;height:12px;margin-top:-2px;"><use xlink:href="#icon-align-full"></use></svg></button>`;else if (btn === 'color') html_iconrte += `<button tabindex="-1" title="${util.out('Color')}" class="rte-color"><svg class="is-icon-flex" style="width:12px;height:12px;"><use xlink:href="#ion-contrast"></use></svg></button>`;else if (btn === 'gridtool') html_iconrte += `<button tabindex="-1" title="${util.out('Grid Tool')}" class="rte-grideditor"><svg class="is-icon-flex" style="margin-right:-3px;"><use xlink:href="#ion-grid"></use></svg></button>`;else if (btn === 'html') html_iconrte += `<button tabindex="-1" title="${util.out('HTML')}" class="rte-html"><svg class="is-icon-flex" style="margin-right:-3px;width:14px;height:14px;"><use xlink:href="#ion-ios-arrow-left"></use></svg><svg class="is-icon-flex" style="margin-left:-2px;width:14px;height:14px;"><use xlink:href="#ion-ios-arrow-right"></use></svg></button>`;else if (btn === 'preferences') html_iconrte += `<button tabindex="-1" title="${util.out('Preferences')}" class="rte-preferences"><svg class="is-icon-flex" style="width:13px;height:13px;"><use xlink:href="#ion-wrench"></use></svg></button>`;else if (btn === 'addsnippet') html_iconrte += `<button tabindex="-1" title="${util.out('Add Snippet')}" class="rte-addsnippet"><svg class="is-icon-flex" style="width:18px;height:18px;margin-top:-1px;"><use xlink:href="#ion-ios-plus-empty"></use></svg></button>`;else if (btn === 'textsettings') html_iconrte += `<button tabindex="-1" title="${util.out('Text Settings')}" class="rte-textsettings"><svg class="is-icon-flex" style="width:16px;height:16px;"><use xlink:href="#ion-ios-settings"></use></svg></button>`;else if (btn === 'undo') html_iconrte += `<button tabindex="-1" title="${util.out('Undo')}" class="rte-undo"><svg class="is-icon-flex" style="margin-top:2px;width:15px;height:15px;"><use xlink:href="#ion-ios-undo"></use></svg></button>`;else if (btn === 'redo') html_iconrte += `<button tabindex="-1" title="${util.out('Redo')}" class="rte-redo"><svg class="is-icon-flex" style="margin-top:2px;width:15px;height:15px;"><use xlink:href="#ion-ios-redo"></use></svg></button>`;else if (btn === 'aiassistant') html_iconrte += `<button tabindex="-1" title="${util.out('AI Assistant')}" class="rte-ai"><svg class="is-icon-flex" style="width:19px;height:19px;"><use xlink:href="#icon-sparkles"></use></svg></button>`;else if (btn === 'snippets') html_iconrte += `<button tabindex="-1" title="${util.out('Snippets')}" class="rte-snippets"><svg class="is-icon-flex" style="width:19px;height:19px;"><use xlink:href="#icon-snippets"></use></svg></button>`;else if (btn === 'pageoptions') html_iconrte += `<button tabindex="-1" title="${util.out('Page Options')}" class="rte-pageoptions"><svg class="is-icon-flex"><use xlink:href="#icon-pagesize"></use></svg></button>`;else if (btn === 'print') html_iconrte += `<button tabindex="-1" title="${util.out('Print')}" class="rte-print"><svg class="is-icon-flex" style="width:15px;height:15px;"><use xlink:href="#icon-print"></use></svg></button>`;else if (btn === 'zoom') html_iconrte += `<button tabindex="-1" title="${util.out('Zoom')}" class="rte-zoom"><svg class="is-icon-flex" style="margin-top:1px;width:15px;height:15px;"><use xlink:href="#icon-zoom-in"></use></svg></button>`;else if (btn === 'livepreview') html_iconrte += `<button tabindex="-1" title="${util.out('Live Preview')}" class="rte-livepreview"><svg class="is-icon-flex" style="margin-top:2px;width:15px;height:15px;"><use xlink:href="#icon-device-desktop"></use></svg></button>`;else if (btn === 'more' && html_rtemore !== '') html_iconrte += `<button tabindex="-1" title="${util.out('More')}" class="rte-more"><svg class="is-icon-flex" style="width:13px;height:13px;"><use xlink:href="#ion-more"></use></svg></button>`;else if (btn === '|') {
93714
93844
  html_iconrte += '<div class="rte-separator"></div>';
93715
93845
  } else {
93716
93846
  html_iconrte += `<button tabindex="-1" title="button not found" data-plugin="${btn}"></button>`; //temporary (later will be replaced with plugin button)
@@ -106939,7 +107069,7 @@ class MediaPicker {
106939
107069
  if (this.builder.opts.onImageSelectClick || this.builder.opts.imageselect || this.builder.opts.onFileSelectClick || this.builder.opts.fileselect) {
106940
107070
  const inpSrc = modalMediaSelect.querySelector('.input-src');
106941
107071
  const elm = modalMediaSelect.querySelector('.input-select');
106942
- if (elm) dom.addEventListener(elm, 'click', () => {
107072
+ if (elm) dom.addEventListener(elm, 'click', async () => {
106943
107073
  let targetAssetType = this.builder.targetAssetType;
106944
107074
  let targetInput = inpSrc;
106945
107075
  let theTrigger = elm;
@@ -106981,28 +107111,65 @@ class MediaPicker {
106981
107111
  } else {
106982
107112
  let iframe;
106983
107113
  let modal;
106984
- if (targetAssetType === 'media') {
106985
- modal = this.builder.builderStuff.querySelector('.is-modal.mediaselect');
106986
- iframe = modal.querySelector('iframe');
106987
- if (iframe.src === 'about:blank') {
106988
- if (this.builder.opts.mediaSelect) iframe.src = this.builder.opts.mediaSelect;else if (this.builder.opts.imageSelect) iframe.src = this.builder.opts.imageSelect;
107114
+ if (this.builder.opts.assetManagerBasePath) {
107115
+ let src;
107116
+ if (targetAssetType === 'media') {
107117
+ modal = this.builder.builderStuff.querySelector('.is-modal.mediaselect');
107118
+ iframe = modal.querySelector('iframe');
107119
+ if (iframe.src === 'about:blank') {
107120
+ if (this.builder.opts.mediaSelect) src = this.builder.opts.mediaSelect;else if (this.builder.opts.imageSelect) src = this.builder.opts.imageSelect;
107121
+ }
107122
+ } else if (targetAssetType === 'video') {
107123
+ modal = this.builder.builderStuff.querySelector('.is-modal.videoselect');
107124
+ iframe = modal.querySelector('iframe');
107125
+ if (iframe.src === 'about:blank') src = this.builder.opts.videoSelect;
107126
+ } else if (targetAssetType === 'image') {
107127
+ modal = this.builder.builderStuff.querySelector('.is-modal.imageselect');
107128
+ iframe = modal.querySelector('iframe');
107129
+ if (iframe.src === 'about:blank') src = this.builder.opts.imageSelect;
107130
+ } else if (targetAssetType === 'audio') {
107131
+ modal = this.builder.builderStuff.querySelector('.is-modal.audioselect');
107132
+ iframe = modal.querySelector('iframe');
107133
+ if (iframe.src === 'about:blank') src = this.builder.opts.audioSelect;
107134
+ } else if (targetAssetType === 'all') {
107135
+ modal = this.builder.builderStuff.querySelector('.is-modal.fileselect');
107136
+ iframe = modal.querySelector('iframe');
107137
+ if (iframe.src === 'about:blank') src = this.builder.opts.fileSelect;
107138
+ }
107139
+ let result = await fetch(src);
107140
+ result = await result.text();
107141
+ result = result.replace(/<script>/g, `${this.builder.nonce ? `<script nonce="${this.builder.nonce}">` : '<script>'}`);
107142
+
107143
+ // Add base href
107144
+ result = result.replace(/<head>/i, '<head><base href="' + this.builder.opts.assetManagerBasePath + '">');
107145
+
107146
+ // Replace assets path
107147
+ result = result.replace(/="assets\//g, '="' + this.builder.opts.assetPath);
107148
+ iframe.srcdoc = result;
107149
+ } else {
107150
+ if (targetAssetType === 'media') {
107151
+ modal = this.builder.builderStuff.querySelector('.is-modal.mediaselect');
107152
+ iframe = modal.querySelector('iframe');
107153
+ if (iframe.src === 'about:blank') {
107154
+ if (this.builder.opts.mediaSelect) iframe.src = this.builder.opts.mediaSelect;else if (this.builder.opts.imageSelect) iframe.src = this.builder.opts.imageSelect;
107155
+ }
107156
+ } else if (targetAssetType === 'video') {
107157
+ modal = this.builder.builderStuff.querySelector('.is-modal.videoselect');
107158
+ iframe = modal.querySelector('iframe');
107159
+ if (iframe.src === 'about:blank') iframe.src = this.builder.opts.videoSelect;
107160
+ } else if (targetAssetType === 'image') {
107161
+ modal = this.builder.builderStuff.querySelector('.is-modal.imageselect');
107162
+ iframe = modal.querySelector('iframe');
107163
+ if (iframe.src === 'about:blank') iframe.src = this.builder.opts.imageSelect;
107164
+ } else if (targetAssetType === 'audio') {
107165
+ modal = this.builder.builderStuff.querySelector('.is-modal.audioselect');
107166
+ iframe = modal.querySelector('iframe');
107167
+ if (iframe.src === 'about:blank') iframe.src = this.builder.opts.audioSelect;
107168
+ } else if (targetAssetType === 'all') {
107169
+ modal = this.builder.builderStuff.querySelector('.is-modal.fileselect');
107170
+ iframe = modal.querySelector('iframe');
107171
+ if (iframe.src === 'about:blank') iframe.src = this.builder.opts.fileSelect;
106989
107172
  }
106990
- } else if (targetAssetType === 'video') {
106991
- modal = this.builder.builderStuff.querySelector('.is-modal.videoselect');
106992
- iframe = modal.querySelector('iframe');
106993
- if (iframe.src === 'about:blank') iframe.src = this.builder.opts.videoSelect;
106994
- } else if (targetAssetType === 'image') {
106995
- modal = this.builder.builderStuff.querySelector('.is-modal.imageselect');
106996
- iframe = modal.querySelector('iframe');
106997
- if (iframe.src === 'about:blank') iframe.src = this.builder.opts.imageSelect;
106998
- } else if (targetAssetType === 'audio') {
106999
- modal = this.builder.builderStuff.querySelector('.is-modal.audioselect');
107000
- iframe = modal.querySelector('iframe');
107001
- if (iframe.src === 'about:blank') iframe.src = this.builder.opts.audioSelect;
107002
- } else if (targetAssetType === 'all') {
107003
- modal = this.builder.builderStuff.querySelector('.is-modal.fileselect');
107004
- iframe = modal.querySelector('iframe');
107005
- if (iframe.src === 'about:blank') iframe.src = this.builder.opts.fileSelect;
107006
107173
  }
107007
107174
 
107008
107175
  // this.builder.util.showModal(modal);
@@ -107134,12 +107301,20 @@ class MediaPicker {
107134
107301
  const btnImageOk = modalMediaSelect.querySelector('.input-ok');
107135
107302
  dom.addEventListener(btnImageOk, 'click', () => {
107136
107303
  const inpSrc = modalMediaSelect.querySelector('.input-src');
107137
- const url = inpSrc.value;
107304
+ let url = inpSrc.value;
107305
+
107306
+ // base64 handling: Apply base64 data
107307
+ if (url === '[Image Data]') {
107308
+ url = this.builder.base64Data;
107309
+ this.builder.base64Data = '';
107310
+ }
107138
107311
  if (this.builder.mediaSelectedCallback) this.builder.mediaSelectedCallback(url);
107139
107312
  this.builder.hideModal(modalMediaSelect);
107140
107313
  });
107141
107314
  const btnImageCancel = modalMediaSelect.querySelector('.input-cancel');
107142
107315
  dom.addEventListener(btnImageCancel, 'click', () => {
107316
+ // base64 handling: Clear previously saved base64 data
107317
+ this.builder.base64Data = '';
107143
107318
  this.builder.hideModal(modalMediaSelect);
107144
107319
  });
107145
107320
  }
@@ -118855,6 +119030,8 @@ class ContentBuilder {
118855
119030
  livePreviewReloadEvery: 30,
118856
119031
  // always reload every 30 onChange triggered (to clearup iframe resource for faster performance)
118857
119032
 
119033
+ basePath: '',
119034
+ snippetsFolder: 'minimalist-blocks',
118858
119035
  scriptPath: '',
118859
119036
  // Deprecated
118860
119037
  // Old way:
@@ -119931,6 +120108,16 @@ Add an image for each feature.`, 'Create a new content showcasing a photo galler
119931
120108
  // obj.preserveSelection = true; (can be set programmatically) to prevent click that clears selection on external custom modal.
119932
120109
 
119933
120110
  this.opts = Object.assign(this, defaults, opts);
120111
+ if (this.opts.basePath) {
120112
+ this.opts.assetPath = this.opts.basePath + 'assets/';
120113
+ this.opts.fontAssetPath = this.opts.basePath + 'assets/fonts/';
120114
+ this.opts.snippetUrl = this.opts.basePath + 'assets/' + this.opts.snippetsFolder + '/content.js';
120115
+ this.opts.snippetPath = this.opts.basePath + 'assets/' + this.opts.snippetsFolder + '/';
120116
+ this.opts.snippetPathReplace = ['assets/' + this.opts.snippetsFolder + '/images/', this.opts.basePath + 'assets/' + this.opts.snippetsFolder + '/images/'];
120117
+ this.opts.modulePath = this.opts.basePath + 'assets/modules/';
120118
+ this.opts.pluginPath = this.opts.basePath + 'contentbuilder/';
120119
+ this.opts.mediaPath = this.opts.basePath + 'assets/gallery/';
120120
+ }
119934
120121
  if (window.data_basic) {
119935
120122
  // if snippet file included
119936
120123
  this.opts.snippetJSON = window.data_basic;
@@ -122849,7 +123036,14 @@ Add an image for each feature.`, 'Create a new content showcasing a photo galler
122849
123036
  Array.prototype.forEach.call(forms, formUpload => {
122850
123037
  if (this.dom.hasClass(formUpload, 'please-wait')) {
122851
123038
  this.dom.removeClass(formUpload, 'please-wait');
122852
- if (s) formUpload.parentNode.parentNode.querySelector('input[type="text"]').value = s;
123039
+ if (s) {
123040
+ // base64 handling: save the value and display "[Image Data]"
123041
+ if (s.startsWith('data:')) {
123042
+ this.base64Data = s;
123043
+ s = '[Image Data]';
123044
+ }
123045
+ formUpload.parentNode.parentNode.querySelector('input[type="text"]').value = s;
123046
+ }
122853
123047
  formUpload.parentNode.parentNode.querySelector('input[type="file"]').value = '';
122854
123048
  }
122855
123049
  });
@@ -122890,6 +123084,7 @@ Add an image for each feature.`, 'Create a new content showcasing a photo galler
122890
123084
  this.selectAsset(s);
122891
123085
  }
122892
123086
  selectAsset(s, f) {
123087
+ if (this.opts.assetAbsoluteBasePath) s = this.opts.assetAbsoluteBasePath + s;
122893
123088
  let extension = s.split('.').pop().split('?')[0].split('#')[0]; //
122894
123089
  extension = extension.toLowerCase();
122895
123090
  let ok = false;
@@ -122914,7 +123109,7 @@ Add an image for each feature.`, 'Create a new content showcasing a photo galler
122914
123109
  alert(this.util.out('Please select an mp4 file.'));
122915
123110
  }
122916
123111
  } else if (this.targetAssetType === 'audio') {
122917
- if (extension === 'mp3') {
123112
+ if (extension === 'mp3' || extension === 'wav') {
122918
123113
  ok = true;
122919
123114
  } else {
122920
123115
  alert(this.util.out('Please select an mp3 file.'));
@@ -123004,7 +123199,7 @@ Add an image for each feature.`, 'Create a new content showcasing a photo galler
123004
123199
  ok = true;
123005
123200
  } else if (targetAssetType === 'video' && ext === 'mp4') {
123006
123201
  ok = true;
123007
- } else if (targetAssetType === 'audio' && ext === 'mp3') {
123202
+ } else if (targetAssetType === 'audio' && (ext === 'mp3' || ext === 'wav')) {
123008
123203
  ok = true;
123009
123204
  } else if (targetAssetType === 'media' && (s.includes('base64') || ext === 'mp4' || ext === 'jpg' || ext === 'jpeg' || ext === 'png' || ext === 'gif' || ext === 'webm' || ext === 'webp')) {
123010
123205
  ok = true;
@@ -123068,7 +123263,7 @@ Add an image for each feature.`, 'Create a new content showcasing a photo galler
123068
123263
  alert(out('Please select an image file.'));
123069
123264
  }
123070
123265
  } else if (targetAssetType === 'audio') {
123071
- if (extension === 'mp3') {
123266
+ if (extension === 'mp3' || extension === 'wav') {
123072
123267
  ok = true;
123073
123268
  } else {
123074
123269
  alert(out('Please select an mp3 file.'));
@@ -123107,7 +123302,7 @@ Add an image for each feature.`, 'Create a new content showcasing a photo galler
123107
123302
  this.targetAssetType = targetAssetType;
123108
123303
  }
123109
123304
  }
123110
- openAsset(targetInput, targetAssetType, theTrigger, defaultValue) {
123305
+ async openAsset(targetInput, targetAssetType, theTrigger, defaultValue) {
123111
123306
  let iframe;
123112
123307
  let modal;
123113
123308
  if (targetAssetType === 'media' && (this.opts.onMediaSelectClick || this.opts.onImageSelectClick)) {
@@ -123143,28 +123338,65 @@ Add an image for each feature.`, 'Create a new content showcasing a photo galler
123143
123338
  theTrigger: theTrigger
123144
123339
  });
123145
123340
  } else {
123146
- if (targetAssetType === 'media') {
123147
- modal = this.builderStuff.querySelector('.is-modal.mediaselect');
123148
- iframe = modal.querySelector('iframe');
123149
- if (iframe.src === 'about:blank') {
123150
- if (this.opts.mediaSelect) iframe.src = this.opts.mediaSelect;else if (this.opts.imageSelect) iframe.src = this.opts.imageSelect;
123151
- }
123152
- } else if (targetAssetType === 'video') {
123153
- modal = this.builderStuff.querySelector('.is-modal.videoselect');
123154
- iframe = modal.querySelector('iframe');
123155
- if (iframe.src === 'about:blank') iframe.src = this.opts.videoSelect;
123156
- } else if (targetAssetType === 'image') {
123157
- modal = this.builderStuff.querySelector('.is-modal.imageselect');
123158
- iframe = modal.querySelector('iframe');
123159
- if (iframe.src === 'about:blank') iframe.src = this.opts.imageSelect;
123160
- } else if (targetAssetType === 'audio') {
123161
- modal = this.builderStuff.querySelector('.is-modal.audioselect');
123162
- iframe = modal.querySelector('iframe');
123163
- if (iframe.src === 'about:blank') iframe.src = this.opts.audioSelect;
123164
- } else if (targetAssetType === 'all') {
123165
- modal = this.builderStuff.querySelector('.is-modal.fileselect');
123166
- iframe = modal.querySelector('iframe');
123167
- if (iframe.src === 'about:blank') iframe.src = this.opts.fileSelect;
123341
+ if (this.opts.assetManagerBasePath) {
123342
+ let src;
123343
+ if (targetAssetType === 'media') {
123344
+ modal = this.builderStuff.querySelector('.is-modal.mediaselect');
123345
+ iframe = modal.querySelector('iframe');
123346
+ if (iframe.src === 'about:blank') {
123347
+ if (this.opts.mediaSelect) src = this.opts.mediaSelect;else if (this.opts.imageSelect) src = this.opts.imageSelect;
123348
+ }
123349
+ } else if (targetAssetType === 'video') {
123350
+ modal = this.builderStuff.querySelector('.is-modal.videoselect');
123351
+ iframe = modal.querySelector('iframe');
123352
+ if (iframe.src === 'about:blank') src = this.opts.videoSelect;
123353
+ } else if (targetAssetType === 'image') {
123354
+ modal = this.builderStuff.querySelector('.is-modal.imageselect');
123355
+ iframe = modal.querySelector('iframe');
123356
+ if (iframe.src === 'about:blank') src = this.opts.imageSelect;
123357
+ } else if (targetAssetType === 'audio') {
123358
+ modal = this.builderStuff.querySelector('.is-modal.audioselect');
123359
+ iframe = modal.querySelector('iframe');
123360
+ if (iframe.src === 'about:blank') src = this.opts.audioSelect;
123361
+ } else if (targetAssetType === 'all') {
123362
+ modal = this.builderStuff.querySelector('.is-modal.fileselect');
123363
+ iframe = modal.querySelector('iframe');
123364
+ if (iframe.src === 'about:blank') src = this.opts.fileSelect;
123365
+ }
123366
+ let result = await fetch(src);
123367
+ result = await result.text();
123368
+ result = result.replace(/<script>/g, `${this.nonce ? `<script nonce="${this.nonce}">` : '<script>'}`);
123369
+
123370
+ // Add base href
123371
+ result = result.replace(/<head>/i, '<head><base href="' + this.opts.assetManagerBasePath + '">');
123372
+
123373
+ // Replace assets path
123374
+ result = result.replace(/="assets\//g, '="' + this.opts.assetPath);
123375
+ iframe.srcdoc = result;
123376
+ } else {
123377
+ if (targetAssetType === 'media') {
123378
+ modal = this.builderStuff.querySelector('.is-modal.mediaselect');
123379
+ iframe = modal.querySelector('iframe');
123380
+ if (iframe.src === 'about:blank') {
123381
+ if (this.opts.mediaSelect) iframe.src = this.opts.mediaSelect;else if (this.opts.imageSelect) iframe.src = this.opts.imageSelect;
123382
+ }
123383
+ } else if (targetAssetType === 'video') {
123384
+ modal = this.builderStuff.querySelector('.is-modal.videoselect');
123385
+ iframe = modal.querySelector('iframe');
123386
+ if (iframe.src === 'about:blank') iframe.src = this.opts.videoSelect;
123387
+ } else if (targetAssetType === 'image') {
123388
+ modal = this.builderStuff.querySelector('.is-modal.imageselect');
123389
+ iframe = modal.querySelector('iframe');
123390
+ if (iframe.src === 'about:blank') iframe.src = this.opts.imageSelect;
123391
+ } else if (targetAssetType === 'audio') {
123392
+ modal = this.builderStuff.querySelector('.is-modal.audioselect');
123393
+ iframe = modal.querySelector('iframe');
123394
+ if (iframe.src === 'about:blank') iframe.src = this.opts.audioSelect;
123395
+ } else if (targetAssetType === 'all') {
123396
+ modal = this.builderStuff.querySelector('.is-modal.fileselect');
123397
+ iframe = modal.querySelector('iframe');
123398
+ if (iframe.src === 'about:blank') iframe.src = this.opts.fileSelect;
123399
+ }
123168
123400
  }
123169
123401
  this.util.showModal(modal, false, () => {
123170
123402
  theTrigger.removeAttribute('data-focus');
@@ -153800,13 +154032,30 @@ class IframePanel {
153800
154032
 
153801
154033
  }
153802
154034
 
153803
- loadIframe() {
154035
+ async loadIframe() {
153804
154036
  let iframe = this.editPanel.querySelector('iframe');
153805
154037
 
153806
154038
  if (this.blankHtml !== '') {
153807
154039
  iframe.srcdoc = this.blankHtml;
153808
154040
  } else if (this.src !== '') {
154041
+ /*
153809
154042
  iframe.setAttribute('src', this.src);
154043
+ */
154044
+ if (this.src.indexOf('http') !== 0) {
154045
+ iframe.setAttribute('src', this.src);
154046
+ } else {
154047
+ let result = await fetch(this.src);
154048
+ result = await result.text();
154049
+ result = result.replace(/<script>/g, `${this.builder.nonce ? `<script nonce="${this.builder.nonce}">` : '<script>'}`); // Add base href
154050
+ // let blankPageBasePath = this.src.slice(0, this.src.lastIndexOf('/') + 1);
154051
+ // result = result.replace(/<head>/i, '<head><base href="' +blankPageBasePath+ '">');
154052
+
154053
+ if (this.builder.blankPageBasePath) {
154054
+ result = result.replace(/<head>/i, '<head><base href="' + this.builder.blankPageBasePath + '">');
154055
+ }
154056
+
154057
+ iframe.srcdoc = result;
154058
+ }
153810
154059
  } else {
153811
154060
  alert('Please specify src attribute.');
153812
154061
  }
@@ -160238,6 +160487,8 @@ Add an image for each feature.`, 'Create a new block showcasing a photo gallery
160238
160487
 
160239
160488
  editorSetup() {
160240
160489
  this.editor = new ContentBuilder({
160490
+ assetManagerBasePath: this.settings.assetManagerBasePath || '',
160491
+ assetAbsoluteBasePath: this.settings.assetAbsoluteBasePath || '',
160241
160492
  metadata: this.settings.metadata,
160242
160493
  enableDictation: this.settings.enableDictation,
160243
160494
  onStartRequest: this.settings.onStartRequest,