From 06ef5385467eda4366ff7e15246745936e0b7d40 Mon Sep 17 00:00:00 2001 From: Baptiste Grob <60621355+baptiste-grob@users.noreply.github.com> Date: Mon, 14 Sep 2020 12:55:54 +0200 Subject: [PATCH] fix: insert template note when selecting editor --- app/assets/javascripts/views/editor/editor_view.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/assets/javascripts/views/editor/editor_view.ts b/app/assets/javascripts/views/editor/editor_view.ts index 5dee73bca..75c239261 100644 --- a/app/assets/javascripts/views/editor/editor_view.ts +++ b/app/assets/javascripts/views/editor/editor_view.ts @@ -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) => {