? CuteEditor changing HTML content on load

Last post 12-27-2006, 12:35 PM by fredd. 0 replies.
Sort Posts: Previous Next
  •  12-27-2006, 12:35 PM 25371

    ? CuteEditor changing HTML content on load

    CuteEditor seems to be changing content when loading files.
     
    We loaded an HTML page using the LoadHTML method. The original page is:
     
     
    <html xmlns:o="urn:schemas-microsoft-com:office:office"
    xmlns:w="urn:schemas-microsoft-com:office:word"
    xmlns="
    http://www.w3.org/TR/REC-html40">
    <head>
    <meta http-equiv=Content-Type content="text/html; charset=windows-1252">
    <meta name=ProgId content=Word.Document>
    <meta name=Generator content="Microsoft Word 11">
    <meta name=Originator content="Microsoft Word 11">
    <link rel=File-List href="This_files/filelist.xml">
    <title>This</title>
    <!--[if gte mso 9]><xml>
     <o:DocumentProperties>
      <o:Author>Mr ABC</o:Author>
      <o:LastAuthor>Mr ABC</o:LastAuthor>
      <o:Revision>1</o:Revision>
      <o:TotalTime>1</o:TotalTime>
      <o:Created>2006-11-26T23:18:00Z</o:Created>
      <o:LastSaved>2006-11-26T23:19:00Z</o:LastSaved>
      <o:Pages>1</o:Pages>
      <o:Words>2</o:Words>
      <o:Characters>18</o:Characters>
      <o:Company>Dalco</o:Company>
      <o:Lines>1</o:Lines>
      <o:Paragraphs>1</o:Paragraphs>
      <o:CharactersWithSpaces>19</o:CharactersWithSpaces>
      <o:Version>11.6568</o:Version>
     </o:DocumentProperties>
    </xml><![endif]--><!--[if gte mso 9]><xml>
     <w:WordDocument>
      <w:SpellingState>Clean</w:SpellingState>
      <w:GrammarState>Clean</w:GrammarState>
      <w:PunctuationKerning/>
      <w:ValidateAgainstSchemas/>
      <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
      <w:IgnoreMixedContent>false</w:IgnoreMixedContent>
      <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
      <w:Compatibility>
       <w:BreakWrappedTables/>
       <w:SnapToGridInCell/>
       <w:WrapTextWithPunct/>
       <w:UseAsianBreakRules/>
       <w:DontGrowAutofit/>
      </w:Compatibility>
      <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
     </w:WordDocument>
    </xml><![endif]--><!--[if gte mso 9]><xml>
     <w:LatentStyles DefLockedState="false" LatentStyleCount="156">
     </w:LatentStyles>
    </xml><![endif]-->
    <style>
    <!--
     /* 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-fareast-font-family:"Times New Roman";}
    @page Section1
     {size:8.5in 11.0in;
     margin:1.0in 1.25in 1.0in 1.25in;
     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:10.0pt;
     font-family:"Times New Roman";
     mso-ansi-language:#0400;
     mso-fareast-language:#0400;
     mso-bidi-language:#0400;}
    </style>
    <![endif]-->
    </head>
    <body lang=EN-US style='tab-interval:.5in'>
    <div class=Section1>
    <p class=MsoNormal>This</p>
    <p class=MsoNormal align=right style='text-align:right'>That</p>
    <p class=MsoNormal>The other</p>
    </div>
    </body>
    </html>
     

     CuteEditor's HTML view shows this:
     

    <html>
        <head>
            <title>This</title>
            <meta http-equiv=Content-Type content="text/html; charset=windows-1252">
            <meta content=Word.Document name=ProgId>
            <meta content="Microsoft Word 11" name=Generator>
            <meta content="Microsoft Word 11" name=Originator>
            <link href="This_files/filelist.xml" rel=File-List><style>
    <!--
     /* 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-fareast-font-family:"Times New Roman";}
    @page Section1
     {size:8.5in 11.0in;
     margin:1.0in 1.25in 1.0in 1.25in;
     mso-header-margin:.5in;
     mso-footer-margin:.5in;
     mso-paper-source:0;}
    div.Section1
     {page:Section1;}
    -->
    </style>
            <link href="http://cutesoft.net/oneto1/class/qword.css" rel=stylesheet>
        </head>
        <body lang="EN-US" style="tab-interval: .5in">
            <div class=Section1>
            <p class=MsoNormal>This</p>
            <p class=MsoNormal style="TEXT-ALIGN: right" align=right>That</p>
            <p class=MsoNormal>The other</p>
            </div>
        </body>
    </html>
     

     
    It's impossible to know if the user has made any changes if CuteEditor doesn't respect and preserve the original content. Further, the changes are not correct since they remove critical information (Author, Revision, State, etc.) that we need to preserve.
     
    How can I ensure that the various Load functions do NOT modify the inbound content?
     
    If there is no fix to this problem, then how do I capture the editor's Text property AFTER CuteEditor has made changes?
     
     
     
View as RSS news feed in XML