nossas / slate-editor

A complete rich text editor based on SlateJS framework
https://slate-editor.bonde.org
MIT License
263 stars 56 forks source link

problems trying to insert link into image #82

Open igr-santos opened 5 years ago

igr-santos commented 5 years ago

Do you want to request a feature or report a bug? bug

What's the current behavior? When I move the cursor around an image, I get an error and my application crashes.

Error: Unable to find a DOM node for "1320". This is often because of forgetting to add `props.attributes` to a custom component.
  at findDOMNode$1 (../node_modules/slate-editor/node_modules/slate-react/lib/slate-react.es.js:1122:1)
  at findDOMPoint (../node_modules/slate-editor/node_modules/slate-react/lib/slate-react.es.js:1138:1)
  at findDOMRange (../node_modules/slate-editor/node_modules/slate-react/lib/slate-react.es.js:1179:1)
  at updateSelection (../node_modules/slate-editor/node_modules/slate-react/lib/slate-react.es.js:1663:1)
  at componentDidUpdate (../node_modules/slate-editor/node_modules/slate-react/lib/slate-react.es.js:1836:1)
...
(6 additional frame(s) were not displayed)

What's the expected behavior? It should be possible to move the cursor between any element / plugin that is inserted in the Editor