Email Password  
Sign up (it's free) Forgot password?  

Pasting from Word and other rich text sources

Pasting from Word and other rich text (text that contains formatting and images) sources can be problematic for content management systems. Word in particular generates a huge amount of invisible markup code for very little visible text.

Why is this a problem? It makes your pages larger (more bytes), so they will take longer to load. The markup code may also confuse search engines and lead to poorer results. The styles in the pasted content will not be controlled by the content management system so you will not be able to change the stylesheet and have the styles in the pasted content change.

Having said all that, sometimes, if you have produced a lovely one off table in Word or Excel you really do want to paste into your website and have it look pretty much like it did in Word or Excel.

How does iCode deal with pasted content?

When you paste content into iCode from Word or other rich text sources you are presented with a few options:

You can strip out all the formatting and just leave the paragraphs and line breaks in place. All styling will then be done from your iCode website's stylesheet. It will be as compact as possible and compliant with web standards.
  • Keep all formatting. Which is only recommended in exceptional circumstances. This will preserve the original styling. The code will take more bytes and it may not be compliant with web standards. It's a trade off.
  • Keep paragraphs, headings and tables. If there are tables in the pasted content then these will be retained. Inline styling will be removed and the table will be given classNames so that pasted tables can be formatted with the stylesheet. More.
  • Keep paragraphs and headings. Strips out all the inline formatting but leaves the headings in place. So, for example if some text is in an H1 tag (HTML for Heading level 1) it will still be in an H1 tag in your website. Of course it may look very different because your website's stylesheet now controls the appearance of H1 tags. It will still be as compact as possible and compliant with web standards.
  • Keep paragraphs. This will strip out all the formatting and just leave the paragraphs and line breaks in place. This will result in the most compact content.