- From: Olivier Forget <notifications@github.com>
- Date: Thu, 23 Apr 2015 10:49:39 -0700
- To: w3c/editing-explainer <editing-explainer@noreply.github.com>
- Message-ID: <w3c/editing-explainer/issues/47@github.com>
In our discussions it seems we have arrived at the conclusion that in the context of cE=typing, a user triggers an `Intent`, which can be captured by developer as an Event. Developer can then use `execCommand` or something else to perform the intended edit. So the flow, as I understand it is: ``` User Intent => Event Code => custom DOM code or execCommand ``` This is supposed to work for all user edits, like "new line", "delete", etc... I noticed though that the `cut` `copy` and `paste` events, which are the closest things we have to User Intents in UAs are now triggered by `execCommand`. I think IE has been doing this for a while, but now it's in the spec and implemented in Chrome 43. See http://www.w3.org/TR/2015/WD-clipboard-apis-20150421/#the-copy-action I made this Fiddle that demonstrates a minimal implementation: http://jsfiddle.net/teleclimber/y5xqtbL2/ So you can see now the pattern is: ``` execCommand => Event Code => allow event to continue or preventDefault and do custom work ```` This is completely backwards from the way we want to do things. This may not be a huge deal, but it would be weird if developers had to use `Intents` for everything except clipboard ops where they have to use `execCommand`. It's inconsistent. --- Reply to this email directly or view it on GitHub: https://github.com/w3c/editing-explainer/issues/47
Received on Thursday, 23 April 2015 17:58:24 UTC