You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
I have the slate component defined as <Slate editor={editor} initialValue={editor.children}/>
When i want to recreate editor instance. Internally there is no any mechanism to update the context in order to get useSlate hook work properly.
Expectation
The react context is updated due to changed editor externally
Question
In general should <Slate/> component update context in such situation or an editor instance is considered as singleton object? What pitfalls are there? If it's intentional shoud i reuse existing editor instance by changing children property?
Environment
Slate Version: 0.103.0
Slate-React Version: 0.109.0
Context
In our app due to its architecture an editor gets recreated after saving&loading text document.
The text was updated successfully, but these errors were encountered:
@skorenbIs it an option for you to update the ‘initialValue’ reference whenever your editor changes? IIR, the context does update if the value passed to that prop changes.
Description
I have the slate component defined as
<Slate editor={editor} initialValue={editor.children}/>
When i want to recreate editor instance. Internally there is no any mechanism to update the context in order to get useSlate hook work properly.
Expectation
The react context is updated due to changed editor externally
Question
In general should
<Slate/>
component update context in such situation or an editor instance is considered as singleton object? What pitfalls are there? If it's intentional shoud i reuse existing editor instance by changing children property?Environment
Context
In our app due to its architecture an editor gets recreated after saving&loading text document.
The text was updated successfully, but these errors were encountered: