@innovastudio/contentbuilder 1.4.128 → 1.4.130
Sign up to get free protection for your applications and to get access to all the features.
package/package.json
CHANGED
@@ -1158,18 +1158,20 @@ class Util {
|
|
1158
1158
|
this.builder.activeIcon = null;
|
1159
1159
|
|
1160
1160
|
// RTE
|
1161
|
-
|
1162
|
-
|
1163
|
-
|
1164
|
-
|
1165
|
-
|
1166
|
-
|
1167
|
-
|
1168
|
-
|
1169
|
-
|
1170
|
-
|
1171
|
-
|
1172
|
-
|
1161
|
+
if (!this.builder.controlPanel) {
|
1162
|
+
let rteTool = builderStuff.querySelector('.is-rte-tool');
|
1163
|
+
// rteTool.style.display = 'none';
|
1164
|
+
let rteButtons = rteTool.querySelectorAll('button');
|
1165
|
+
Array.prototype.forEach.call(rteButtons, rteButton => {
|
1166
|
+
dom.removeClass(rteButton, 'on');
|
1167
|
+
});
|
1168
|
+
let elementRteTool = builderStuff.querySelector('.is-elementrte-tool');
|
1169
|
+
// rteTool.style.display = 'none';
|
1170
|
+
rteButtons = elementRteTool.querySelectorAll('button');
|
1171
|
+
Array.prototype.forEach.call(rteButtons, rteButton => {
|
1172
|
+
dom.removeClass(rteButton, 'on');
|
1173
|
+
});
|
1174
|
+
}
|
1173
1175
|
let pops = builderStuff.querySelectorAll('.is-pop');
|
1174
1176
|
Array.prototype.forEach.call(pops, pop => {
|
1175
1177
|
pop.style.display = '';
|
@@ -1247,7 +1249,7 @@ class Util {
|
|
1247
1249
|
this.builder.activeIcon = null;
|
1248
1250
|
this.builder.inspectedElement = null;
|
1249
1251
|
this.builder.activeElement = null;
|
1250
|
-
if (all) {
|
1252
|
+
if (all && !this.builder.controlPanel) {
|
1251
1253
|
// RTE
|
1252
1254
|
let rtetool = builderStuff.querySelector('.is-rte-tool');
|
1253
1255
|
if (rtetool) rtetool.style.display = 'none';
|
@@ -1378,17 +1380,19 @@ class Util {
|
|
1378
1380
|
});
|
1379
1381
|
|
1380
1382
|
// RTE
|
1381
|
-
if (this.builder.
|
1382
|
-
|
1383
|
-
|
1384
|
-
|
1385
|
-
|
1383
|
+
if (!this.builder.controlPanel) {
|
1384
|
+
if (this.builder.toolbarDisplay === 'auto') {
|
1385
|
+
let rtetool = builderStuff.querySelector('.is-rte-tool');
|
1386
|
+
if (rtetool) rtetool.style.display = 'none';
|
1387
|
+
let elementRtetool = builderStuff.querySelector('.is-elementrte-tool');
|
1388
|
+
if (elementRtetool) elementRtetool.style.display = 'none';
|
1386
1389
|
|
1387
|
-
|
1388
|
-
|
1389
|
-
|
1390
|
-
|
1391
|
-
|
1390
|
+
// Click ok on code view should hide these as well
|
1391
|
+
let rtetoolmore = builderStuff.querySelector('.rte-more-options');
|
1392
|
+
if (rtetoolmore) rtetoolmore.style.display = '';
|
1393
|
+
let elementRtetoolmore = builderStuff.querySelector('.elementrte-more-options');
|
1394
|
+
if (elementRtetoolmore) elementRtetoolmore.style.display = '';
|
1395
|
+
}
|
1392
1396
|
}
|
1393
1397
|
|
1394
1398
|
// Element
|
@@ -1396,13 +1400,15 @@ class Util {
|
|
1396
1400
|
Array.prototype.forEach.call(elms, elm => {
|
1397
1401
|
dom.removeClass(elm, 'elm-active');
|
1398
1402
|
});
|
1399
|
-
|
1400
|
-
|
1401
|
-
|
1402
|
-
|
1403
|
-
|
1404
|
-
|
1405
|
-
|
1403
|
+
if (!this.builder.controlPanel) {
|
1404
|
+
let rtepops = builderStuff.querySelectorAll('.is-rte-pop');
|
1405
|
+
Array.prototype.forEach.call(rtepops, rtepop => {
|
1406
|
+
rtepop.style.display = '';
|
1407
|
+
dom.removeClass(rtepop, 'active');
|
1408
|
+
dom.removeClass(rtepop, 'deactive');
|
1409
|
+
// dom.addClass(rtepop, 'deactive');
|
1410
|
+
});
|
1411
|
+
}
|
1406
1412
|
|
1407
1413
|
let pops = builderStuff.querySelectorAll('.is-pop');
|
1408
1414
|
Array.prototype.forEach.call(pops, pop => {
|
@@ -11844,12 +11850,45 @@ const prepareSvgIcons = builder => {
|
|
11844
11850
|
<path d="M5 10h11a4 4 0 1 1 0 8h-1"></path>
|
11845
11851
|
</symbol>
|
11846
11852
|
<symbol id="icon-publish" viewBox="0 0 24 24" stroke-width="1.4" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
11847
|
-
|
11848
|
-
|
11849
|
-
|
11853
|
+
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
|
11854
|
+
<path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path>
|
11855
|
+
<path d="M9 12l2 2l4 -4"></path>
|
11856
|
+
</symbol>
|
11857
|
+
|
11858
|
+
<symbol id="icon-align-box-top" viewBox="0 0 24 24" stroke-width="1.4" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
11859
|
+
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
|
11860
|
+
<path d="M3 3m0 2a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2z" />
|
11861
|
+
<path d="M15 10h-7" />
|
11862
|
+
<path d="M15 7h-7" />
|
11863
|
+
</symbol>
|
11864
|
+
<symbol id="icon-align-box-middle" viewBox="0 0 24 24" stroke-width="1.4" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
11865
|
+
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
|
11866
|
+
<path d="M3 3m0 2a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2z" />
|
11867
|
+
<path d="M15 13h-7" />
|
11868
|
+
<path d="M15 10h-7" />
|
11869
|
+
</symbol>
|
11870
|
+
<symbol id="icon-align-box-bottom" viewBox="0 0 24 24" stroke-width="1.4" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
11871
|
+
<path d="M3 3m0 2a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2z" />
|
11872
|
+
<path d="M15 17h-7" />
|
11873
|
+
<path d="M15 14h-7" />
|
11874
|
+
</symbol>
|
11875
|
+
<symbol id="icon-align-box-stretch" viewBox="0 0 24 24" stroke-width="1.4" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
11876
|
+
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
|
11877
|
+
<path d="M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14z" />
|
11878
|
+
<path d="M15 17h-7" />
|
11879
|
+
<path d="M15 7h-7" />
|
11880
|
+
</symbol>
|
11881
|
+
|
11882
|
+
<symbol id="icon-align-box-left" viewBox="0 0 24 24" stroke-width="1.4" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
11883
|
+
<path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 3m0 2a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2z" /><path d="M9 15h-2" /><path d="M13 12h-6" /><path d="M11 9h-4" />
|
11884
|
+
</symbol>
|
11885
|
+
<symbol id="icon-align-box-center" viewBox="0 0 24 24" stroke-width="1.4" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
11886
|
+
<path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 19v-14a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2z" /><path d="M11 15h2" /><path d="M9 12h6" /><path d="M10 9h4" />
|
11887
|
+
</symbol>
|
11888
|
+
<symbol id="icon-align-box-right" viewBox="0 0 24 24" stroke-width="1.4" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
11889
|
+
<path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M15 15h2" /><path d="M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14z" /><path d="M11 12h6" /><path d="M13 9h4" />
|
11850
11890
|
</symbol>
|
11851
11891
|
|
11852
|
-
|
11853
11892
|
</defs>
|
11854
11893
|
</svg>`;
|
11855
11894
|
builder.dom.appendHtml(builder.builderStuff, html);
|
@@ -13190,23 +13229,23 @@ const renderQuickAdd = builder => {
|
|
13190
13229
|
elm = quickadd.querySelector('.add-button');
|
13191
13230
|
if (elm) dom.addEventListener(elm, 'click', () => {
|
13192
13231
|
const mode = quickadd.getAttribute('data-mode');
|
13193
|
-
let html = `<div>
|
13232
|
+
let html = `<div class="flex">
|
13194
13233
|
<a href="#" role="button" class="transition-all inline-block whitespace-nowrap cursor-pointer no-underline border-2 border-solid mr-2 mt-2 mb-1 py-2 size-17 px-6 text-black leading-14 rounded border-transparent hover:border-transparent font-normal tracking-wide" style="background-color: rgb(240, 240, 240);">Read More</a>
|
13195
13234
|
</div>`;
|
13196
13235
|
if (builder.opts.emailMode) {
|
13197
|
-
html = '<div><a href="#" role="button" style="margin-top: ;margin-right: ;margin-bottom: ;margin-left: ;display: inline-block; text-decoration: none; transition: all 0.16s ease 0s; border-style: solid; cursor: pointer; background-color: rgb(220, 220, 220); color: rgb(0, 0, 0); border-color: rgb(220, 220, 220); border-width: 2px; border-radius: 0px; padding: 13px 28px; line-height: 21px; text-transform: uppercase; font-weight: 400; font-size: 14px; letter-spacing: 3px;">Read More</a></div>';
|
13236
|
+
html = '<div class="flex"><a href="#" role="button" style="margin-top: ;margin-right: ;margin-bottom: ;margin-left: ;display: inline-block; text-decoration: none; transition: all 0.16s ease 0s; border-style: solid; cursor: pointer; background-color: rgb(220, 220, 220); color: rgb(0, 0, 0); border-color: rgb(220, 220, 220); border-width: 2px; border-radius: 0px; padding: 13px 28px; line-height: 21px; text-transform: uppercase; font-weight: 400; font-size: 14px; letter-spacing: 3px;">Read More</a></div>';
|
13198
13237
|
}
|
13199
13238
|
util.addContent(html, mode);
|
13200
13239
|
});
|
13201
13240
|
elm = quickadd.querySelector('.add-twobutton');
|
13202
13241
|
if (elm) dom.addEventListener(elm, 'click', () => {
|
13203
13242
|
const mode = quickadd.getAttribute('data-mode');
|
13204
|
-
let html = `<div>
|
13243
|
+
let html = `<div class="flex">
|
13205
13244
|
<a href="#" role="button" class="transition-all inline-block whitespace-nowrap cursor-pointer no-underline border-2 border-solid mr-2 mt-2 mb-1 py-2 size-17 px-6 text-black leading-14 rounded border-transparent hover:border-transparent font-normal tracking-wide" style="background-color: rgb(240, 240, 240);">Read More</a>
|
13206
13245
|
<a href="#" role="button" class="transition-all inline-block whitespace-nowrap cursor-pointer no-underline border-2 border-solid mr-2 mt-2 mb-1 py-2 size-17 px-6 border-current hover:border-current font-normal leading-14 rounded tracking-wide">Get Started</a>
|
13207
13246
|
</div>`;
|
13208
13247
|
if (builder.opts.emailMode) {
|
13209
|
-
html = `<div>
|
13248
|
+
html = `<div class="flex">
|
13210
13249
|
<a href="#" role="button" style="margin-top: ;margin-right: ;margin-bottom: ;margin-left: ;display: inline-block; text-decoration: none; transition: all 0.16s ease 0s; border-style: solid; cursor: pointer; background-color: rgb(220, 220, 220); color: rgb(0, 0, 0); border-color: rgb(220, 220, 220); border-width: 2px; border-radius: 0px; padding: 13px 28px; line-height: 21px; text-transform: uppercase; font-weight: 400; font-size: 14px; letter-spacing: 3px;">Read More</a>
|
13211
13250
|
<a href="#" role="button" style="display: inline-block; text-decoration: none; transition: all 0.16s ease 0s; border-style: solid; cursor: pointer; background-color: rgba(0, 0, 0, 0); border-color: rgb(53, 53, 53); border-width: 2px; border-radius: 0px; padding: 13px 28px; line-height: 21px; text-transform: uppercase; font-weight: 600; font-size: 14px; letter-spacing: 3px; color: rgb(53, 53, 53);">Get Started</a>
|
13212
13251
|
</div>`;
|
@@ -49141,17 +49180,26 @@ class Hyperlink {
|
|
49141
49180
|
// Link tool
|
49142
49181
|
const linkTool = this.linkTool;
|
49143
49182
|
let linkDisplay = dom.getStyle(link, 'display');
|
49144
|
-
|
49145
|
-
|
49146
|
-
linkTool.querySelector('.link-remove').style.display = 'block';
|
49147
|
-
} else {
|
49148
|
-
if (this.builder.activeIcon) {
|
49183
|
+
/*
|
49184
|
+
if(linkDisplay==='inline-block' || linkDisplay==='flex'){
|
49149
49185
|
linkTool.querySelector('.link-duplicate').style.display = 'block';
|
49150
49186
|
linkTool.querySelector('.link-remove').style.display = 'block';
|
49151
|
-
|
49152
|
-
|
49153
|
-
|
49154
|
-
|
49187
|
+
} else {
|
49188
|
+
if(this.builder.activeIcon) {
|
49189
|
+
linkTool.querySelector('.link-duplicate').style.display = 'block';
|
49190
|
+
linkTool.querySelector('.link-remove').style.display = 'block';
|
49191
|
+
} else {
|
49192
|
+
linkTool.querySelector('.link-duplicate').style.display = 'none';
|
49193
|
+
linkTool.querySelector('.link-remove').style.display = 'none';
|
49194
|
+
}
|
49195
|
+
}
|
49196
|
+
*/
|
49197
|
+
if (linkDisplay === 'inline' & !this.builder.activeIcon) {
|
49198
|
+
linkTool.querySelector('.link-duplicate').style.display = 'none';
|
49199
|
+
linkTool.querySelector('.link-remove').style.display = 'none';
|
49200
|
+
} else {
|
49201
|
+
linkTool.querySelector('.link-duplicate').style.display = 'block';
|
49202
|
+
linkTool.querySelector('.link-remove').style.display = 'block';
|
49155
49203
|
}
|
49156
49204
|
|
49157
49205
|
// Button Stuff
|
@@ -76281,6 +76329,7 @@ class ContentBuilder {
|
|
76281
76329
|
this.elmTool.repositionElementTool(true);
|
76282
76330
|
this.element.image.imageTool.style.display = '';
|
76283
76331
|
this.element.module.moduleTool.style.display = '';
|
76332
|
+
this.element.hyperlink.linkTool.style.display = '';
|
76284
76333
|
this.colTool.lockIndicator.style.display = '';
|
76285
76334
|
return ret;
|
76286
76335
|
};
|
@@ -76877,6 +76926,27 @@ class ContentBuilder {
|
|
76877
76926
|
// ON KEYUP
|
76878
76927
|
col.addEventListener('keyup', this.handleCellKeyup.bind(this, col));
|
76879
76928
|
|
76929
|
+
// ON DOUBLE CLICK TO SELECT
|
76930
|
+
let isDoubleClick = false; // Double click flag
|
76931
|
+
|
76932
|
+
col.addEventListener('dblclick', () => {
|
76933
|
+
isDoubleClick = true;
|
76934
|
+
});
|
76935
|
+
col.addEventListener('mouseup', () => {
|
76936
|
+
if (isDoubleClick) {
|
76937
|
+
let selection = this.win.getSelection();
|
76938
|
+
let selectedText = selection.toString().trim();
|
76939
|
+
if (selectedText.length > 0) {
|
76940
|
+
let elm = this.dom.getElm();
|
76941
|
+
if (!this.dom.hasClass(elm.parentNode.parentNode, 'is-builder')) {
|
76942
|
+
this.dom.selectElementContents(elm);
|
76943
|
+
}
|
76944
|
+
}
|
76945
|
+
// Reset the flag after handling the double-click
|
76946
|
+
isDoubleClick = false;
|
76947
|
+
}
|
76948
|
+
});
|
76949
|
+
|
76880
76950
|
// ON FOCUS
|
76881
76951
|
// col.addEventListener('focus', this.handleCellFocus.bind(this, col));
|
76882
76952
|
|