fix: insert template note when selecting editor

This commit is contained in:
Baptiste Grob
2020-09-14 12:55:54 +02:00
parent 1595ea518e
commit 06ef538546

View File

@@ -403,6 +403,9 @@ class EditorViewCtrl extends PureViewCtrl<{}, EditorState> {
async editorMenuOnSelect(component?: SNComponent) {
this.setMenuState('showEditorMenu', false);
if (this.appState.getActiveEditor()?.isTemplateNote) {
await this.appState.getActiveEditor().insertTemplatedNote();
}
if (!component) {
if (!this.note.prefersPlainEditor) {
await this.application.changeItem(this.note.uuid, (mutator) => {