javascript - When using tinyMCE, is there a way to get a reference to the toolbar from an editor's instance? -


i'm using tinymce, inline mode, , in cases need ability show/hide toolbar of active editor using javascript. should like:

tinymce.activeeditor.gettoolbar() // gettoolbar doesn't exist 

only given editor instance, couldn't find way reference toolbar.

also note there might several toolbars on page, 1 displayed @ given time.

the toolbar initialized this:

     tinymce.init({                 selector: "#" + id,                  menubar: false,                 inline: true,                 theme: "modern",                 oninit: "setplaintext"                 ... 

thanks.

there discussion on tinymce forum. suggests:

...     setup: function (theeditor) {         theeditor.on('focus', function () {             $(this.contentareacontainer.parentelement).find("div.mce-toolbar-grp").show();         });         theeditor.on('blur', function () {             $(this.contentareacontainer.parentelement).find("div.mce-toolbar-grp").hide();         });         theeditor.on("init", function() {             $(this.contentareacontainer.parentelement).find("div.mce-toolbar-grp").hide();         });     } ... 

Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -