Ajay
Ajay

Reputation: 604

How to move out of quill editor using tab

I am using AngularJS. Currently when I press tab in quill editor it adds a tab character. Is there a way I can configure the editor so when I press tab or any special key I move out to next component.

Upvotes: 5

Views: 2968

Answers (2)

Roby B.
Roby B.

Reputation: 61

Another way to do this is directly using the modules prop, as shown here

modules = {
    keyboard: {
      bindings: {
        tab: {
          key: 9,
          handler: function (range, context) {
            return true;
          },
        },
      },
    }
  }

Upvotes: 6

Vishal
Vishal

Reputation: 71

quill.keyboard.addBinding({ key: 'tab' }, function(range) {
    // Call focus event and specify input which you want highlight
    // return true;
});

Upvotes: 1

Related Questions