Merge pull request #3175 from gnestor/issue-2591

Add Jupyter action for CodeMirror indentAuto command
This commit is contained in:
Thomas Kluyver 2018-01-08 19:45:49 +00:00 committed by GitHub
commit 7b5bd66cf7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -685,6 +685,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');
}
}
};
/**