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.