use-editable
use-editable copied to clipboard
A small React hook to turn elements into fully renderable & editable content surfaces, like code editors, using contenteditable (and magic)
When you first change the content of the element you are interrupted, as if the element loses focus. I have tested this in multiple browsers and in multiple react versions....
The problem I faced is that I render editable elements in an iframe (forced by CSS I'm dependent on, long story). I use React.Portal and because the code is defined...
Executing this effect upon every react re-render can cause the focus to be stolen when a user is interacting with other components. Specifying the appropriate dependency array should ensure that...
First, thank for this hook, it's really nice work. When I use `Edit.insert(append: string, offset?: number): void`, the text is correctly inserted in the editor but the `onChange` handler is...
### Description Fixes # (issue) - https://github.com/FormidableLabs/react-live/issues/377 #### Type of Change - [x] Bug fix (non-breaking change which fixes an issue) ### Checklist: (Feel free to delete this section upon...