Change "Apply CSS class" behaviour

2 posts, 0 answers
  1. Michael
    Michael avatar
    5 posts
    Member since:
    Oct 2007

    Posted 29 Oct 2007 Link to this post


    I notice that the "Apply CSS Class" dropdown will apply multiple CSS clases over the top of items by adding in a new tag
    (ie. <font class="class1>)

    Three questions - is it possible to make the Apply CSS class apply a paragraph rather than a font tag? - I have a CSS in the customer css for a paragraph (for a code block) but it doesn't work as the class is applied to the font rather than the paragraph.

    Is it possible to make the apply class drop down clear any existing previously applied font classes?

    Is it possible to make the default css class when the editor starts up a particular class?


  2. Georgi Tunev
    Georgi Tunev avatar
    7207 posts

    Posted 05 Nov 2007 Link to this post

    Hi Michael,

    Up to your questions:

    1.  By design, the css class will be applied to the font element (or a span if convertfonttospan is set to true). Your scenario is possible by modifying the ToolsFile.xml and provide custom paragraph styles to your "Paragraphs" dropdown:

         <paragraph name="&lt;H1>Heading 1&lt;/H1>" value="&lt;H1>" /> 
         <paragraph name="&lt;H2>Heading 2&lt;/H2>" value="&lt;H2>" /> 
         <paragraph name="&lt;H3>Heading 3&lt;/H3>" value="&lt;H3>" /> 
         <paragraph name="My Custom Paragraph" value="&lt;p class='myclass'>" /> 

    2. This functionality is enabled by default - you need to use the Clear Style option from the dropdown (see attached screenshot).

    3. Can you please elaborate some more on that? What exactly do you want to achieve?

    Georgi Tunev
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Back to Top