Using the online ckeditor http://sdk.ckeditor.com/samples/classic.html I see the past options (Paste, Paste as plain text and paste from word) doesn't copy from clipboard. I gives the error 'Your browser does not allow you to paste plain text this way. Press Ctrl+Shift+V to paste.' But it seems to work in IE(it prompts for allow access) and not in Chrome or Firefox.
Is this a bug or some configurations needs to done from browser or ckEditor. Cause I remember I used the same behavior few months back and it used to give a popup to paste you content to the editor.
Thanks, Vijai
Just add this code to config.js:
CKEDITOR.on("instanceReady", function(event) {
event.editor.on("beforeCommandExec", function(event) {
// Show the paste dialog for the paste buttons and right-click paste
if (event.data.name == "paste") {
event.editor._.forcePasteDialog = true;
}
// Don't show the paste dialog for Ctrl+Shift+V
if (event.data.name == "pastetext" && event.data.commandData.from == "keystrokeHandler") {
event.cancel();
}
})
});
Chrome does not allow this because this is a security hole. Someone could steal your copied data so chrome and most other browsers do not allow you to do this. press ctrl shift and v to paste it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With