I hadn’t heard of the EditContext API at all, but apparently it’s landed in Chrome already. Aaron Iker has a nice thread on it. Using a <textarea>
or the contenteditable
attribute on HTML elements offers a pretty limited text editing experience. Some fancy text editing components actually hide the original editable element, which is part of their motivation:
This contradiction of needing an editable element, but not wanting it to be visible, leads web-based editors to create hidden editable elements to facilitate text input. This approach negatively impacts accessibility and increases complexity, leading to buggy behavior.
I wanted to be excited about it, but this list of things that it breaks has me scratching my head a little. That feels like a lot to give up. If I needed a nice text editor right now, my first stop would be ProseMirror.