Open Nazariy995 opened 2 months ago
const Container = () => {
const [editor, saveEditor] = useState(null)
useEffect(() => {
if(editor){
// editor is available here for commands
}
},[editor])
return <Editor saveEditor={saveEditor}/>
}
onCreate={({ editor }) => {
saveEditor(editor);
}}
How would a hook work if you use more than 1 instance of editor. Novel updates content in localstorage and reads from it. Just manipulate the content there.
Describe the feature you'd like to request
I am new to this library, so this could be a dumb suggestion.
I am trying to reference editor command outside the EditorContent components provided by Noel
because I want to be able to update text context programmatically outside.
Right now I am doing it like this
Is there a better way to do this! Maybe we can add a Context component to wrap everything!
Describe the solution you'd like to see
I'm thinking we can have access to the ContextProvider if possible so we can place it anywhere and just use
Additional information
No response