Forum closed. New forum available at http://community.wymeditor.org/

Problem in image alignment achieved by applying style

Discuss features, code, contributions, ideas, suggestions, ...
For bugs, patches and feature requests, please post on the Trac:
http://trac.wymeditor.org/

Problem in image alignment achieved by applying style

Postby dotnethero on Mon Feb 16, 2009 1:33 pm

Hi Friends,

I've got a problem in image alignment achieved by applying style to image on click of icons of left/right and center icons.

Please look at this page : http://wym.vipullimbachiya.com/release/index.html

Try to insert an image in WYM and then click on align right icon, the handlers for dragging image will be shown at the previous image location even image is shifted to write.

I've tried setting wym._selected_image = null; and wym._doc.body.focus(); but dint worked.

Please help me.


Thanks,
Vipul
dotnethero
 
Posts: 2
Joined: Mon Feb 16, 2009 1:15 pm

Re: Problem in image alignment achieved by applying style

Postby dotnethero on Tue Feb 17, 2009 2:08 pm

I add in details,

I've achieved this by creating a different js file which adds tool bar icons left,right and center to WYM and on click of this icons it will apply class to selected item.

Created classes r,c and l (right,center and left) and applied it to selected item, this all works fine as expected.

But while after applying class to image the resize handler of the image is still appear at the previous position of an image.

I tried to set focus to WYM body using
wym._doc.body.focus();

But dint worked, neither wym._selected_image = null; works.

Please help


Thanks,
Vipul
dotnethero
 
Posts: 2
Joined: Mon Feb 16, 2009 1:15 pm

Re: Problem in image alignment achieved by applying style

Postby mr_lundis on Fri Feb 20, 2009 4:57 pm

Hi!

This is not a WYMeditor issue, as these handles are draw by the browsers designMode implementation. Thus I don't really have a good solution for you.

The only thing I can think of is trying so simulate a click inside the editor area or changing the selection. If this don't work, then try to search the web for other answers.

Cheers!
Jonatan Lundin - designer, developer and forum moderator. You should follow me on Twitter!
mr_lundis
 
Posts: 335
Joined: Sun Dec 02, 2007 10:59 am
Location: Sweden


Return to Developers

Who is online

Users browsing this forum: No registered users and 5 guests