steven-tey / novel

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

Re-export EditorClass #220

Closed sangdth closed 9 months ago

sangdth commented 1 year ago

First of all thanks for making the Novel, it works great with just a few line of codes!

Currently I want to use this way <Editor onUpdate={handleUpdate} />, so I can make the handler more complex without messing with the jsx. But in order to use it I have to install @tiptap/core again just to have the Editor class.

I checked the source of Novel and saw we already have EditorClass, just wonder should we re-export those types so customers don't need to re-install tiptap? My ideal is to keep the tiptap under novel as much as possible.

Thanks.

andrewdoro commented 9 months ago

https://novel.sh/docs/components/utils/use-editor or you can save your instance with onCreate callback https://novel.sh/docs/components/editor-content