editor.findPath is not a function
See original GitHub issueGetting the error TypeError: editor.findPath is not a function
even if the text is not empty.
Logging editor gives the following:
addMark: (key, value) => {…}
apply: op => {…}
children: (12) [{…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}]
deleteBackward: unit => {…}
deleteForward: unit => {…}
deleteFragment: () => {…}
history: {undos: Array(1), redos: Array(0)}
insertBreak: () => {…}
insertData: data => {…}
insertFragment: fragment => {…}
insertNode: node => { Transforms.insertNodes(editor, node); }
insertText: text => {…}
isInline: () => false
isVoid: element => {…}
marks: null
normalizeNode: entry => {…}
onChange: () => {…}
operations: []
redo: () => {…}
removeMark: key => {…}
selection: {anchor: {…}, focus: {…}}
undo: () => {…}
So findPath is not defined anywhere.
A different issue mentioned needing a nonempty text child, but that still doesn’t fix it.
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Slate.js throws an error when inserting a new node at selected ...
The issue is related to rendering when you use useMemo , instead you should use useRef : const editorRef = useRef() if (!editorRef.current) ......
Read more >How to use the slate-react.ReactEditor.findPath function in ...
To help you get started, we've selected a few slate-react.ReactEditor.findPath examples, based on popular ways it is used in public projects.
Read more >Slate React
Get the current editor object from the React context. A version of useSlate that does not re-render the context. Previously called useEditor ....
Read more >3x5kv87jt - JavaScript - OneCompiler
Write, Run & Share Javascript code online using OneCompiler's JS online compiler for free. It's one of the robust, feature-rich online compilers for...
Read more >Discussion - Editor freezing when code runs - Unity Forum
The editor freezes when I call the "FindPath" function: using System. ... when an infinite loop runs, but I could not Identify the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Looks like the code wasn’t updated.
Should say
I couldn’t start the edit URL process as it stopped editing when I clicked on the input so there might be other bugs.
If you can get it working, will accept a PR.
Yep, my code now works. Thanks!
Will work on a PR.