When I use the paste button in the toolbar of TinyMCE it says "Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X/C/V keyboard shortcuts instead." It works perfectly in IE. Is there a way to make the Paste button useful in Chrome and FF? Perhaps using a custom button that executes a jQuery paste function that works with modern browsers.
editor.addButton('paste', {
icon: 'paste',
onclick: function () {
pastecontent();
}
});
function pastecontent(){
// get clipboard content
}
As the message from the editor states this is simply a limitation of what you can / cannot do directly via JavaScript in certain browsers. Whether or not you use jQuery you are still using JavaScript so the underlying limitation will exist.
Imagine what you could do if your arbitrary JavaScript could access the clipboard whenever it liked? "Bad people" don't play by the rules so what if (upon loading a web page) they had JavaScript that grabbed everything from the clipboard and sent it to their servers? Over time the browser manufacturers realized that direct access to the clipboard was "bad" ... by having the user type
CRTL+C and CRTL+V
you are effectively telling the browser you want it to access the clipboard.