Welcome Guest Search | Active Topics | Sign In | Register

Changing Image align in Editor's Design mode. Options
DiscoverSoft
Posted: Friday, June 29, 2012 10:46:22 AM
Rank: Advanced Member
Groups: Member

Joined: 2/27/2010
Posts: 69
I've been working in the Editor to create a customer toolbar button that will set a selected image's align property in Design mode. I've been successful with this in IE using javascript with the getCurrentElement() method then checking the outerHTML value to fetch the image tag information. I then simply revise it and update the html to set the alignment.

This works great in IE, but nothing else. Firefox lets me select the image and get the image handles, but doesn't seem to recognize that the image is selected using getCurrentElement (at least not consistantly). Neither Chrome and Safari lets me select the image; there are no image handles so I can't resize it and it's also not recognized use getCurrentElement.

Can you confirm this behavior and suggest a workaround or alternative? I would really like to offer my users the ability to resize and align images in Design mode with all major browsers.

Thanks
eo_support
Posted: Friday, June 29, 2012 11:51:37 AM
Rank: Administration
Groups: Administration

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

I don't think you should do that. HTML Editors are built on top of the browser and a browser's first priority is always to display a page rather than editing a page. So all browsers have this or that kind of quirks when it comes to editing --- selection being an issue that you have already observed. As such it's generally not a good idea to stretch it too far on editing.

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.