How should you upload content into Sitefinity?

Well, you can type it directly onto a page (or in a content block).
You can copy/paste plain text in, and then dress it up with HTML commands.
Or you can copy/paste text in from Word.

The last one is pretty common.  Word is, after all, extremely common in offices.
However, importing content from Word directly into Sitefinity—especially with older versions of Sitefinity—is not the best idea.

Why not?

Because with versions before 7.x, your pasted content will look exactly like it does in Word.

Which means whatever styling, fonts, colors, etc. your website has…they won’t show up. It will look like you dropped a Word document right in the middle of your site. Chunky text, the wrong colors, and so on. Your content becomes an eyesore.

Why This Happens: Word Formatting Sneaks into the Copy/Paste

Word uses its own formatting language “behind the scenes.” It’s based on the XML standard, and it applies whenever you select a Style from the Ribbon. “Normal”, for instance, often defaults to Calibri font, Size 11 text, Black color.

When you paste text from Word into another application—like Sitefinity’s Editor—this formatting comes with it.

See, Sitefinity tries to style content you enter according to one of two standards:

  1. CSS, the overall styling of the website.
  2. The formatting elements you enter in the Editor.

Formatting elements will typically override the website’s CSS. But this isn’t always a good thing. Styling is there for a reason: to make the overall site look consistent. If you break it with carried-over Word formatting, your site becomes less effective. (And ugly.)

What do we do? Best practice is to only upload clean text into Sitefinity. So we need some ways to clean your Word-formatted text, don’t we?

2 Ways to Import Clean Text from Word into Sitefinity

A. There is a “Strip Word Formatting” option in Sitefinity 7.x. You find it by opening the Page Editor.
Click the “More Formatting Options” button (top right). Locate the Format Stripper. It looks like this:

Strip Word Formatting

Click the arrow next to it, and select “Strip Word Formatting.”

This should clean out Word’s sneaky in-the-background formatting. However, it doesn’t always work perfectly. That’s not really Sitefinity’s fault; there’s just so much it can strip out before it finishes pasting.

If you still see Word-style formatting imposing itself on your content, switch to HTML Mode in the Editor and remove the unwelcome code. (Fair warning, there might be a LOT of it!)

B. You can also strip the Word formatting before you paste any content into Sitefinity. (This is what I do.)

You have two methods for accomplishing this:
–Paste into the HTML Mode window in Sitefinity’s Page Editor, or
–Use a stripping utility.

What I do is use a stripping utility – Notepad++. Pasting any Word text into a basic notepad utility, like Windows Notepad or Notepad++, automatically removes all formatting elements. You’re left with plain text. Which you can then paste into the Page Editor.

The same thing happens when you paste directly into the HTML Mode window in Sitefinity. Just plain text, nice and clean.

I take the extra step of pasting into Notepad++ because it lets me see if there’s any weird spacing or unnecessary symbols before I switch to Sitefinity. Plus I can enter HTML code around the text if I want to test out how the HTML will look.

Telerik has also provided a stripping utility. It’s on their Demos site:
Cleaning Word Formatting in WYSIWYG Editor for ASP.NET – TelerikUI

It gives you two windows: one for automatically stripping out Word formatting, the other for doing so manually. This has the added bonus of seeing what your content will look like in the Page Editor, without opening the Page Editor. Useful for testing HTML or playing with CSS styling before you upload anything to your site.

Cleaning Text is an Extra Step, But It Winds up Saving You Time

When building (or rebuilding) a website, you’ll need a lot of time to populate the content. Battling with leftover formatting can drain away hours…hours you really can’t afford to lose during population.

Stripping out Word formatting before you upload content into Sitefinity may be an extra step. But trust me, it won’t take nearly as much time as skipping it would!

Do your Sitefinity friends a favor. Forward this post to them before they start building their next website. It will save them time!

How to Import Content from Word to Sitefinity (Without Issues)

Leave a Reply

Your email address will not be published. Required fields are marked *