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

IMG Height and Width Tags

3 Answers 64 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Max
Top achievements
Rank 1
Max asked on 31 Oct 2013, 03:52 PM
Currently the RadEditor is only adding the following when inserting an image: 

style="width: 166px; height: 98px;"

I need the Height and Width tags added to the img as follows:

height="166" style="height: 166px; width: 98px;" width="98" 

What can be done so that the RadEditor will automatically add the height and image tags as bolded in the above? 

Edit:

Please note that I am using the latest version of Telerik Asp.Net Ajax tools aka (ASP.NET AJAX Q3 2013)

3 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 01 Nov 2013, 03:18 PM
Hello,

You can achieve this by enabling the ConvertInlineStylesToAttributes content filter. Review the following help article and online demo.
http://www.telerik.com/help/aspnet-ajax/editor-content-filters.html
http://demos.telerik.com/aspnet-ajax/editor/examples/builtincontentfilters/defaultcs.aspx

One of the most common usage of this filter is email editing scenario, when decoration should be achieved by attributes and not css properties.

In addition you can create your custom content filter as it is explained in the following online demo: http://demos.telerik.com/aspnet-ajax/editor/examples/contentfilters/defaultcs.aspx

Regards,
Rumen
Telerik
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 the blog feed now.
0
Max
Top achievements
Rank 1
answered on 13 Nov 2013, 02:53 AM
Hi,

Sorry for the late reply, as I was out of office.

The editor is being used to create an email message.

The content filter ConvertInlineStylesToAttributes did solve my problem.

Are there any other Content Filters I should use to ensure the emails looks fine across all browsers/mail clients?

Thanks,

Max G
0
Ianko
Telerik team
answered on 14 Nov 2013, 01:14 PM
Hello Max,

I would not recommend disabling another built-in filters, because they are intended to handle the editor's content in the browsers.

I suggest checking if there are some crucial changes of the email's layout and trying to investigate the source of such issues. After you are sure why such problems might occur, go to the online demo about the built-in content filters and check if there is a filter that could help you to solve the problem.

Regards,
Ianko
Telerik
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 the blog feed now.
Tags
Editor
Asked by
Max
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Max
Top achievements
Rank 1
Ianko
Telerik team
Share this question
or