mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-22 18:31:57 +03:00
37f393ca27
refs https://github.com/TryGhost/Ghost/issues/9311 - add basic implementation of a caption field to the embed card
31 lines
870 B
Handlebars
31 lines
870 B
Handlebars
{{#koenig-card
|
|
class=(concat (kg-style "media-card") " miw-100 tc")
|
|
isSelected=isSelected
|
|
isEditing=isEditing
|
|
selectCard=(action selectCard)
|
|
editCard=(action editCard)
|
|
}}
|
|
{{#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}}
|