Welcome Guest Search | Active Topics | Sign In | Register

HTML Editor Image alignment Options
DiscoverSoft
Posted: Wednesday, December 1, 2010 3:44:46 PM
Rank: Advanced Member
Groups: Member

Joined: 2/27/2010
Posts: 69
Any chance we could add image alignment to uploaded images in the editor? We can obviously do this by adjusting the HTML code, but would like to allow the novice to reposition the image via a toolbar button.

Just a thought

Thanks for your great tools.

eo_support
Posted: Wednesday, December 1, 2010 4:15:35 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,071
Hi,

I am not sure if I understand your question correctly. There are already "Left align", "right align" buttons on the toolbar. They can be used to align both image and text.

Thanks!
DiscoverSoft
Posted: Wednesday, December 1, 2010 4:44:03 PM
Rank: Advanced Member
Groups: Member

Joined: 2/27/2010
Posts: 69
Thanks for your quick reply. I'm talking about aligning the image, not the paragraph
- via: align="right/left/etc"

Samples per your Editor - Right to Left Demo

-- This is aligned via the 'Right' toolbar icon -------------------------------------------------

<p style="text-align: right;">This is useful for right to left languages such as Hebrew.<img src="/Demos/File Explorer/Files/001.jpg" /></p>


-- This I've changed via HTML code to shift the image to the right of the text -----------------

<p style="text-align: right;">This is useful for right to left languages such as Hebrew.<img align="right" src="/Demos/File Explorer/Files/001.jpg" /></p>


Sorry for the confusion.
eo_support
Posted: Wednesday, December 1, 2010 5:14:43 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,071
Hi,

I see what you meant. It's unlikely that we will add that one because align property on image tag is being marked as deprecated. However you should be able to customize the toolbar to add your own buttons to do so. You will need to handle the button's onclick event, then call getCurrentElement on the client side Editor object to get the current selected DOM element. If you see it's an img object, you can just set its align property to the desired value.

Thanks!
DiscoverSoft
Posted: Wednesday, December 1, 2010 5:27:43 PM
Rank: Advanced Member
Groups: Member

Joined: 2/27/2010
Posts: 69
Okay, thanks for the work-around.

I guess I should use <img src="/Demos/File Explorer/Files/001.jpg" style="float: right;" /> as the correct syntax. Might I suggest you consider that one for the future.

Thanks.
eo_support
Posted: Wednesday, December 1, 2010 5:30:15 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,071
Yes. Float will be something to consider.

Thanks


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.