Sitecore has several built-in features to help you paste "clean" HTML onto your site, and to help you strip unnecessary styling and HTML tags. Extra styling and tags can cause errors in the page layout, and can lead to inconsistent Drexel branding.
Paste or Ctrl+V
Pastes content and formatting in spans.
Paste from Word
Paste from Word, strip font
Paste plain text
Paste as HTML
Format Stripping Tools
Strip all formatting
Strip CSS formatting
Strip font elements
Strip span elements
Strip Word formatting
Manually Editing HTML
When importing from Microsoft word it is important to make sure you clear out all excess styling and content in the Tags. This is important since extra styling will sometimes cause errors in the layout as well as branding differences across Drexel.edu.
Below is an example of HTML code from a Microsoft Word document imported with the "Paste from Word" feature in Sitecore.
Notice the extra P tags, extra styling, and all around the text. To fix this first remove all extra P tags that are blank or have no text in them.
Once the empty P tags are out of the code delete the extra styling in the leftover P tags. For example:
<p style="font-size:16px; font-weight:bold;">
This will rid of extra styling that conflicts with the rest of Drexel.edu. Our final code would look like this after getting rid of the extra styles.
Paste from Word
- Copy from Word
- Click the “Paste from Word”
- Icon Strips Out Unnecessary Word Styling
- Do NOT paste directly from word into Sitecore
Cleaning up Content
Use the Format Stripper to remove any unnecessary styling.
Examples of Correct HTML Code vs Incorrect HTML Code
Correct HTML Code
This is HTML that does not contain any unncessary styling.
Incorrect HTML Code
This is an example of HTML that contain unncessary styling such as span tags and extra spacing tags.
For a more detailed explanation of cleaning up your HTML code visit our Cleaning up HTML page.