Re: [w3c/editing] Universal interface to modify content in a JS editor from unrelated JS code. (Issue #551)

johanneswilm left a comment (w3c/editing#551)

> Assuming we agree that a built-in browser API is the right call, then we already have - almost - a great API for this. `execCommand("paste")` for text insertion and `execCommand("delete")` for deletion.

Unfortunately, `execCommand` doesn't play nice with modern editors - and not at all with `EditContext`. It leaves ` `-instances in ways that are uncontrollable and has generally been a nightmare for JS developers to work with. There is a reason why we moved away from `execCommand` more than a decade ago now. So unfortunately, I don't think `execCommand` is a good idea.

What could be done, if browser makers agree with your proposal to let extensions decide, is to flip the `isTrusted` for those beforeinput events to `true`.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3c/editing/issues/551#issuecomment-6044166521
You are receiving this because you are subscribed to this thread.

Message ID: <w3c/editing/issues/551/6044166521@github.com>

Received on Wednesday, 7 October 2026 18:24:42 UTC