fix errors in editor

This commit is contained in:
ammarahm-ed
2021-11-20 11:58:04 +05:00
parent 598684e201
commit 0402b18dcc
2 changed files with 3 additions and 5 deletions

View File

@@ -139,6 +139,7 @@ function attachMessageListener() {
document.activeElement.blur();
window.blur();
}, 300);
info = document.querySelector(infoBar);
info.querySelector('#infowords').innerText =
editor.countWords() + ' words';
break;

View File

@@ -89,6 +89,7 @@ async function waitForEvent(event, caller) {
resolved = true;
clearTimeout(resolved);
waitForContent = false;
console.log('message returned');
resolve(true);
};
eSubscribeEvent(event, event_callback);
@@ -145,7 +146,7 @@ const request_content = `(function() {
window.ReactNativeWebView.postMessage(
JSON.stringify({
type: 'tiny',
value: editor.getHTML();
value: editor.getHTML()
})
);
}
@@ -326,10 +327,6 @@ export const _onMessage = async evt => {
console.log('history', message.value);
eSendEvent('historyEvent', message.value);
break;
case 'noteedited':
console.log('note changed');
noteEdited = true;
break;
case 'tiny':
if (message.value !== content.data) {
noteEdited = true;