steven-tey / novel

Notion-style WYSIWYG editor with AI-powered autocompletion.
https://novel.sh
Apache License 2.0
13.23k stars 1.08k forks source link

editor add props autofocus #199

Closed 1977744311 closed 9 months ago

1977744311 commented 1 year ago

Due to the use of the 'autofocus' attribute being hard-coded as 'end' in the code when using tiptap, the page scrolls to the middle when there is default content. I'm not sure if this was intentional or not. I believe that the 'autofocus' attribute should be exposed as a prop for the Editor, allowing users to freely decide the autofocus behavior. Therefore, the content of this PR is to add the 'autofocus' prop to the Editor component, matching it with the behavior of the tiptap editor. Thank you

vercel[bot] commented 1 year ago

Someone is attempting to deploy a commit to the Elegance Team on Vercel.

A member of the Team first needs to authorize it.

andrewdoro commented 9 months ago

https://novel.sh/docs/components/editor-content has now all props from Tiptap exposed