diff --git a/frontend/src/components/MarkdownToolbar.vue b/frontend/src/components/MarkdownToolbar.vue index e3350d5..23fe9b1 100644 --- a/frontend/src/components/MarkdownToolbar.vue +++ b/frontend/src/components/MarkdownToolbar.vue @@ -78,6 +78,7 @@ const groups = [ :class="['md-btn', { active: btn.isActive() }]" :title="btn.title" type="button" + tabindex="-1" @mousedown.prevent="btn.command()" > diff --git a/frontend/src/views/NoteEditorView.vue b/frontend/src/views/NoteEditorView.vue index 95616a9..edf27b5 100644 --- a/frontend/src/views/NoteEditorView.vue +++ b/frontend/src/views/NoteEditorView.vue @@ -49,6 +49,15 @@ const noteId = computed(() => ); const isEditing = computed(() => noteId.value !== null); +const titlePlaceholder = computed(() => { + switch (noteType.value) { + case 'person': return 'Name'; + case 'place': return 'Place name'; + case 'list': return 'List title'; + default: return 'Title'; + } +}); + const renderedPreview = computed(() => renderMarkdown(body.value)); // AI Assist — pass noteId for draft persistence @@ -243,6 +252,9 @@ onMounted(async () => { // No draft — normal } + await nextTick(); + titleRef.value?.focus(); + // Initial link suggestions fetchLinkSuggestions(); }); @@ -357,7 +369,7 @@ onUnmounted(() => assist.clearSelection()); ref="titleRef" v-model="title" type="text" - placeholder="Title" + :placeholder="titlePlaceholder" class="title-input" @input="markDirty" @keydown.ctrl.s.prevent="save"