mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-22 18:31:57 +03:00
0d08c639fe
refs https://github.com/TryGhost/Ghost/issues/10049 - update `{{koenig-card}}` component to compare payload values and create a snapshot when exiting edit mode for container cards (markdown, html, code) - update image card to trigger snapshots on image upload/selection and width change
27 lines
837 B
Handlebars
27 lines
837 B
Handlebars
{{#koenig-card
|
|
icon="koenig/card-indicator-html"
|
|
class=(concat (kg-style "container-card") " mih10 miw-100 relative")
|
|
headerOffset=headerOffset
|
|
toolbar=toolbar
|
|
payload=payload
|
|
isSelected=isSelected
|
|
isEditing=isEditing
|
|
selectCard=(action selectCard)
|
|
deselectCard=(action deselectCard)
|
|
editCard=(action editCard)
|
|
saveCard=(action saveCard)
|
|
onLeaveEdit=(action "leaveEditMode")
|
|
editor=editor
|
|
}}
|
|
{{#if isEditing}}
|
|
{{gh-cm-editor payload.html
|
|
class="koenig-card-html--editor"
|
|
autofocus=true
|
|
lineWrapping=true
|
|
update=(action "updateHtml")
|
|
}}
|
|
{{else}}
|
|
<div class="koenig-card-html-rendered">{{{sanitize-html payload.html}}}</div>
|
|
<div class="koenig-card-click-overlay"></div>
|
|
{{/if}}
|
|
{{/koenig-card}} |