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

[Solved] clear class

4 Answers 105 Views
Editor
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 1
John asked on 28 Sep 2008, 07:51 AM
Dear Sir or Madam,
When I add the tool ApplyClass to the editor, I get a dropdown list with styles and "Clear Class". Is it possible to get the "Clear Class"  functionality in a separate button? I do not need to add CSS classes.
Kind regards,
Barbara

4 Answers, 1 is accepted

Sort by
0
George
Telerik team
answered on 30 Sep 2008, 12:56 PM
Hi John,

The requested functionality is not supported out of the box. What I suggest is to implement your own functionality that achieves the desired behavior.

For reference you may review the following article: 
http://www.telerik.com/help/aspnet-ajax/addingyourownbuttons.html

Regards,
George
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
John
Top achievements
Rank 1
answered on 01 Oct 2008, 05:47 PM
Dear George,
Thank you, I will make a custom button. But still one question. Do you have a commandName for the "clear class" functionality which I can use in the javascript?

<script type="text/javascript">
Telerik.Web.UI.Editor.CommandList["Custom1"] = function(commandName, editor, args)
{
  
alert("Custom command 1");
  
//for example you can apply bold formatting by firing the editor.fire("Bold");
}
;

......................

I would like the same implementation as the "Clear class" functionality in the editor in the "ApplyClass" dropdownlist 

Kind regards, Barbara
0
George
Telerik team
answered on 02 Oct 2008, 02:05 PM
Hi John,

The editor's built-in Clear Class functionality cannot be used without the ApplyClass tool, because the Clear Class itself is applying an empty string to the desired element using the ApplyClass tool e.g. 
editor.fire("ApplyClass","");

I hope this helps.

Best wishes,
George
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
John
Top achievements
Rank 1
answered on 07 Jun 2009, 03:23 PM

 

 

 

Tags
Editor
Asked by
John
Top achievements
Rank 1
Answers by
George
Telerik team
John
Top achievements
Rank 1
Share this question
or