Re: [editing] Add a mechanism to opt-in/opt-out editing features (#93)

I'm glad to discover you have plans to do this. In the clipboard API we had a (mis)feature inherited from IE, intended to let the script tell the browser that commands copy, cut and paste were enabled at times when the browser would otherwise not consider them enabled. That spec should rely on whatever you develop here instead.

One strawman I have been throwing around is 

```
document.setCommandEnabledState('copy', true);
// or 
document.setCommandState('copy', 'enabled'); // or 'disabled', 'auto', maybe even 'indeterminate'
```
and I sort of like this. With a ```document.enumerateCommands()``` that returns all commands known to ```document.execCommand`` in this browser, it would be trivial to disable all but a few whitelisted ones..

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

Received on Tuesday, 8 March 2016 22:04:06 UTC