Clean up drafts implementation (#164)

This commit is contained in:
2026-04-07 13:06:29 +00:00
parent 30c2a6ef79
commit 17fb4e780b
13 changed files with 173 additions and 162 deletions
+3 -2
View File
@@ -4,9 +4,10 @@
type Props = {
editor: Promise<Editor>
autofocus?: boolean
}
const {editor}: Props = $props()
const {editor, autofocus}: Props = $props()
let element: HTMLElement
@@ -16,7 +17,7 @@
element?.append(ed.options.element)
}
if ((ed as any)._shouldAutofocus) {
if (autofocus) {
const hasContent = ed.getText().trim().length > 0
requestAnimationFrame(() => {