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

@rniwa @rniwa: I actually came up with a usecase where it would not be enough to just set these for the entire page: Say I have a main editor and a footnote editor. Footnotes cannot quite contain the same styling as the main content. So I need to be able to edit these per editing context.

How about we say we start out with browser determined defaults in terms of what is enabled and what is disabled. This should take of the case where editor developers don;t care what is enabled and just want the browser to manage it all.

We can then have both opt in and out and a keyword "all" that enables or disables everything. Something like:

```
let el = document.getElementById('editor')
let editor = el.getEditor()

editor.disableCommands(['all']) // disables everything
editor.enableCommands(['copy','paste','cut','bold','underline']) // reenables the given array of commands
editor.checkCommands(['enlarge']) // True if the browser's UI supports a command with the name "enlarge"


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

Received on Saturday, 11 June 2016 19:01:06 UTC