Skip to content

Commit 630ef63

Browse files
committed
Add indentAuto to actions
1 parent 3857c92 commit 630ef63

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

notebook/static/notebook/js/actions.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -684,6 +684,16 @@ define([
684684
}
685685
}
686686
},
687+
'auto-indent': {
688+
cmd: i18n.msg._('automatically indent selection'),
689+
help : i18n.msg._('automatically indent selection'),
690+
handler : function(env) {
691+
// Get selected cell
692+
var selected_cell = env.notebook.get_selected_cell();
693+
// Execute a CM command
694+
selected_cell.code_mirror.execCommand('indentAuto');
695+
}
696+
}
687697
};
688698

689699
/**

0 commit comments

Comments
 (0)