I would like to strip all style attributes when people use the default "Paste" button, or Ctrl+V. I don't mind if HTML is pasted, but I don't want any other formatting to get through.
Can CKEditor be configured like this?
Can CKEditor be configured like this?
Re: Remove style attribute on paste
Re: Remove style attribute on paste
Are you looking for forcePasteAsPlainText?
Wiktor Walc
CTO, CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+
Re: Remove style attribute on paste
Has this question been answered as we are trying to do the same thing?
Unfortunately forcePasteAsPlainText removes the tables info too, which we wish to keep.
We're looking to use CKEditor in our CMS. However, we require all style elements being stripped out so as not to override the website styling by our publishers who tend to paste from word.
Remove Style on Paste
I've found a way to do this by adjusting the CKEditor.js file.
For instance, to remove the margin-left / margin-right styling you can adjust the file as follows:
To remove the td / th styling you can do the following
Hope this helps.