@innovastudio/contentbox 1.6.4 → 1.6.5
Sign up to get free protection for your applications and to get access to all the features.
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@innovastudio/contentbox",
|
3
3
|
"type": "module",
|
4
|
-
"version": "1.6.
|
4
|
+
"version": "1.6.5",
|
5
5
|
"description": "",
|
6
6
|
"main": "public/contentbox/contentbox.esm.js",
|
7
7
|
"files": [
|
@@ -52,7 +52,7 @@
|
|
52
52
|
"ws": "^8.13.0"
|
53
53
|
},
|
54
54
|
"dependencies": {
|
55
|
-
"@innovastudio/contentbuilder": "^1.4.
|
55
|
+
"@innovastudio/contentbuilder": "^1.4.129",
|
56
56
|
"choices.js": "^10.2.0",
|
57
57
|
"js-beautify": "^1.14.0"
|
58
58
|
}
|
@@ -43549,23 +43549,23 @@ const renderQuickAdd = builder => {
|
|
43549
43549
|
elm = quickadd.querySelector('.add-button');
|
43550
43550
|
if (elm) dom.addEventListener(elm, 'click', () => {
|
43551
43551
|
const mode = quickadd.getAttribute('data-mode');
|
43552
|
-
let html = `<div>
|
43552
|
+
let html = `<div class="flex">
|
43553
43553
|
<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>
|
43554
43554
|
</div>`;
|
43555
43555
|
if (builder.opts.emailMode) {
|
43556
|
-
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>';
|
43556
|
+
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>';
|
43557
43557
|
}
|
43558
43558
|
util.addContent(html, mode);
|
43559
43559
|
});
|
43560
43560
|
elm = quickadd.querySelector('.add-twobutton');
|
43561
43561
|
if (elm) dom.addEventListener(elm, 'click', () => {
|
43562
43562
|
const mode = quickadd.getAttribute('data-mode');
|
43563
|
-
let html = `<div>
|
43563
|
+
let html = `<div class="flex">
|
43564
43564
|
<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>
|
43565
43565
|
<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>
|
43566
43566
|
</div>`;
|
43567
43567
|
if (builder.opts.emailMode) {
|
43568
|
-
html = `<div>
|
43568
|
+
html = `<div class="flex">
|
43569
43569
|
<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>
|
43570
43570
|
<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>
|
43571
43571
|
</div>`;
|
@@ -107236,6 +107236,27 @@ class ContentBuilder {
|
|
107236
107236
|
// ON KEYUP
|
107237
107237
|
col.addEventListener('keyup', this.handleCellKeyup.bind(this, col));
|
107238
107238
|
|
107239
|
+
// ON DOUBLE CLICK TO SELECT
|
107240
|
+
let isDoubleClick = false; // Double click flag
|
107241
|
+
|
107242
|
+
col.addEventListener('dblclick', () => {
|
107243
|
+
isDoubleClick = true;
|
107244
|
+
});
|
107245
|
+
col.addEventListener('mouseup', () => {
|
107246
|
+
if (isDoubleClick) {
|
107247
|
+
let selection = this.win.getSelection();
|
107248
|
+
let selectedText = selection.toString().trim();
|
107249
|
+
if (selectedText.length > 0) {
|
107250
|
+
let elm = this.dom.getElm();
|
107251
|
+
if (!this.dom.hasClass(elm.parentNode.parentNode, 'is-builder')) {
|
107252
|
+
this.dom.selectElementContents(elm);
|
107253
|
+
}
|
107254
|
+
}
|
107255
|
+
// Reset the flag after handling the double-click
|
107256
|
+
isDoubleClick = false;
|
107257
|
+
}
|
107258
|
+
});
|
107259
|
+
|
107239
107260
|
// ON FOCUS
|
107240
107261
|
// col.addEventListener('focus', this.handleCellFocus.bind(this, col));
|
107241
107262
|
|