mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-23 23:19:40 +01:00
fix errors in editor
This commit is contained in:
@@ -139,6 +139,7 @@ function attachMessageListener() {
|
||||
document.activeElement.blur();
|
||||
window.blur();
|
||||
}, 300);
|
||||
info = document.querySelector(infoBar);
|
||||
info.querySelector('#infowords').innerText =
|
||||
editor.countWords() + ' words';
|
||||
break;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user