Hi,
I want to provide both Paste as well as Paste As Plain Text option. I tried various things. Such as hooking up key press event config.keystrokes = [[CKEDITOR.CTRL + CKEDITOR.SHIFT + 86, 'pastetext'], [CKEDITOR.CTRL + 86, 'paste']];
But the problem here is that it doesnt work well on IE. Also, I dont want to recieve that Modal dialog. Its very annoying to get modal dialog to perform Paste or Paste As Plaintext. How can I provide both Paste and Paste As Plain Text option, without getting that Annoying Modal dialog and it should work on all the browsers IE 8-10, Chrome, Firefox, Opera, Safari.
The problem with config.forcePasteAsPlainText = true; is that, if I copy\cut any formmated text from the editor and pasted back to the editor, it pastes the text as an plain text without retaining the format.
Please help.
Because of security
Because of security mechanisms implemented in browsers it is not possible to get clipboard data if user hasn't pressed CTRL+V or hasn't chosen the paste option from menu bar. The IE is an exception here, because it shows a security alert and allows user to decide whether he wants or not to grant the application access to clipboard.
Therefore the only possibility to get clipboard data on all browsers is to open this dialog. If you want to bind them to keystrokes, then use the config.keystroke property and bind it to commands: paste, pastetext and pastefromword.
Note: if you block the CTRL+V keystroke by attaching it to a command (even to paste), then it will start opening the dialog.
Piotrek (Reinmar) Koszuliński
CKEditor JavaScript Developer
--
CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+