Search

The EditContext API

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.

Need front-end development training?

Frontend Masters logo

Frontend Masters is the best place to grow in your career as a developer. We have courses on all the most important front-end technologies and beyond, from React to CSS, to backend with Node.js and Full Stack.

Leave a Reply

Your email address will not be published. Required fields are marked *

Frontend Masters ❤️ Open Source

Did you know? Frontend Masters Donates to open source projects. $313,806 contributed to date.