style tag is stripped out when using "TemplateEditor.Text = " or "TemplateEditor.XHTML ="

Last post 04-09-2013, 6:53 AM by Kenneth. 1 replies.
Sort Posts: Previous Next
  •  04-05-2013, 2:06 PM 77174

    style tag is stripped out when using "TemplateEditor.Text = " or "TemplateEditor.XHTML ="

    I am trying to populate the editor with HTML that has this style tag after the title tag <style type=\"text/css\">

    but it is getting stripped out by the editor and displaying the styling text and then the rest of the Html. The result is that the editor displays the text of the styling and then displays the page content of the html .

    Is there a method or property that prevents this behavior? I need the style tag to remain in the editor so that it can display the page with the styling in the editor.

  •  04-09-2013, 6:53 AM 77183 in reply to 77174

    Re: style tag is stripped out when using "TemplateEditor.Text = " or "TemplateEditor.XHTML ="

    Hi artsaliva,

     

    To keep the <style> target, please set property EnableStripStyleTagsCodeInjection to false.

     

        <CE:Editor ID="Editor1" runat="server" EnableStripStyleTagsCodeInjection="false">
                </CE:Editor>
     

    Regards,

     

    Ken 

View as RSS news feed in XML