Announcement

Do not use the forums to submit bug reports, feature requests or patches, submit a New Ticket instead.

#1 2006-06-22 11:43:24

garyR
New member
Registered: 2006-06-22
Posts: 1

perform javascript after xinha initialises

Hi,  I have a page with a number of textareas on which xinha converts into seperate editors.  each textarea is enclosed in a div which allows me to toggle the visibility of the editor (or text area if the user elects not to use the editor in their prefs) by links.  However, if I set  display='none' for the div at the point where I generate the page, then when the user enables an editor (and javascript sets display=block for the div) it stays greyed out even if they click on it (ie won't accept focus), this is on Firefox btw, haven't tested it on IE yet.

To solve this, I am loading the page with all editors visible, and then would like to trigger a js function to set the initial state of each editor.  Is there a way I can trigger a javascript function after all the editors have loaded in and initialised? I have tried calling it from  onload in th ebody tag, but that appears to be called prior to xinha swapping textareas for editors.

thanks
Gary

Offline

#2 2006-06-26 00:01:07

gogo
Xinha Leader
From: New Zealand
Registered: 2005-02-11
Posts: 1,015
Website

Re: perform javascript after xinha initialises

xinha_editors.yourEditor._onGenerate = function() { /* do your stuff */ }

set it after makeEditors and before startEditors


James Sleeman

Offline

Board footer

Powered by FluxBB