I'm using Redactor 2 and I set config air: true and plugin: ['codemirror']. The issue is when I click on html button the air toolbar disappears and is not possible to have toolbar on redactor again.

Is there a solution?

Thanks in advance.

3 Answers 3


I found a quick solution to show toolbar when hover code mirror

 callbacks: {   
   init: function() {    

But the issue is the same when i have more then one redactor in same page, because it shows both toolbar...

Any help on this ? Thanks

  • Try changing $('.redactor-air') to $(this).closest('.redactor-air') inside the hover event callback function. Oct 29, 2016 at 18:26

The right thing to do is

var that = this;
var id = $(that.$editor).attr('id')
var idnumber = id.replace('redactor-uuid-','')


init: function()

Now its ok, its only opens one if you have more than one

THanks Carlos Vieira


I created a callback on click in the .CodeMirror-gutters:

init: function(e) {
    var a = this.codemirror;
        if(a.$textarea.hasClass('open')){ a.hide(); }

and added a Material Icons code icon to the .CodeMirror-gutters:after css:

.CodeMirror-gutters:after {
    font-family: 'Material Icons';
    content: '\E86F';

so that when the user clicks the gutter in 'source' mode, it toggles back to 'visual' mode.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.