atomic-data-browser icon indicating copy to clipboard operation
atomic-data-browser copied to clipboard

Consider `contenteditable`

Open joepio opened this issue 3 years ago • 1 comments

At this moment, I'm using textarea as input fields which only appear when a user clicks on an Element (block / paragraph). This makes text selection difficult, as the element is unmounted when the user clicks. So the user needs to click before selecting. #78

One way to improve upon this, is to use contentEditable, which allows for far richer editable elements. However, this also presents some challenges:

  • ContentEditbale + React is really complicated! I heard of some projects that have decided to just skip react, and simply use native DOM apis at this level
  • But I still want to render React components in the Document editor

joepio avatar Dec 29 '22 15:12 joepio

contentEditable is way to much of a hassle to get right even without React. Our best bet is to use something like Slate's api to build our own custom experience or if we just want to solve the selection bug we could look at the DOM's Selection apis.

Polleps avatar Jan 04 '23 10:01 Polleps