[w3c/clipboard-apis] Allow setting value of primary clipboard buffer on linux (#81)

On most Linux distros middle click pastes last selected text.

For web editors that do not render all the visible text, or do not use browser selection, this behavior is impossible to replicate  https://github.com/ajaxorg/ace/issues/175 https://github.com/codemirror/CodeMirror/issues/931

On Chrome it is possible to use a hack, by putting the text into a hidden textarea and selecting it, but that causes performance issues, and doesn't work on other browsers.

It would be useful to either have a performant way to set the value of primary clipboard, or a way to set it when editor is blurred.

The old, [non-web clipboard api on firefox](https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XPCOM/Using_the_clipboard) provided [a way](https://github.com/MikeRatcliffe/Acebug/commit/af64219198f9406b679a733f4fab934789a0029a#diff-c5c243baded0b523064cfa50cc30c056R816) to do this.

-- 
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/clipboard-apis/issues/81

Received on Thursday, 16 August 2018 14:20:50 UTC