From d5d0eafb4764ac83e08aefa8aef7dddd4e27c086 Mon Sep 17 00:00:00 2001 From: Kevin Ansfield Date: Thu, 3 Dec 2020 10:26:21 +0000 Subject: [PATCH] Fixed email cards missing an edit icon in the toolbar no issue - email cards a block cards so have a distinct edit mode, that type of card should always have an edit icon in the toolbar for consistency and ease of use when the double-click or cmd+enter shortcuts aren't known --- .../addon/components/koenig-card-email.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/ghost/admin/lib/koenig-editor/addon/components/koenig-card-email.js b/ghost/admin/lib/koenig-editor/addon/components/koenig-card-email.js index 2a23a47076..dad1110740 100644 --- a/ghost/admin/lib/koenig-editor/addon/components/koenig-card-email.js +++ b/ghost/admin/lib/koenig-editor/addon/components/koenig-card-email.js @@ -27,6 +27,23 @@ export default Component.extend({ return formatTextReplacementHtml(this.payload.html); }), + toolbar: computed('isEditing', function () { + if (this.isEditing) { + return false; + } + + return { + items: [{ + buttonClass: 'fw4 flex items-center white', + icon: 'koenig/kg-edit', + iconClass: 'fill-white', + title: 'Edit', + text: '', + action: run.bind(this, this.editCard) + }] + }; + }), + init() { this._super(...arguments); this.registerComponent(this);