mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-01 13:54:35 +03:00
b590ce1b95
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
18 lines
623 B
Handlebars
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> |