|
@@ -1453,6 +1453,9 @@
|
1453
|
1453
|
});
|
1454
|
1454
|
}
|
1455
|
1455
|
|
|
1456
|
+ // Caret
|
|
1457
|
+ $(".caret_placeholder").remove();
|
|
1458
|
+
|
1456
|
1459
|
// Get the contents
|
1457
|
1460
|
var h = document.getElementById(editorId).innerHTML;
|
1458
|
1461
|
|
|
@@ -1654,8 +1657,8 @@
|
1654
|
1657
|
var contentIsEmpty = true;
|
1655
|
1658
|
zss_editor.setOnChangeEmptyOrNot = function() {
|
1656
|
1659
|
$('#zss_editor_content').on('input', function() {
|
1657
|
|
- const textContentLength = this.textContent.length - document.querySelectorAll(".caret_placeholder").length;
|
1658
|
|
- if (textContentLength === 0 && this.querySelectorAll('img, li').length === 0 && !contentIsEmpty) {
|
|
1660
|
+ const textContentLength = this.textContent.trim().length - document.querySelectorAll(".caret_placeholder").length;
|
|
1661
|
+ if (textContentLength < 1 && this.querySelectorAll('img, li').length === 0 && !contentIsEmpty) {
|
1659
|
1662
|
contentIsEmpty = true;
|
1660
|
1663
|
ReactNativeWebView.postMessage(JSON.stringify({type: 'ONCHANGE_EMPTY_OR_NOT', isEmpty: true}))
|
1661
|
1664
|
} else if (contentIsEmpty && (textContentLength > 0 || this.querySelectorAll('img, li').length > 0)) {
|