Re: [w3c/editing] [beforeinput] PreventDefault() on InputType=cut differs from Clipboard API (#144)

> Actually I was thinking we should use the `Opt-in/opt-out` to control whether `cut` is enabled, if it's enabled CTRL+X and CTRL+C should always write something to the Clipboard (the data will be decided by `Clipboard API`).

OK, well given that we haven't yet figured out how to define this opt-in/out mechanism, that might work. We need to make sure this is an option then. 

I has been thinking we may end up with a simple additional attribute for contenteditable for Safari to provide an editor with the same menu options as all the other browsers (that means: spell checker, clipboard actions, but no formatting options). That seems to be the main and possible currently only real-world usecase for this feature that JS editors have been asking for so far. With the exception of the usecase you just mentioned.

Another issue with using opt-in/out may be that it will be set for the entire editor. What if there is a little note below the editor: "You can copy the text, but you are not allowed to copy the photos." and a JS mechanism which prevents the cut/copy whenever someone tries to copy/cut a selection which includes images? Maybe not a super common usecase.

> To stop things from appearing on the Clipboard JS should disable `cut` or `copy` through `Opt-in/opt-out`.

Yes, maybe this could work.

-- 
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/144#issuecomment-240572121

Received on Wednesday, 17 August 2016 22:45:34 UTC