-
Notifications
You must be signed in to change notification settings - Fork 1
Description
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.