mirror of
https://github.com/jupyter/notebook.git
synced 2025-01-18 11:55:46 +08:00
Merge pull request #2431 from acrule/paste-enable-action-link
Redirect paste menu items to call actions
This commit is contained in:
commit
e1ba0075f6
@ -283,6 +283,12 @@ define(function(require){
|
||||
env.notebook.copy_cell();
|
||||
}
|
||||
},
|
||||
'paste-cell-replace' : {
|
||||
help: 'paste cells replace',
|
||||
handler : function (env) {
|
||||
env.notebook.paste_cell_replace();
|
||||
}
|
||||
},
|
||||
'paste-cell-above' : {
|
||||
help: 'paste cells above',
|
||||
help_index : 'eg',
|
||||
|
@ -1567,11 +1567,14 @@ define([
|
||||
var that = this;
|
||||
if (!this.paste_enabled) {
|
||||
$('#paste_cell_replace').removeClass('disabled')
|
||||
.on('click', function () {that.paste_cell_replace();});
|
||||
.on('click', function () {that.keyboard_manager.actions.call(
|
||||
'jupyter-notebook:paste-cell-replace');});
|
||||
$('#paste_cell_above').removeClass('disabled')
|
||||
.on('click', function () {that.paste_cell_above();});
|
||||
.on('click', function () {that.keyboard_manager.actions.call(
|
||||
'jupyter-notebook:paste-cell-above');});
|
||||
$('#paste_cell_below').removeClass('disabled')
|
||||
.on('click', function () {that.paste_cell_below();});
|
||||
.on('click', function () {that.keyboard_manager.actions.call(
|
||||
'jupyter-notebook:paste-cell-below');});
|
||||
this.paste_enabled = true;
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user