Hello,
I've been working on customizing the CKEditor and so far it has been fairly straightforward. However now I have something I'd like to modify on which I haven't found any useful information.
Is it possible to make it so that upon pasting something in the editor (almost) all html formatting is removed?
I don't need the code for the actual removal but a pointer as to where a routine like this can be plugged into the CKEditor core. In other words is there a callback to a function triggered upon pasting content or a way to set up such a callback?
Thank you for any and all help,
CassiusLonginus
I've been working on customizing the CKEditor and so far it has been fairly straightforward. However now I have something I'd like to modify on which I haven't found any useful information.
Is it possible to make it so that upon pasting something in the editor (almost) all html formatting is removed?
I don't need the code for the actual removal but a pointer as to where a routine like this can be plugged into the CKEditor core. In other words is there a callback to a function triggered upon pasting content or a way to set up such a callback?
Thank you for any and all help,
CassiusLonginus
Re: Modify 'paste' behavior
Sometimes this forum just makes me want to face palm.
config.ForcePasteAsPlainText
Better yet:
http://lmgtfy.com/?q=Ckeditor+paste+plain+text&l=1
Re: Modify 'paste' behavior
Re: Modify 'paste' behavior
In long, if you're willing to mess around with some plugins than you could probably do it. You'd have to look at the clipboard and pastetext plugins and come up with some happy medium between normal functionality and plainText functionality. It looks like the plain text functionality actually comes from the browsers in some instances, so you'd probably want to make a paste plugin that pastes normally then strips all the elements you don't want.