Ghost/ghost/admin/lib/koenig-editor/addon/templates/components/koenig-card-html.hbs
Kevin Ansfield 4f08b7fb8d Koenig - Switch card context menu to Spirit classes
refs https://github.com/TryGhost/Ghost/issues/9505
- use Spirit classes for card context menu
- add button and icon class options for context menu items
- add ability to have icon+text for context menu items
- add "Edit" context menu item to markdown and html cards
2018-04-03 18:34:01 +01:00

33 lines
937 B
Handlebars

{{#koenig-card
class=(concat (kg-style "media-card") " mih10 miw-100 tc")
toolbar=toolbar
isSelected=isSelected
isEditing=isEditing
selectCard=(action selectCard)
editCard=(action editCard)
onLeaveEdit=(action "leaveEditMode")
}}
{{#if isEditing}}
{{gh-cm-editor payload.html
class="koenig-card-html--editor"
autofocus=true
update=(action "updateHtml")
}}
<input
value={{payload.caption}}
type="text"
class="miw-100 tc bn form-text"
oninput={{action "updateCaption" value="target.value"}}
placeholder="Type caption for embed (optional)">
{{else}}
{{{payload.html}}}
{{#if payload.caption}}
<p class={{kg-style "figcaption"}}>{{{payload.caption}}}</p>
{{/if}}
<div class="koenig-card-click-overlay"></div>
{{/if}}
{{/koenig-card}}