mirror of
https://github.com/jupyter/notebook.git
synced 2025-01-12 11:45:38 +08:00
Merge pull request #3175 from gnestor/issue-2591
Add Jupyter action for CodeMirror indentAuto command
This commit is contained in:
commit
7b5bd66cf7
@ -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');
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user