Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

July 29th F2F Agenda Item - Opt-in/opt-out of editing features and menus #35

Closed
chong-z opened this issue Sep 21, 2016 · 1 comment
Closed

Comments

@chong-z
Copy link
Contributor

chong-z commented Sep 21, 2016

Original issue w3c/editing#141, w3c/editing#93

In summary, we want to be able to specify 2 lists of allowed/disallowed editing features for

  1. Individual editing hosts, and
  2. Preferably avoid polluting the HTMLElement interface
    • Maybe a new HTMLElement subclass? Not sure it will work for cE

@johanneswilm has proposed a solution w3c/editing#93 (comment)

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"
@chong-z
Copy link
Contributor Author

chong-z commented Sep 21, 2016

Oh actually this shouldn't be moved to w3c/input-events, closing.

@chong-z chong-z closed this as completed Sep 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant