Re: [editing] Reference actions in clipboard API spec for execCommand copy/cut/paste (#61)

@hallvors I have tried to incorporate the various points people made here in the issues to the editing specs. The execCommand spec draft has not changed as the only suggestion there really is for it to just be deprecated and the behavior not specified any further.

What we need for paste is a way to catch the users intent to paste certain text/html. We can add this to the input-events spec if it is not something you think should be in the clipboard-api.

For copy and cut, the main thing we need is a way to change the HTML/text that is being copied, and a way to preventDefault() the copying/cutting operation itself. The deletion that the cutting operation entails should be something the JS could should be able to handle itself. 

So for that we probably need either a JS function to add certain text/HTML as an entry to the clipboard, or a way to interrupt a copy operation and exchange the data that will be added to the clipboard. From what I can tell of the current spec draft, the copy action event should be enough for that. Any reason this wouldn't work?

I don't think we need a way to trigger copy/cut/paste from JS directly beyond that. Or at least I cannot imagine how to do that without causing a security issue by giving all JS universal access to the clipboard.

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

Received on Monday, 3 August 2015 13:09:02 UTC