Softmedia Blog:

Removing Microsoft Sludge from your Kentico Content

August 22, 2011

If you are pasting content from Word into Kentico, and the styles from the original document are coming along with it, you might need to take action to rescue your site from an evil soup of conflicting styles. There are a number of scenarios where a writer might need to cut and paste from Word on a regular basis. Some people do not like writing directly into a content management system; they may have another app they use for their writing and then move it to the CMS once their work is complete. Or perhaps they are moving old content to the web that previously existed only in Word or PowerPoint. Your website probably has its own style guides, which can run into trouble with Word and Open Office since they can carry over their own style tags. The Word styles may not agree with the look and feel your company wants to maintain. In this case it is first necessary to clear the text of all "Microsludge", or the verbose, semi hidden code that Word employs to control the look and feel of your site text. Rather than manually editing each item in the Kentico editor in order to purge the Microsludge, we'd like to suggest a number of more efficient, less tedious methods of removing these style tags and put your content management system back in charge.

Make Word Clear the Style for You

2010 and 2007 Microsoft products can clear it for you:

2010 Word and PowerPoint

 

2007 Word and PowerPoint

If you are using an older version than that, you will have to try another method. Some people have found the newer versions don't always clear all the tags, so check out the other solutions listed below if this is what you are up against.

Get an Kentico editor patch

Depending on what editor is being employed by your Kentico CMS, you may be able to add a patch that will automatically filter out Word tags. This cuts out most of the trouble and allows you to then go directly to adding your site style guides in Kentico. If you are not a developer, you'll need to request this from whoever is running your website. It's certainly worth your time and effort.

Using an Text Editor to Kill the Styles

Start by copying and pasting the text into a editor like Notepad ++ (not regular Notepad), Textwrangler, bBedit, etc., then find the "clear text formatting" function; most serious text editors will have one, but it might take a moment or two to find it in the menus. Once you find it, se;ect the text in question and then hit the button. Your text should be ready to be added to Kentico.

Use Google Docs / an Online Code Editor

Cutting and pasting into Google Docs or any online editor that has a clear formatting function works just like I explained earlier with the text editor solution.

Using Lowly Notepad

Notepad can be found on any Windows machine, and if you do not have IT staff available at that moment to help you with the aforementioned solutions, you may be forced to use this in a pinch. Cut and paste here first, then cut a paste the content into Kentico

Wrapping Up

These techniques will remove the Microsludge but aren't going to help you put the correct style tags in place. That said, you should now have a starting point that is not going to be any more difficult that creating a brand new page and writing directly into Kentico, so life is good.

Posted: 8/22/2011 4:45:43 PM by