Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

show new note title in placeholder

ammarahm-ede40189aa779a
diff --git a/apps/mobile/html/Web.bundle/site/listeners.js b/apps/mobile/html/Web.bundle/site/listeners.js
index 5db7a2607..dc10a0096 100755
--- a/apps/mobile/html/Web.bundle/site/listeners.js
+++ b/apps/mobile/html/Web.bundle/site/listeners.js
@@ -64,7 +64,7 @@ function attachTitleInputListeners() {
let titleTimeout = 0;
function onTitleChange() {
clearTimeout(titleTimeout);
- titleTimeout = setTimeout(function() {
+ titleTimeout = setTimeout(function () {
if (isLoading) {
return;
}
@@ -193,6 +193,9 @@ function attachMessageListener() {
case 'title':
document.getElementById('titleInput').value = value;
break;
+ case 'titleplaceholder':
+ document.getElementById('titleInput').placeholder = value;
+ break;
default:
break;
}
diff --git a/apps/mobile/src/views/Editor/Functions.js b/apps/mobile/src/views/Editor/Functions.js
index b95c03201..e79a0fb90 100644
--- a/apps/mobile/src/views/Editor/Functions.js
+++ b/apps/mobile/src/views/Editor/Functions.js
@@ -798,9 +798,10 @@ export async function saveNote(preventUpdate) {
}
if (!id && !preventUpdate) {
- // if (!title || title === '') {
- // post('title', db.notes.note(noteId)?.data?.title || '');
- // }
+ if (!title || title === '') {
+ console.log('posting title now');
+ post('titleplaceholder', db.notes.note(noteId)?.data?.title || '');
+ }
useEditorStore.getState().setCurrentlyEditingNote(noteId);
await setNoteInEditorAfterSaving(id, noteId);