Friday, August 7, 2009

Why the URL colors changed suddenly?

Copying content from MS Word and pasting directly on to the Blogger post editor can upsets the template styles and on most occasions, it directly affects the URL colors (i.e. the link, visited link colors etc). Over the past six months or so I have observed this question getting raised on the Blogger help forums several times and on all occasions it was caused by the same reason. (see this one for example)

Here's how it happens.

The text editor in MS Word is referred to as a Rich Text editor, meaning that it support various rich formatting such as bold, italics, different fonts and colors and also many styles such as Heading 1, Heading 2, Body Text and so on. It's true that Blogger editor also gives some formatting options, but MS Word offers much much more style and formatting options. In order to support these additional formatting, MS Word keeps a whole lot of meta data in addition to the basic text you type. If you copy some text from a Word document, all the meta data also gets copied in the background and, when you directly paste that on to Blogger, you get that whole gamut of meta data as well. (Paste a single word directly from MS Word, go to the Edit HTML mode of Blogger editor and see the amount of meta information that get's pasted for that single word)

Once you publish such a post, your template styles get messed up due to the styles copied over from MS Word and the final result will be problems such as the one describe above.

If you draft your posts using MS Word, first pasting on to a simple text editor such as Notepad will strip off all the style information and will leave you with only the text you typed. Then copy from Notepad and paste on to Blogger editor. You will now have all what you typed minus all the formatting (such as bold, italics, fonts etc). This obviously has the problem of you having to reapply all the formatting using the Blogger's editor, but that is a safer approach as it will not mess up your template styles.

(Note: Same problem can occur with other Rich Text editors as well)