@innovastudio/contentbox 1.4.48 → 1.4.50
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@innovastudio/contentbox",
|
3
3
|
"type": "module",
|
4
|
-
"version": "1.4.
|
4
|
+
"version": "1.4.50",
|
5
5
|
"description": "",
|
6
6
|
"main": "public/contentbox/contentbox.esm.js",
|
7
7
|
"files": [
|
@@ -46,7 +46,7 @@
|
|
46
46
|
"webpack-dev-server": "^4.0.0"
|
47
47
|
},
|
48
48
|
"dependencies": {
|
49
|
-
"@innovastudio/contentbuilder": "^1.3.
|
49
|
+
"@innovastudio/contentbuilder": "^1.3.55",
|
50
50
|
"js-beautify": "^1.14.0"
|
51
51
|
}
|
52
52
|
}
|
@@ -1003,10 +1003,10 @@ class SideBar {
|
|
1003
1003
|
const builderStuff = this.builderStuff;
|
1004
1004
|
let html;
|
1005
1005
|
|
1006
|
-
if (this.builder.
|
1007
|
-
html = this.builder.html();
|
1008
|
-
} else {
|
1006
|
+
if (this.builder.shortenHTML) {
|
1009
1007
|
html = this.builder.html(true); //For View
|
1008
|
+
} else {
|
1009
|
+
html = this.builder.html();
|
1010
1010
|
}
|
1011
1011
|
|
1012
1012
|
builderStuff.querySelector('#inpViewHtml').value = html;
|
@@ -1035,10 +1035,10 @@ class SideBar {
|
|
1035
1035
|
|
1036
1036
|
let html;
|
1037
1037
|
|
1038
|
-
if (this.builder.
|
1039
|
-
html = this.builder.html();
|
1040
|
-
} else {
|
1038
|
+
if (this.builder.shortenHTML) {
|
1041
1039
|
html = this.builder.html(true); //For View
|
1040
|
+
} else {
|
1041
|
+
html = this.builder.html();
|
1042
1042
|
}
|
1043
1043
|
|
1044
1044
|
builderStuff.querySelector('#inpViewHtml').value = html;
|
@@ -90942,7 +90942,9 @@ class ContentBuilder {
|
|
90942
90942
|
}
|
90943
90943
|
|
90944
90944
|
handleCellKeydown(col, e) {
|
90945
|
+
this.oriLen = col.textContent.length; // get character length
|
90945
90946
|
// Cleanup unwanted span
|
90947
|
+
|
90946
90948
|
let spans = col.querySelectorAll('span');
|
90947
90949
|
Array.prototype.forEach.call(spans, span => {
|
90948
90950
|
span.setAttribute('data-keep', '');
|
@@ -91446,13 +91448,27 @@ class ContentBuilder {
|
|
91446
91448
|
// jQuery('.cell-active').find('.elm-active').removeClass('elm-active');
|
91447
91449
|
// jQuery("#divElementTool").css("display", "none"); //force hide ellement tool
|
91448
91450
|
// Call onChange to indicate content change
|
91451
|
+
// this.opts.onChange();
|
91452
|
+
// console.log(this.oriLen,col.textContent.length);
|
91449
91453
|
|
91450
91454
|
|
91451
|
-
this.
|
91455
|
+
if (this.oriLen !== col.textContent.length) {
|
91456
|
+
// check if typing produce/reduce a character
|
91457
|
+
this.typing();
|
91458
|
+
} // Hide element highlight & tool during typing
|
91459
|
+
|
91452
91460
|
|
91453
91461
|
this.elmTool.hide();
|
91454
91462
|
}
|
91455
91463
|
|
91464
|
+
typing() {
|
91465
|
+
// console.log('typing');
|
91466
|
+
if (this.timeoutId) clearTimeout(this.timeoutId);
|
91467
|
+
this.timeoutId = setTimeout(() => {
|
91468
|
+
this.opts.onChange();
|
91469
|
+
}, 2000);
|
91470
|
+
}
|
91471
|
+
|
91456
91472
|
handleCellPaste() {
|
91457
91473
|
this.uo.saveForUndo();
|
91458
91474
|
const util = this.util;
|
@@ -98044,7 +98060,7 @@ class ContentBox {
|
|
98044
98060
|
absolutePath: false,
|
98045
98061
|
maxEmbedImageWidth: 1600,
|
98046
98062
|
zoom: 0.6,
|
98047
|
-
|
98063
|
+
shortenHTML: true,
|
98048
98064
|
contentStyleWithSample: false,
|
98049
98065
|
contentSizes: [300, 320, 340, 360, 380, 400, 420, 440, 460, 480, 500, 520, 540, 560, 580, 600, 620, 640, 660, 680, 700, 720, 740, 760, 780, 800, 820, 840, 860, 880, 900, 920, 940, 960, 970, 980, 1000, 1020, 1040, 1050, 1060, 1080, 1100, 1120, 1140, 1160, 1180, 1200, 1220, 1240, 1260, 1280, 1300, 1320, 1340, 1360, 1380, 1400, 1420, 1440, 1460, 1480, 1500, 1520, 1540, 1560, 1580, 1600, 1620, 1640, 1660, 1680, 1700, 1720, 1740, 1760, 1780, 1800, 1820, 1840, 1860, 1880, 1900, 1920, 1940, 1960, 1980, 2000, 2020, 2040, 2060, 2080, 2100, 2120, 2140, 2160, 2180, 2200, 2220, 2240, 2260, 2280, 2300, 2320, 2340, 2360, 2380, 2400, 2420, 2440, 2460, 2480, 2500, 2520, 2540, 2560, 2580, 2600, 2620, 2640, 2660, 2680, 2700],
|
98050
98066
|
contentStyles: {
|