RichTextBox - What is HtmlExportSettings.ForbiddentPropertiesForExportCollection?

2 posts, 0 answers
  1. Dustin
    Dustin avatar
    79 posts
    Member since:
    Oct 2012

    Posted 27 Sep 2012 Link to this post

    There is a new property in the HtmlExportSettings called ForbiddentPropertiesForExportCollection. What is this and how do you use it?
  2. Mihail
    Admin
    Mihail avatar
    192 posts

    Posted 02 Oct 2012 Link to this post

    Hello Dustin,

    First of, this property will be obsoleted in Q3 2012 and another property will be available named  "PropertiesToIgnore" which will work in the same way. You can think of it as renaming it.

    The purpose of this property is to allow specified attributes or style properties to be ignored during export. 

    Here is full list of properties which can be ignored and example of how to use it:

    htmlExportSettings.ForbiddentPropertiesForExportCollection["span"].Add("color");
    htmlExportSettings.ForbiddentPropertiesForExportCollection["span"].Add("text-decoration");
    htmlExportSettings.ForbiddentPropertiesForExportCollection["span"].Add("font-weight");
    htmlExportSettings.ForbiddentPropertiesForExportCollection["span"].Add("font-style");
    htmlExportSettings.ForbiddentPropertiesForExportCollection["span"].Add("font-family");
    htmlExportSettings.ForbiddentPropertiesForExportCollection["span"].Add("font-size");
    htmlExportSettings.ForbiddentPropertiesForExportCollection["span"].Add("dir");
      
    htmlExportSettings.ForbiddentPropertiesForExportCollection["p"].Add("margin-top");
    htmlExportSettings.ForbiddentPropertiesForExportCollection["p"].Add("margin-bottom");
    htmlExportSettings.ForbiddentPropertiesForExportCollection["p"].Add("margin-left");
    htmlExportSettings.ForbiddentPropertiesForExportCollection["p"].Add("margin-right");
    htmlExportSettings.ForbiddentPropertiesForExportCollection["p"].Add("line-height");
    htmlExportSettings.ForbiddentPropertiesForExportCollection["p"].Add("text-indent");
    htmlExportSettings.ForbiddentPropertiesForExportCollection["p"].Add("text-align");
    htmlExportSettings.ForbiddentPropertiesForExportCollection["p"].Add("direction");
      
    htmlExportSettings.ForbiddentPropertiesForExportCollection["table"].Add("border-top");
    htmlExportSettings.ForbiddentPropertiesForExportCollection["table"].Add("border-bottom");
    htmlExportSettings.ForbiddentPropertiesForExportCollection["table"].Add("border-left");
    htmlExportSettings.ForbiddentPropertiesForExportCollection["table"].Add("border-right");
    htmlExportSettings.ForbiddentPropertiesForExportCollection["table"].Add("table-layout");
    htmlExportSettings.ForbiddentPropertiesForExportCollection["table"].Add("margin-left");
    htmlExportSettings.ForbiddentPropertiesForExportCollection["table"].Add("border-spacing");
      
    htmlExportSettings.ForbiddentPropertiesForExportCollection["td"].Add("border-top");
    htmlExportSettings.ForbiddentPropertiesForExportCollection["td"].Add("border-bottom");
    htmlExportSettings.ForbiddentPropertiesForExportCollection["td"].Add("border-left");
    htmlExportSettings.ForbiddentPropertiesForExportCollection["td"].Add("border-right");
    htmlExportSettings.ForbiddentPropertiesForExportCollection["td"].Add("padding");
    htmlExportSettings.ForbiddentPropertiesForExportCollection["td"].Add("vertical-align");


    A more detailed article on the use of this setting will be provided with Q3 2012.


    All the best,
    Mihail
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. DevCraft banner
Back to Top