Closed ENT108 closed 1 year ago
Overriding nested packages using yarn
using:
"resolutions": {
"slate-react": "0.97.1",
"slate-history": "0.93.0"
}
Is not helping.
@thesunny I am able to set the below via this package? This could help.
https://github.com/ianstormtaylor/slate/issues/3421#issuecomment-1101931986
@ENT108
The fix you referenced is probably not the solution to this problem. I say this because if you set the editor to an empty string, it should still insert those objects automatically (e.g. the paragraph with a single text node in the Slate DOM).
The "Cannot resolve DOM point" is a pretty common error when the editor is looking for a point in the document that it can't find.
If you can create a minimum reproduction, I think we could come up with a solution quickly.
When you say "drawer". are you referring to the MUI drawer? https://mui.com/material-ui/react-drawer/
if you set the editor to an empty string, it should still insert those objects automatically
That is true statement.
I am sorry for all the buzz. Got it working.
I initially implemented <Editable />
in a React.FC being rendered inside another React.FC that initiated editor
via useEditor
and this blew up. Having it all inside one React.FC thus also single re-render cycle solved the issue.
When you say "drawer". are you referring to the MUI drawer? https://mui.com/material-ui/react-drawer/
Yes, that is a drawer.
Happy to hear you figured it out!
Description When implemented on a simple view, the Editor works fine. But when the Editor is places inside of a Drawer it fails in runtime.
Reproduction
Steps To reproduce the behavior:
Expectation I wish the Editor is not failing in runtime.
Environment
Context This error is know to Slate users. There are workarounds for Slate, but not for Wysimark as it wraps the Slate components. i.e.: https://github.com/ianstormtaylor/slate/issues/3421