IMG Height and Width Tags

4 posts, 0 answers
  1. Max
    Max avatar
    5 posts
    Member since:
    Oct 2013

    Posted 31 Oct 2013 Link to this post

    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)

  2. Rumen
    Admin
    Rumen avatar
    14324 posts

    Posted 01 Nov 2013 Link to this post

    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.
  3. Max
    Max avatar
    5 posts
    Member since:
    Oct 2013

    Posted 12 Nov 2013 Link to this post

    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
  4. Ianko
    Admin
    Ianko avatar
    1934 posts

    Posted 14 Nov 2013 Link to this post

    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.
Back to Top