How can I hide the TinyMCE outline if the field is inactive?

Requirements:

  • in enter show TinyMCE controll bar
  • c open the hidden TinyMCE control panel

Would I do it with blur / focus? What do I need to do to show and hide the tinymce control panel?

+3


source to share


2 answers


To work with the tinymce initialization configuration, the following configuration parameter must be set: (jQuery js library).



setup : function(ed) {

    ed.onInit.add(function(ed, event) {
        $(ed.getBody()).blur(function() {
          $('#' + ed.id + '_tbl '+'.mceToolbar').hide();
        });

        $(ed.getBody()).focus(function() {
          $('#' + ed.id + '_tbl '+'.mceToolbar').show();
        });

    });
},

      

+3


source


If it just hides the toolbar, there is a plugin, I think with the latest Tinymce we have an option. Will this work? http://www.tinymce.com/wiki.php/API3:method.tinymce.ui.Toolbar.remove



0


source







All Articles