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
|
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!
|