Word Text in Movable Type (DON'T DO IT)

| | Comments (2)

Pasting text from Word into Movable Type can be tricky. Take this innocuous looking

I am a simple sentence with no formatting (pasted from Word).


Ha! That's what you think. You've actually pasted the code below. It looks good now in a blog entry, but I did discover a "feature" that in some of the widgets, the MS code is the one displayed. At least it's Unicode ;)



<meta name="Title" content="">
<meta name="Keywords" content="">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="ProgId" content="Word.Document">
<meta name="Generator" content="Microsoft Word 2008">
<meta name="Originator" content="Microsoft Word 2008">
<link rel="File-List" href="file://localhost/Users/ejp10/Library/Caches/TemporaryItems/msoclip/0/clip_filelist.xml">
<!--[if gte mso 9]><xml>
 <o:OfficeDocumentSettings>
  <o:AllowPNG/>
 </o:OfficeDocumentSettings>
</xml><![endif]--><!--[if gte mso 9]><xml>
 <w:WordDocument>
  <w:Zoom>0</w:Zoom>
  <w:TrackMoves>false</w:TrackMoves>
  <w:TrackFormatting/>
  <w:PunctuationKerning/>
  <w:DrawingGridHorizontalSpacing>18 pt</w:DrawingGridHorizontalSpacing>
  <w:DrawingGridVerticalSpacing>18 pt</w:DrawingGridVerticalSpacing>
  <w:DisplayHorizontalDrawingGridEvery>0</w:DisplayHorizontalDrawingGridEvery>
  <w:DisplayVerticalDrawingGridEvery>0</w:DisplayVerticalDrawingGridEvery>
  <w:ValidateAgainstSchemas/>
  <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
  <w:IgnoreMixedContent>false</w:IgnoreMixedContent>
  <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
  <w:Compatibility>
   <w:BreakWrappedTables/>
   <w:DontGrowAutofit/>
   <w:DontAutofitConstrainedTables/>
   <w:DontVertAlignInTxbx/>
  </w:Compatibility>
 </w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
 <w:LatentStyles DefLockedState="false" LatentStyleCount="276">
 </w:LatentStyles>
</xml><![endif]-->
<style>
<!--
 /* Font Definitions */
@font-face
    {font-family:Cambria;
    panose-1:2 4 5 3 5 4 6 3 2 4;
    mso-font-charset:0;
    mso-generic-font-family:auto;
    mso-font-pitch:variable;
    mso-font-signature:3 0 0 0 1 0;}
 /* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
    {mso-style-parent:"";
    margin:0in;
    margin-bottom:.0001pt;
    mso-pagination:widow-orphan;
    font-size:12.0pt;
    font-family:"Times New Roman";
    mso-ascii-font-family:Cambria;
    mso-ascii-theme-font:minor-latin;
    mso-fareast-font-family:Cambria;
    mso-fareast-theme-font:minor-latin;
    mso-hansi-font-family:Cambria;
    mso-hansi-theme-font:minor-latin;
    mso-bidi-font-family:"Times New Roman";
    mso-bidi-theme-font:minor-bidi;}
@page Section1
    {size:8.5in 11.0in;
    margin:1.0in 1.0in 1.0in 1.0in;
    mso-header-margin:.5in;
    mso-footer-margin:.5in;
    mso-paper-source:0;}
div.Section1
    {page:Section1;}
-->
</style>
<!--[if gte mso 10]>
<style>
 /* Style Definitions */
table.MsoNormalTable
    {mso-style-name:"Table Normal";
    mso-tstyle-rowband-size:0;
    mso-tstyle-colband-size:0;
    mso-style-noshow:yes;
    mso-style-parent:"";
    mso-padding-alt:0in 5.4pt 0in 5.4pt;
    mso-para-margin:0in;
    mso-para-margin-bottom:.0001pt;
    mso-pagination:widow-orphan;
    font-size:12.0pt;
    font-family:"Times New Roman";
    mso-ascii-font-family:Cambria;
    mso-ascii-theme-font:minor-latin;
    mso-fareast-font-family:"Times New Roman";
    mso-fareast-theme-font:minor-fareast;
    mso-hansi-font-family:Cambria;
    mso-hansi-theme-font:minor-latin;}
</style>
<![endif]-->

<!--StartFragment-->

<p class="MsoNormal">I am a simple sentence with no formatting (pasted from Word). <span style="font-family: &quot;Times New Roman&quot;;"><o:p></o:p></span></p>

<!--EndFragment--><br />
<br />

------------------------------
Postscript
Brad Kozlek from Blogs at Penn State contacted me to let me know that they have fixed the system so that Word Code is no longer displayed in the widgets, but it only applies to blogs created after Jan 2010 or those with refreshed templates.

2 Comments

MARY ELIZABETH JANZEN Author Profile Page said:

We have the same Word gobbledegook problem as content contributors to the TLT Plone site. As a result, I always still switch to code view before pasting and hand-code the HTML both there and in MT4. Of course, I'm a control freak--and a neat freak. Clutter = shudder.

ELIZABETH J PYATT Author Profile Page said:

I've been using Dreamweaver in these situations - I can design in WYSIWYG mode then switch to code view and cut and paste the result. There's a lot you can do in WYSIWYG mode and the code is a lot cleaner.

Leave a comment