A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
delay injecting scripts on app load
ammarahm-ed98383dc48447
diff --git a/apps/mobile/src/views/Editor/tiny/tiny.js b/apps/mobile/src/views/Editor/tiny/tiny.jsindex 7e963d277..6e55b405e 100644--- a/apps/mobile/src/views/Editor/tiny/tiny.js+++ b/apps/mobile/src/views/Editor/tiny/tiny.js@@ -1,3 +1,5 @@+import {EditorWebView, getWebviewInit} from '../Functions';+const reset = `isLoading = true;document.getElementById("titleInput").value = '';@@ -122,7 +124,14 @@ tinymce.activeEditor.focus();`;function call(webview, func) {- webview.current?.injectJavaScript(func);+ if (getWebviewInit()) {+ webview.current?.injectJavaScript(func);+ } else {+ setTimeout(() => {+ console.log('run after delay');+ webview.current?.injectJavaScript(func);+ }, 1000);+ }}const undo = `diff --git a/apps/mobile/src/views/Editor/tiny/toolbar/item.js b/apps/mobile/src/views/Editor/tiny/toolbar/item.jsindex 91b9b0c56..0e83d501f 100644--- a/apps/mobile/src/views/Editor/tiny/toolbar/item.js+++ b/apps/mobile/src/views/Editor/tiny/toolbar/item.js@@ -291,7 +291,8 @@ const ToolbarItem = ({<Paragraphsize={SIZE.md}color={selected ? colors.accent : colors.pri}>- {formatValue || currentText}+ {formatValue || currentText || "12pt"}+</Paragraph>) : text && groupFormat !== 'header' ? (<Paragraph@@ -307,6 +308,7 @@ const ToolbarItem = ({}}size={SIZE.md}>{currentText || text}+</Paragraph>) : (<Icon