Ghost/ghost/admin/lib/koenig-editor/addon/components/koenig-slash-menu.hbs
Kevin Ansfield b590ce1b95 Implemented first iteration of content snippets
closes https://github.com/TryGhost/Team/issues/411

- adds "Create snippet" icon to the editor toolbar
- uses the same link input component design for specifying snippet titles
- snippets are loaded in the background when the editor is accessed
- snippets are listed at the bottom of the card menus of the + and / menus
- clicking a snippet inserts the snippet's contents in place of the current blank section
2020-10-15 18:03:35 +01:00

18 lines
623 B
Handlebars

<div
id="koenig-slash-menu"
class="absolute"
{{did-insert this.registerContainerElement}}
{{did-update this.registerEditor @editor}}
{{did-update this.handleCursorChange @editorRange}}
{{did-update this.updateItemSections @snippets}}
...attributes
>
{{#if (and this.showMenu this.itemSections)}}
<div class="koenig-cardmenu {{kg-style "cardmenu"}}" role="menu">
<KoenigMenuContent
@itemSections={{this.itemSections}}
@selectedItem={{this.selectedItem}}
@itemClicked={{this.itemClicked}} />
</div>
{{/if}}
</div>