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"
Original issue https://github.com/w3c/editing/issues/141, https://github.com/w3c/editing/issues/93
In summary, we want to be able to specify 2 lists of allowed/disallowed editing features for
HTMLElement
interfaceHTMLElement
subclass? Not sure it will work forcE
@johanneswilm has proposed a solution https://github.com/w3c/editing/issues/93#issuecomment-225386782
We can then have both opt in and out and a keyword "all" that enables or disables everything. Something like: