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

select iframe element

Support forum for WYMeditor.

select iframe element

Postby alexmac on Mon Nov 23, 2009 6:59 pm

hi everybody!
I have my first little question.

I create a button that insert html.
Example: "<div id='pippo'>alex</div>"

It's ok.

Now can i edit the div?
For example: can i set the text or html inside the div 'pippo' ? or can i remove the div?

Thanks,
Alex
alexmac
 
Posts: 1
Joined: Mon Nov 23, 2009 6:54 pm

Re: select iframe element

Postby mr_lundis on Tue Jan 05, 2010 9:14 pm

Hi
Just pass the iframe document body as directly or as a context to the jQuery function, like this:
Code: Select all
var wym = jQuery.wymeditors(0);
jQuery(wym._doc.body).doSomething();
// or
jQuery('expr', wym._doc.body).doSomething();


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 Support

Who is online

Users browsing this forum: No registered users and 3 guests