feat(editor): skip toolbar in tab order; auto-focus title; type-dependent placeholders

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-08 13:25:07 -04:00
parent 87f74b1cd5
commit 317d8f25d0
2 changed files with 14 additions and 1 deletions
@@ -78,6 +78,7 @@ const groups = [
:class="['md-btn', { active: btn.isActive() }]"
:title="btn.title"
type="button"
tabindex="-1"
@mousedown.prevent="btn.command()"
>
<span class="btn-icon" v-html="ICONS[btn.id]" />
+13 -1
View File
@@ -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"