Re: [w3ctag/design-reviews] EditContext API (#416)

こんにちは TAG-さん!

Apologies for the extended delay here. We've got capacity to pick up this spec again, and I'm going to take point on driving it.

Can this issue be reopend, or should I file a new issue for the review?

The spec draft for the feature has evolved quite a bit from when this was initailly opened, and some of the materials have moved around. @snianu's [top post](https://github.com/w3ctag/design-reviews/issues/416#issue-488879208) has been edited with the new links, or you can find the spec draft directly [here](https://w3c.github.io/edit-context/).

To start addressing some of the last questions on the spec from @plinss, the intended behavior when an EditContext has children is that there will be a mix of behavior borrowed from `contenteditable` and some behavior that diverges. This section overviews these similarities and differences: https://w3c.github.io/edit-context/#edit-context-differences.

Essentially, the browser will handle caret navigation, and child content of the EditContext will inherit editability such that the user can click/arrow-key into it and move the caret around in it. Where EditContext primarily differs is that when the user tries to add or delete content via key or IME input, the browser will not modify the content automatically. Instead it will fire events against EditContext so that the page author can perform the modification as they see fit.

A primary goal of this API is to give the author a primitive to interact with OS text input services more directly. This is done via a plain text buffer since that's what the text input services use. The authors are then responsible for translating this into the view that will be presented to the user, either building it with DOM nodes or painting to a `<canvas>`.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3ctag/design-reviews/issues/416#issuecomment-1579575030
You are receiving this because you are subscribed to this thread.

Message ID: <w3ctag/design-reviews/issues/416/1579575030@github.com>

Received on Tuesday, 6 June 2023 23:04:45 UTC