Mark Erasmus
Mark Erasmus

Reputation: 2405

Textarea is briefly visible before TinyMCE renders

I am using the TinyMCE WYSIWYG editor for a ASP.NET MVC project. Although the editor is working, when the page loads the underlying textarea is visible for a brief moment before the editor kicks in - the raw textarea is visible for about, give or take, a second. Is there a way to only load the content once the TinyMCE editor is ready?

Upvotes: 2

Views: 634

Answers (2)

Mark Erasmus
Mark Erasmus

Reputation: 2405

I'm using Bootstrap and if I assign the textarea a class of hide (which essentially is just a display: none CSS style) the textarea is hidden, and the editor renders when it's initialized.

Upvotes: 3

Steve
Steve

Reputation: 1386

Populate the data on the TinyMCE's init event.

function myCustomOnInit() { 
        alert("We are ready to rumble!!");
}

tinyMCE.init({
        ...
        oninit : myCustomOnInit
});

code from http://www.tinymce.com/wiki.php/Configuration3x:oninit

Upvotes: 0

Related Questions