Image float feature request

4 posts, 0 answers
  1. Steve
    Steve avatar
    1851 posts
    Member since:
    Dec 2008

    Posted 13 Jul 2012 Link to this post

    Could you guys do me a favour and please append a class like "floated-left" or "floated-right" to an image in addition to the style="float:left" when we use the editor to insert an image.

    The problem is it's impossible to style the image.  Like if it's floated left I wouldnt want any left margin\padding, and floated right I wouldnt want any right margins or padding...

    I'm having to hack it in with jQuery, and I'd much rather not have that processing cost on every page load if it could be handled with css
    $("img[style]", "#content-wrapper").each(function () {
        if ($(this).css("float") === "left" || $(this).css("float") === "right") {
            $(this).addClass("floated-" + $(this).css("float"));
        }
    });

    Thx, Steve
  2. Rumen
    Admin
    Rumen avatar
    12851 posts

    Posted 18 Jul 2012 Link to this post

    Hello,

    You can easily apply append this class using the OnClientPasteHtml event of RadEditor which is fired when an image is inserted via the Image Manager. You can find examples how to handle this event and customize the content returned by different editor tools in this live demo: OnClientPasteHtml.

    Best regards,
    Rumen
    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Steve
    Steve avatar
    1851 posts
    Member since:
    Dec 2008

    Posted 18 Jul 2012 Link to this post

    Hey Rumen, I'm actually looking for a PITS issue not a workaround :)

    This is for sitefinity, but moreover I'd think EVERY designer\admin on a site that gives users access to such a freeform editing tool would want to manage the styling of something like that which can throw-off the layout and flow of a page.
  5. Stefani Tacheva
    Admin
    Stefani Tacheva avatar
    7 posts

    Posted 20 Jul 2012 Link to this post

    Hello Steve,

    I have logged a feature request for you. You can track its status and vote for its popularity on PITS in the following URL. I hope we will implement such functionality in the near feature.

    Please let me know if I can be of further assistance. I will be glad to help you!

    Regards,
    Stefani Tacheva
    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.
Back to Top