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

change inline styles to class..

3 Answers 57 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Paul
Top achievements
Rank 1
Paul asked on 29 Sep 2010, 01:55 PM
At the moment, aligning items to the right will produce <p style="text-align:right"> etc.. for many other options also.

Is there a way to by pass this to place <p class="right"> instead. this would help us with updating our editor for our current setup.

Many Thanks,

Paul.

3 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 29 Sep 2010, 03:21 PM
Hello Paul,

RadEditor for ASP.NET AJAX is designed to produce valid XHTML compliant content with inline styles instead of using the obsolete inline attributes.

What you can do to achieve your scenario is to disable the ConvertToXhtml filter:

RadEditor1.DisableFilter(EditorFilters.ConvertToXhtml);

You can find more information in this article: Content Filters.

All the best,
Rumen
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Paul
Top achievements
Rank 1
answered on 29 Sep 2010, 03:45 PM
Hi

Thanks for the reply. generating valid xhtml is a must for use with the editor. would this be a big task to remove the old alignment button and add my own custom button that inputs <p class="right"> instead? that would solve this issue i am having.

Thanks,

Paul.
0
Rumen
Telerik team
answered on 30 Sep 2010, 10:16 AM
Hello Paul,

Thanks for the additional information.

You should not strop the ConvertToXhtml filter or replace the Align buttons. What you can do is to write your own custom content filter that will replace the style=text-align: with class= using a regular expression or DOM.

Kind regards,
Rumen
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Editor
Asked by
Paul
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Paul
Top achievements
Rank 1
Share this question
or