fix "cut to note", closes #2895, #1182

This commit is contained in:
zadam
2022-06-03 22:05:18 +02:00
parent 8fcc76ad6d
commit 5fbaed61c1
6 changed files with 27 additions and 12 deletions

View File

@@ -327,7 +327,8 @@ export default class NoteDetailWidget extends NoteContextAwareWidget {
// without await as this otherwise causes deadlock through component mutex
noteCreateService.createNote(appContext.tabManager.getActiveContextNotePath(), {
isProtected: note.isProtected,
saveSelection: true
saveSelection: true,
textEditor: await this.noteContext.getTextEditor()
});
}
@@ -341,4 +342,16 @@ export default class NoteDetailWidget extends NoteContextAwareWidget {
this.refresh();
}
}
async executeWithTypeWidgetEvent({resolve, ntxId}) {
if (!this.isNoteContext(ntxId)) {
return;
}
await this.initialized;
await this.getWidgetType();
resolve(this.getTypeWidget());
}
}