HtmlFormatProvider and class

2 posts, 0 answers
  1. Louis Bouchard
    Louis Bouchard avatar
    94 posts
    Member since:
    Feb 2010

    Posted 31 Oct 2010 Link to this post

    Hello,

    The HtmlFormatProvider (or something else) can remove the <style type="text/css>...</style> and use directly the class attribute in the HTML generated?

    It's because I use ReportViewer from Microsoft and I have a field HTML formated (in the rdlc file I use the option HTML - Interpret HTML tags as styles)

    By example, changing  this :

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>Untitled</title><style type="text/css">
    .p_2F83C0B6 { margin: 0px 0px 12px 0px;text-align: lefttext-indent: 0pt;padding: 0px 0px 0px 0px; } 
    .s_6EC33F51 { font-family: 'Times New Roman';font-style: Italic;font-weight: bold;font-size: 26,67px;color: #000000;background-color: #FFFF00; }   
    </style></head><body><p class="p_2F83C0B6"><span class="s_6EC33F51">asf asdfasd fasdfasd f</span></p></body></html>


    By this :

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <
    html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type"
    content="text/html; charset=utf-8" /><title>Untitled</title></head><body>
    <
    p style="margin: 0px 0px 12px 0px;text-align: lefttext-indent: 0pt;padding: 0px 0px 0px 0px;">
    <
    span style="font-family:'Times New Roman';font-style: Italic;font-weight: bold;font-size: 26,67px;color: #000000;background-color: #FFFF00;">
    asf asdfasd fasdfasd f</
    span></p></body></html>


  2. Mike
    Admin
    Mike avatar
    640 posts

    Posted 01 Nov 2010 Link to this post

    Hello Louis Bouchard,

    Please check the following post:
    http://www.telerik.com/community/forums/silverlight/richtextbox/printing-a-raddocument-without-assigning-to-a-radrichtextbox.aspx
    for an answer.
    Let us know if this does not help.

    Greetings,
    Mike
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top