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

Changing the default behavior for Image Alignment

3 Answers 95 Views
Editor
This is a migrated thread and some comments may be shown as answers.
SteadyRain Developer
Top achievements
Rank 1
SteadyRain Developer asked on 07 Sep 2011, 06:05 PM
Currently, if you use the RadEditor to align an image to the left or right of content, the editor proceeds to add the following code to the image tag:

style="float: left;

We would like the default behavior for image alignment to instead add the following code to the image tag:

align="left"

I've tried turning off filters such as "ConvertToXhtml" but the float style still gets inserted.

Can anyone tell me if this change is possible?

Thanks in advance.

3 Answers, 1 is accepted

Sort by
0
Dobromir
Telerik team
answered on 08 Sep 2011, 07:03 PM
Hi Joe,

RadEditor offers a built-in content filter that converts the inline CSS to corresponding HTML attributes, which is disabled by default. To achieve this functionality you need to enable the filter using the following code:
RadEditor1.EnableFilter(Telerik.Web.UI.EditorFilters.ConvertInlineStylesToAttributes);

More information regarding RadEditor's built-in content filters is available in the following live demo:
Editor / Built-in Content Filters

Best wishes,
Dobromir
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

0
SteadyRain Developer
Top achievements
Rank 1
answered on 22 Sep 2011, 09:22 PM
Can you tell me what version of the RadEditor DLL supports the ConvertInlineStylesToAttributes filter?

From what I'm working on, I can tell that the Telerik.Web.UI.dll Version 2010.3.1317.35 does not support that filter, nor does the 2011.1.519.35 version.

Please advise.

Thank you
0
Dobromir
Telerik team
answered on 23 Sep 2011, 08:20 AM
Hi Joe,

The ConvertInlineStylesToAttributes filter was introduced in RadControls for ASP.NET AJAX Q2 2011 (ver 2011.2.712).

Regards,
Dobromir
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Tags
Editor
Asked by
SteadyRain Developer
Top achievements
Rank 1
Answers by
Dobromir
Telerik team
SteadyRain Developer
Top achievements
Rank 1
Share this question
or