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

Image float feature request

3 Answers 24 Views
Editor
This is a migrated thread and some comments may be shown as answers.
sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
sitefinitysteve asked on 13 Jul 2012, 01:16 PM
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

3 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 18 Jul 2012, 07:14 AM
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.
0
sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
answered on 18 Jul 2012, 11:53 AM
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.
0
Stefani Tacheva
Telerik team
answered on 20 Jul 2012, 03:33 PM
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.
Tags
Editor
Asked by
sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
Answers by
Rumen
Telerik team
sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
Stefani Tacheva
Telerik team
Share this question
or