atomicdata-dev / atomic-data-browser

This repo is no longer used! Code is moved to Atomic-Server
https://github.com/atomicdata-dev/atomic-server/issues
MIT License
55 stars 9 forks source link

Consider `contenteditable` #275

Open joepio opened 1 year ago

joepio commented 1 year ago

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:

Polleps commented 1 year ago

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.