mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-23 02:41:50 +03:00
4f08b7fb8d
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
22 lines
613 B
Handlebars
22 lines
613 B
Handlebars
{{#koenig-card
|
|
icon="koenig/markdown"
|
|
class=(kg-style "container-card")
|
|
toolbar=toolbar
|
|
isSelected=isSelected
|
|
isEditing=isEditing
|
|
onEnterEdit=(action "enterEditMode")
|
|
onLeaveEdit=(action "leaveEditMode")
|
|
selectCard=(action selectCard)
|
|
editCard=(action editCard)
|
|
}}
|
|
{{#if isEditing}}
|
|
{{gh-textarea
|
|
class="koenig-card-markdown"
|
|
value=(readonly payload.markdown)
|
|
input=(action "updateMarkdown" value="target.value")
|
|
autoExpand=".gh-koenig-editor"}}
|
|
{{else}}
|
|
{{renderedMarkdown}}
|
|
{{/if}}
|
|
{{/koenig-card}}
|