diff --git a/src/public/javascripts/services/entrypoints.js b/src/public/javascripts/services/entrypoints.js index 55270ca52..082e1c1e0 100644 --- a/src/public/javascripts/services/entrypoints.js +++ b/src/public/javascripts/services/entrypoints.js @@ -177,4 +177,15 @@ export default class Entrypoints extends Component { this.triggerCommand('moveBranchIdsTo', {branchIds: selectedOrActiveBranchIds}); } + + async createNoteIntoCommand() { + const note = appContext.tabManager.getActiveTabNote(); + + if (note) { + await noteCreateService.createNote(note.noteId, { + isProtected: note.isProtected, + saveSelection: false + }); + } + } } diff --git a/src/public/javascripts/widgets/note_tree.js b/src/public/javascripts/widgets/note_tree.js index ba04363be..5b70b4e45 100644 --- a/src/public/javascripts/widgets/note_tree.js +++ b/src/public/javascripts/widgets/note_tree.js @@ -575,17 +575,6 @@ export default class NoteTreeWidget extends TabAwareWidget { }); } - async createNoteIntoCommand() { - const node = this.getActiveNode(); - - if (node) { - await noteCreateService.createNote(node.data.noteId, { - isProtected: node.data.isProtected, - saveSelection: false - }); - } - } - async setExpandedToServer(branchId, isExpanded) { utils.assertArguments(branchId);