This is a migrated thread and some comments may be shown as answers.

Content Property and get_html() on Compatability View

0 Answers 37 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Amjad asked on 23 Jul 2012, 09:54 AM

I am using rad editor, my issue occurs when when I set Content property to fill rad editor with HTML on server side page load event, then invoke RadEditor.get_html(True) on client side event OnClientLoad; I noticed that Divs I set on server side is missing on client side.

It gives me different HTML Structure (Different than server side's Content property).

It  used to work fine for me when i was using teleik version  2009.1.527.35 but after i upgraded to 2011.3.1305.35 version the issue appeared.

Please note that the issue appears when I set Browser Mode to IE9 Compatability View.

Below is the properties for RadEditor:
<rad:RadEditor ID="EmailBody" runat="server" Width="100%" ToolsFile="~/_CSS/EditorBasicTools.xml"
                       OnClientLoad="EmailBody_OnClientLoad" StripFormattingOptions="NoneSupressCleanMessage" Skin="Default"
                       SpellCheckSettings-DictionaryPath="~/App_Data/RadSpell/" SpellCheckSettings-DictionaryLanguage="en-US"
                       EditModes="Design"  ContentFilters="RemoveScripts, FixUlBoldItalic, FixEnclosingP, IECleanAnchors, MozEmStrong, IndentHTMLContent, EncodeScripts, OptimizeSpans">
                           <rad:EditorContextMenu Enabled="false" TagName="IMG">
                           <rad:EditorContextMenu Enabled="false" TagName="A">

Below is the value for the server side Content property :
<div id='dvEmailHistory'><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b><span style='font-size:12.0pt;font-family:"Times New Roman"'>From:</span></b><span style='font-size:12.0pt;font-family:"Times New Roman"'> <br /><b>Sent:</b> 4/24/2012 3:26:00 PM<br /><b>To:</b><br /><b>Cc:</b> <br /><b>Subject:</b> RE: Test<o:p></o:p></span></p></div><br/><html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="" xmlns="">
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
/* Font Definitions */
    panose-1:2 15 5 2 2 2 4 3 2 4;}
    panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
a:link, span.MsoHyperlink
a:visited, span.MsoHyperlinkFollowed
@page WordSection1
    {size:8.5in 11.0in;
    margin:1.0in 1.0in 1.0in 1.0in;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">This is the email body..... <span style="font-size:8.0pt;font-family:"Tahoma","sans-serif";color:#8AB131"><o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>

Below is value for client side get_html(true) property:
    <BODY lang=EN-US vLink=purple link=blue>
        <DIV class=WordSection1>
        <P class="MsoNormal">This is the email body.....<SPAN style="FONT-FAMILY: 'Tahoma','sans-serif'; COLOR: #8ab131; FONT-SIZE: 8pt"><o:p></o:p></SPAN></P>
        <P class="MsoNormal"><o:p> </o:p></P>

Please note that the div "dvEmailHistory" is missing when trying to read the value from client side.

Your help is highly appreciated.

No answers yet. Maybe you can help?

Asked by
Top achievements
Rank 1
Share this question