This is a migrated thread and some comments may be shown as answers.

Change "Apply CSS class" behaviour

1 Answer 103 Views
WebParts for SharePoint
This is a migrated thread and some comments may be shown as answers.
Michael
Top achievements
Rank 1
Michael asked on 30 Oct 2007, 04:58 AM
Hi,

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?

Thanks,

Michael

1 Answer, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 05 Nov 2007, 02:35 PM
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:

<paragraphs> 
     <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'>" /> 
</paragraphs> 


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?


Regards,
Georgi Tunev
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
WebParts for SharePoint
Asked by
Michael
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Share this question
or