Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request for Position: EditContext #243

Open
dandclark opened this issue Aug 25, 2023 · 0 comments
Open

Request for Position: EditContext #243

dandclark opened this issue Aug 25, 2023 · 0 comments
Assignees
Labels
from: Microsoft Proposed, edited, or co-edited by Microsoft. topic: editing Spec relates to text editing venue: W3C Web Editing WG

Comments

@dandclark
Copy link

WebKittens

@annevk

Title of the spec

EditContext API

URL to the spec

https://w3c.github.io/edit-context/

URL to the spec's repository

https://github.com/w3c/edit-context

Issue Tracker URL

No response

Explainer URL

https://github.com/w3c/edit-context/blob/gh-pages/explainer.md

TAG Design Review URL

w3ctag/design-reviews#416

Mozilla standards-positions issue URL

mozilla/standards-positions#199

WebKit Bugzilla URL

No response

Radar URL

No response

Description

The EditContext API simplifies the process of integrating a web app with advanced text input methods like IME compositions, handwriting panels, and speech recognition.

Today the web platform provides out-of-the-box editing experiences for single lines of plain-text (input), small amounts of multi-line plain-text (textarea) and a starting point for building an HTML document editing experience (contenteditable elements).
Each of these editable elements come built-in editing behaviors that are often inadequate to power the desired editing experience. As a result, web-based editors don't incorporate the web platform's editable elements into their view. Unfortunately, the only API provided by the web platform today to enable advanced text input experiences is to place an editable element in the DOM and focus it.

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.

An alternative is to incorporate a contenteditable element into the view of the editor, regardless of whether the editor is editing an HTML document. This approach limits the editor's flexibilty in modifying the view, since the view is also powering the text input experience.

EditContext addresses these problems by decoupling text input from the HTML DOM view. Rather than having the web platform infer the data required to enable sophisticated text input mechanisms from the HTML DOM, the author will provide that data explicitly through the API surface of the EditContext.

@Ahmad-S792 Ahmad-S792 added the topic: editing Spec relates to text editing label Oct 2, 2023
@nt1m nt1m added the from: Microsoft Proposed, edited, or co-edited by Microsoft. label Oct 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
from: Microsoft Proposed, edited, or co-edited by Microsoft. topic: editing Spec relates to text editing venue: W3C Web Editing WG
Projects
None yet
Development

No branches or pull requests

6 participants