From 630ef639dd570e4320798b5df32e462151140490 Mon Sep 17 00:00:00 2001 From: Grant Nestor Date: Fri, 5 Jan 2018 15:42:27 -0800 Subject: [PATCH] Add indentAuto to actions --- notebook/static/notebook/js/actions.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/notebook/static/notebook/js/actions.js b/notebook/static/notebook/js/actions.js index b01a72d8c5..86151914cb 100644 --- a/notebook/static/notebook/js/actions.js +++ b/notebook/static/notebook/js/actions.js @@ -684,6 +684,16 @@ define([ } } }, + 'auto-indent': { + cmd: i18n.msg._('automatically indent selection'), + help : i18n.msg._('automatically indent selection'), + handler : function(env) { + // Get selected cell + var selected_cell = env.notebook.get_selected_cell(); + // Execute a CM command + selected_cell.code_mirror.execCommand('indentAuto'); + } + } }; /**