Re: [editing-explainer] execCommand has now been spec'd to trigger a "User Intent" for cut/copy/paste (#47)

@hallvors No, we would of course need to spec the execCommands if we were to depend on them. We are just creating a new way of editing text (just allow text insertion into text nodes and moving the caret) and everything else will have to be handled via Javascript -- whcih then again can choose to use execCommand for some things, should that be available, but could also just manipulate the DOM through javascript directly.
So according to this plan, there will be an intermediate step between the user showing an intent and the browser response to that. If no piece of JavaScript is listening for a specific intent event, nothing will happen. This seems to go against the clipboard spec which seems to say that paste will take place within an editable environment, unless it's cancelled with preventDefault, correct?

The "intent events" we are defining here should be related to text input inside of cE=typing. If you want to create a button for for example, creating a new line, you can simply listen for the button click and then execute the same function you have associated with the "new line intent".


---
Reply to this email directly or view it on GitHub:
https://github.com/w3c/editing-explainer/issues/47#issuecomment-95864947

Received on Friday, 24 April 2015 09:13:01 UTC