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

hide tools until skin is loaded

Support forum for WYMeditor.

hide tools until skin is loaded

Postby bally on Mon Feb 09, 2009 5:14 am

Using 0.5-b2, FF3.0.5

Every time a page loads with Wym, I can see the Tools & Containers ULs and other stuff for a brief moment before the skin is loaded. It's rather unsightly and I've been searching for a way to hide these. The problem is here:

Code: Select all
      //load html in wymbox
      jQuery(this._box).html(boxHtml);
     
      //hide the html value
      jQuery(this._box).find(this._options.htmlSelector).hide();
     
      //enable the skin
      this.loadSkin();


Until loadSkin() has finished running, the ULs and everything else will be visible on the page. I couldn't find anything about this so I've fixed it myself. Just after this-box is created, set its visibility to "hidden" (better than display, because your form will collapse and pop open again).

Code: Select all
this._box = jQuery(this._element).hide().after(this._options.boxHtml).next();
this._box.css('visibility', 'hidden');


At the end of init() toggle the visibility:

Code: Select all
this.loadSkin();
this._box.css('visibility', 'visible');


I'm posting this here in case someone else needs it.
bally
 
Posts: 4
Joined: Mon Dec 15, 2008 12:27 am

Return to Support

Who is online

Users browsing this forum: No registered users and 2 guests

cron