Skip to content

Comments

feat: add option to focus title bar after creating note from template#141

Open
sh1vam31 wants to merge 1 commit intojoplin:masterfrom
sh1vam31:feat/focus-title-bar-after-template_#67
Open

feat: add option to focus title bar after creating note from template#141
sh1vam31 wants to merge 1 commit intojoplin:masterfrom
sh1vam31:feat/focus-title-bar-after-template_#67

Conversation

@sh1vam31
Copy link

Closes #67

After creating a note or to-do from a template, the cursor was always placed in the note body. This adds an option to automatically move the cursor to the title bar instead, so users can immediately type the note title.

Changes

Added a new plugin setting:

Tools → Templates → "Focus title bar after creating a note from template"

  • When ON: cursor moves to the title bar after note creation
  • When OFF (default): existing behavior — cursor stays in note body

Implementation

  • New setting: src/settings/focusTitleAfterCreate.ts
  • After openNote, executes joplin.commands.execute("focusElement", "noteTitle")
  • if the setting is enabled. Wrapped in try/catch for graceful fallback on older Joplin versions.

Testing

  1. Enabled the setting in Preferences → Templates
  2. Created a note via Tools → Templates → Create note from template
  3. Cursor moved to title bar automatically
  4. Disabled the setting → cursor stayed in note body

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Focus on title bar

1 participant