Skip to content

Commit

Permalink
add autofocus
Browse files Browse the repository at this point in the history
  • Loading branch information
renardeinside committed Nov 21, 2024
1 parent c2308d1 commit 911c147
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/components/Editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,11 @@ const Editor = () => {
onUpdate: ({ editor }) => {
setContent(JSON.stringify(editor.getJSON()));
},
autofocus: true,
editorProps: {
attributes: {
class:
"!w-full prose !max-w-none dark:prose-invert sm:prose-sm md:prose-md focus:outline-none min-h-[90vh]",
"!w-full prose !max-w-none dark:prose-invert sm:prose-sm md:prose-md focus:outline-none min-h-[90vh] autofocus",
},
},
});
Expand Down
2 changes: 1 addition & 1 deletion src/lib/stores.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,4 +107,4 @@ export const subscriptionEffect = (
unsubscribe();
};
}, [editor]);
};
};

0 comments on commit 911c147

Please sign in to comment.