mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-22 18:31:57 +03:00
489f45155d
no issue - show the toolbar icon for any `<KoenigCard>` instance that has the `saveAsSnippet` action passed to it - currently that's all cards except the HR card because that's a primitive element rather than containing any user-defined content - add `koenigUi.inputHasFocus` so that card toolbars can be hidden when the snippet input is displayed
28 lines
1000 B
Handlebars
28 lines
1000 B
Handlebars
<KoenigCard
|
|
@icon="koenig/card-indicator-html"
|
|
@class={{concat (kg-style "container-card") " mih10 miw-100 relative"}}
|
|
@headerOffset={{this.headerOffset}}
|
|
@toolbar={{this.toolbar}}
|
|
@payload={{this.payload}}
|
|
@isSelected={{this.isSelected}}
|
|
@isEditing={{this.isEditing}}
|
|
@selectCard={{action this.selectCard}}
|
|
@deselectCard={{action this.deselectCard}}
|
|
@editCard={{action this.editCard}}
|
|
@saveCard={{action this.saveCard}}
|
|
@saveAsSnippet={{this.saveAsSnippet}}
|
|
@onLeaveEdit={{action "leaveEditMode"}}
|
|
@editor={{this.editor}}
|
|
>
|
|
{{#if this.isEditing}}
|
|
<GhCmEditor @value={{this.payload.html}}
|
|
@class="koenig-card-html--editor"
|
|
@autofocus=true
|
|
@lineWrapping=true
|
|
@update={{action "updateHtml"}}
|
|
/>
|
|
{{else}}
|
|
<div class="koenig-card-html-rendered">{{{sanitize-html this.payload.html}}}</div>
|
|
<div class="koenig-card-click-overlay"></div>
|
|
{{/if}}
|
|
</KoenigCard> |