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
fix placeholder shows behind content
ammarahm-ed876a006faec5
diff --git a/apps/mobile/src/screens/editor/Functions.js b/apps/mobile/src/screens/editor/Functions.jsindex e93277823..f0f3106c2 100644--- a/apps/mobile/src/screens/editor/Functions.js+++ b/apps/mobile/src/screens/editor/Functions.js@@ -693,11 +693,14 @@ export async function clearEditor() {noteEdited = false;db.fs.cancel(getNote()?.id);clearNote();- tiny.call(EditorWebView, tiny.reset());+ placeholderTip = TipManager.placeholderTip();+ tiny.call(EditorWebView, tiny.reset(placeholderTip));//EditorWebView.current?.reload();await waitForEvent('resetcomplete');- placeholderTip = TipManager.placeholderTip();- tiny.call(EditorWebView, tiny.setPlaceholder(placeholderTip));+ if (!note) {+ tiny.call(EditorWebView, tiny.setPlaceholder(placeholderTip));+ }+editing.focusType = null;eSendEvent('historyEvent', {undo: 0,@@ -922,7 +925,9 @@ export async function onWebViewLoad(premium, colors) {}}, 300);setColors(colors);- tiny.call(EditorWebView, tiny.setPlaceholder(placeholderTip));+ if (!note) {+ tiny.call(EditorWebView, tiny.setPlaceholder(placeholderTip));+ }}async function restoreEditorState() {diff --git a/apps/mobile/src/screens/editor/tiny/tiny.js b/apps/mobile/src/screens/editor/tiny/tiny.jsindex b20f80b84..51887b2b9 100644--- a/apps/mobile/src/screens/editor/tiny/tiny.js+++ b/apps/mobile/src/screens/editor/tiny/tiny.js@@ -14,15 +14,15 @@ setTimeout(() => {},300);`;-const reset = id => `+const reset = placeholder => `sessionId = null;document.getElementById("titleInput").value = '';document.getElementById("titleInput").placeholder = "Note title";tinymce.activeEditor.mode.set('readonly');tinymce.activeEditor.clearContent();tinymce.activeEditor.setHTML("<p><br/></p>");-editor.dom.setAttrib(editor.dom.doc.body, 'data-mce-placeholder', 'Start writing your note here');-editor.dom.setAttrib(editor.dom.doc.body, 'aria-placeholder', 'Start writing your note here');+editor.dom.setAttrib(editor.dom.doc.body, 'data-mce-placeholder', "${placeholder}");+editor.dom.setAttrib(editor.dom.doc.body, 'aria-placeholder', "${placeholder}");renderChildernInNode([], ".tag-bar");tinymce.activeEditor.undoManager.clear();document.querySelector('#infosaved').innerText = "";