FCKEditor is an in-browser Javascript WYSIWYG editor. It has a useful "paste as plain text" function which removes all formatting from the text in the clipboard before pasting it into the editor. Always make FCKEditor paste as plain text Home | About Chris Hope | Contact Chris Hope | Search: Tweet Always make FCKEditor paste as plain text Posted November 11th, 2008 in FCKEditor FCKEditor is an in-browser Javascript WYSIWYG editor. It has a useful "paste as plain text" function which removes all formatting from the text in the clipboard before pasting it into the editor. This is useful for getting rid of all the additional HTML rubbish that Microsoft Word copies to the clipboard. This post looks at the function and then how to always enable the paste as plain text function in FCKEditor and a "gotcha" in Firefox. The three paste icons in FCKEditor look like so, the first one being a regular paste, the second paste as plain text and the third paste from Word: The paste from Word one doesn't actually remove a lot of the formatting HTM rubbish so it's almost always better to use the paste as plain text function and then re-format it to get rid of the bloated HTML. You can make FCKEditor always paste as plain text globally by adding the following line to the fckconfig.js file (or your own custom configuration file): FCKConfig.ForcePasteAsPlainText = true; or to a specific editor by doing it in code, as in the following PHP example: $oFCKeditor = new FCKeditor('editornamehere'); ... $oFCKeditor->Config["ForcePasteAsPlainText"] = true; ... $oFCKeditor->Create(); This works beautifully in Internet Explorer which simply pastes the clipboard contents into the editor after removing all the formatting. The Firefox "gotcha" is that it opens up the regular "paste as plain text" window first, you then have to click into the editor, and Ctrl+V paste again. The regular "paste as plain text" dialog is shown below: This is a real nusiance and makes it a bit unusable for Firefox. If the people who will be using FCKEditor will be using Firefox at all it's probably best to not enable this automatic paste as plain text functionality and just get people to use the paste as plain text button when they need to do this until the FCKEditor developers have fixed this issue. I haven't tried this out in Safari or Opera so don't know if it has the same problem in those browsers. Related posts: Language selection with FCKEditor (Sunday, February 22nd 2009)Insert HTML into FCKEditor (Friday, February 13th 2009)Remove "Browse" button and "Upload" tab in FCKEditor Link dialog (Tuesday, January 20th 2009)FCKeditor $nbsp; after capital letters and colons (Wednesday, January 7th 2009)Using the FCKEditor HTML Editor with PHP (Wednesday, August 20th 2008)FCKEditor: Using a custom configuration file (Saturday, August 9th 2008) Comments blog comments powered by Disqus Subscribe/Follow RSS Feed Facebook Twitter Advertiser Information and Statistics Main Categories HTML/CSS Javascript/jQuery Other Categories Apache Applications Case Studies Email Marketer Email Servers FCKEditor Glossary Hardware/Gadgets Linux/Unix/BSD MySQL PHP Miscellaneous Networking OSX Quick Tips SilverStripe SQL Server VMWare Windows My other websites Healthy Online Kidzstuff NZ Web Directory Linux CD Mall NZ Running Calendar Recipes Database Tattoo Samoan Popular Posts How to check and uncheck a checkbox with jQuery How to get and set form element values with jQuery Setting cookies with jQuery Using setTimeout() with Javascript Add a new option to a select with jQuery Delete All Data in a MySQL Table How to tell if an element is visible with jQuery Clear a form with jQuery Loading content with jQuery AJAX - using a loading image Maximum length for MySQL TEXT field types Recent posts: Master Mobile Web Apps with jQuery Mobile 3rd EditionHow to configure the "limit results" with NagiosFailed to add the host to the list of known hostsIgnore existing files or update only newer files with rsyncGet a mail server's IP address with PHPSend Ctrl+Alt+Delete to VMWare FusionRemap quit and close tab shortcut keys etc in Mac OS X Other Stuff Copyright Info Privacy Policy
Αστρολογία, ζώδια σήμερα, ωροσκόπιο, αστρολογικές προβλέψεις ...Τα όνειρά σου κρύβουν σημαντικά νοήματα και προβλέψεις για το μέλλον σου, διάβασε τώρα την ερμηνεία τους! ...
Eνημέρωση σε θέματα ιατρικής & υγείας,ΣΥΜΒΟΥΛΕΣ ΓΙΑ ΤΗΝ ΥΓΕΙΑ ΤΟΥ ΣΩΜΑΤΟΣ ΚΑΙ ΤΟΥ ΠΝΕΥΜΑΤΟΣ ... συμβουλές υγείας,πως θα μπορέσουμε να βελτιώσουμε τον τρόπο ζωής μας ...
Tv-Movies-Ελληνικές ταινίες, τηλεοπτικές σειρές, εκπομπές και μουσική - Greek movies, tv series, tv shows and music, Ελληνικές ταινίες, τηλεοπτικές σειρές, εκπομπές και μουσική