Mura CMS / CKeditor paste as plain text by default

Any developer who uses a CMS with a wysiwyg text editor knows the frustrations of clients pasting content from MS Word and other word processing programs directly into the editor, complete with unwanted styles, and even markup elements, causing all sorts of problems on our otherwise perfectly-formatted pages.

Mura CMS uses the ubiquitous CKeditor (formerly FCK) with a number of features enabled by default, including a "Paste as Plain Text" button. If clients remembered to use this, we would be all set. But, they don't.

Fortunately, there's an easy one-line fix.
Just open up [siteid]\includes\themes\[theme]\js\editor\styles.js

and paste in this line

CKEDITOR.config.forcePasteAsPlainText = true;

That's it. All pasting of content should now be clean, with extra styles and markup removed, just as if you had clicked "paste as plain text" in the editor toolbar. 

Comments (Comment Moderation is enabled. Your comment will not appear until approved.)
Your name pops up more and more when I go to Google with questions. Thanks Michael
# Author Bill Betournay | 8/14/11 8:05 AM
Near-perfect timing: I need to replace the current WYSIWYG editor (a commercial product) on a web app with CKEditor because CKEditor does a better job cleaning up the MS Word code. And now thanks to this post, I don't even have to tell the users which editor button to click to clean up their content. Thanks!
# Author Brian Swartzfager | 8/15/11 7:57 AM
Thanks for posting this! Do you know if this has to be done per theme or is there a way to make this 'global' throughout Mura, regardless of the site or theme being used?
# Author Christian Ready | 11/20/11 10:10 PM
I am pretty sure this has to be enabled on each theme, since that's where the editor looks for the styles.js. If you find out different, let me know.
# Author Michael Evangelista | 11/20/11 10:16 PM
blogcfc 5.9.1.002 by raymond camden
contact michael evangelista