Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

tinymce - initially hide()

I am able to create a tinymce editor, and toggling the editor on and off. Upon initially creation, is there a preferred way to have it hidden (not actually hidden, but editor off and just show the div)?

tinymce.init({
    'selector': "#divID"
});

tinymce.editors['divID'].hide();
tinymce.editors['divID'].show();
like image 542
user1032531 Avatar asked Dec 26 '22 21:12

user1032531


1 Answers

This is what I eventually did. Don't know if there is a better way, but it works.

tinymce.init({
    'selector':'#divID',
    setup: function(ed) {
        ed.on('init', function(e) {
            e.target.hide();
        });
    }
});
like image 71
user1032531 Avatar answered Jan 16 '23 10:01

user1032531