tags:

views:

103

answers:

1

Can I intercept a keystroke in CKEditor (the tab key) and replace the default behavior? I want the tab key to insert a div with margin.

A: 
this.editorInstance.on( 'tab', function(evt){

    evt.editor.insertHtml('span style="margin-left: 40px;">&nbsp;</span>');

    evt.cancel();
    return false;
})
Upper Stage