Skip to content

Edit article title #105

@f2cmb

Description

@f2cmb

ALlow to edit the title in the main article view, outline/Notion mode.

Chosen Approach :

The KB article title (name) and content (answer) are stored as separate database fields. Rather than embedding the title iside the Tiptap editor as a custom document node, we keep the existing <h1> element in the page and make it contenteditable when the user enters edit mode.

This means the title lives outside the Tiptap editor but behaves as a natural part of the editing experience: pressing Enter in the title moves focus to the content editor, paste is sanitized to plain text, and both fields are saved together in a single request.

Known trade-off: Since the title and the Tiptap editor are two independent editable zones, they each maintain their own undo/redo history. Pressing Ctrl+Z in the editor will not undo a title change and vice versa. In practice this is negligible, as users rarely alternate between editing the title and the content in rapid succession.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions