Skip to main content Skip to main content Windows Experience Devices Windows Developer Microsoft Edge Windows Insider Microsoft 365 Microsoft 365 Azure Copilot Windows Surface XBOX Deals Small Business Support Windows Apps Outlook OneDrive Microsoft Teams OneNote Microsoft Edge Moving from Skype to Teams Computers Shop XBOX Accessories VR & mixed reality Certified Refurbished Trade-in for cash XBOX Game Pass Ultimate PC Game Pass XBOX games PC games Microsoft AI Microsoft Security Dynamics 365 Microsoft 365 for business Microsoft Power Platform Windows 365 Small Business Digital Sovereignty Azure Microsoft Developer Microsoft Learn Support for AI marketplace apps Microsoft Tech Community Microsoft Marketplace Software companies Visual Studio Microsoft Rewards Free downloads & security Education Gift cards Licensing Unlocked stories View Sitemap

A new way to build custom web editing experiences with EditContext

Written By published February 13, 2024

One of the biggest challenges that developers face when working with advanced text editing capabilities in web apps is the limitation of existing elements like <input> and <textarea>. Custom text editors are often created by using a complex DOM structure or even a <canvas> element that often require using a hidden contenteditable element, adding more complexity, and negatively impacting accessibility.

To address this issue, the Microsoft Edge team, in collaboration with Chrome engineers, has specified and implemented the EditContext API.

The EditContext API enables web developers to access text and composition input through the API surface instead of relying on the DOM. The API is available with the release 121 of both Microsoft Edge and Chrome. For now, it’s only available in Chromium-based browsers, but you can read Mozilla‘s and WebKit‘s positions on the EditContext API.

To read documentation, use cases, and code examples, please check out:

We would love to hear what you think about the API. To submit feedback about the design of the API, please open an issue on the EditContext API’s Github repository, and to report bugs, use issues.chromium.org.

Your Privacy Choices Opt-Out Icon Your Privacy Choices
Consumer Health Privacy Sitemap Contact Microsoft Privacy Manage cookies Terms of use Trademarks Safety & eco Recycling About our ads