HTMLFormatProvider and font-style problem

3 posts, 1 answers
  1. Keiichi-kun
    Keiichi-kun avatar
    14 posts
    Member since:
    Dec 2010

    Posted 04 Sep 2011 Link to this post

    Hi all,
    I've a problem with HTMLFormatProvider and font-style.
    I'm using a radRichTextBox with richRibbonBar (but the problem is also present with a button that execute radRichTextBox1.toggleItalic() ). For example, I have write the string "foofoofoo" in italic inside radRichTextBox and then, using HTMLFormatProvider, I've got the text associated to the document. 

    This is the ExportToHTML function

    public string ExportToHTML(RadDocument document)
                HtmlFormatProvider provider = new HtmlFormatProvider();
                return provider.Export(document);            

    This is the string returned:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" ""><html xmlns=""><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>Untitled</title><style type="text/css">
    .p_4451D050 { margin: 0px 0px 12px 0px;text-align: left;text-indent: 0pt;padding: 0px 0px 0px 0px; } 
    .s_C54C634B { font-family: 'Calibri';font-style: System.Collections.Specialized.StringCollection;font-size: 16px;color: #000000; } 
    </style></head><body><p class="p_4451D050"><span class="s_C54C634B">foofoofoo</span></p></body></html>

    There is a problem in font-style settings of css class, because it doesn't write "italic" but "System.Collections....".
    So, when I send a html-email in this format I lost this font setting..

    I've tried with XamlFormatProvider and italic (as fontweight) is correct.

    Thanks a lot for your help
  2. Answer
    Svett avatar
    728 posts

    Posted 07 Sep 2011 Link to this post

    Hi Keiichi-Kun,

    Thank you for contacting us and for bringing our attention to this issue.

    I managed to reproduce it and I am glad to inform you that we located the problem and it will be addressed in our next major release. However, I was not able to find a work around suitable for the current release and I hope that this is not a show stopper for you. I updated your Telerik points accordingly.

    Please do not hesitate to contact me if you have further questions.

    the Telerik team

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

  3. DevCraft R3 2016 release webinar banner
  4. Keiichi-kun
    Keiichi-kun avatar
    14 posts
    Member since:
    Dec 2010

    Posted 27 Sep 2011 Link to this post

    thanks a lot for your reply, I've read on Sep 7 but I've got no time for reply until now, sorry..
    I think that the problem is not a big deal :)
    Thanks again
Back to Top