Ghost/ghost/admin/lib/koenig-editor/addon/templates/components/koenig-card-markdown.hbs
Kevin Ansfield 3f1e5b9fa9 Koenig - Update {{koenig-card-html}} to use new {{koenig-card}} container
refs https://github.com/TryGhost/Ghost/issues/9311
- wraps embed card in same container as the markdown card to handle mouse selection/edit toggles etc
- add render mode to embed card
- autofocus CodeMirror editor when switching to edit mode
- fix incorrect pointer on cards
2018-02-15 15:57:44 +00:00

19 lines
483 B
Handlebars

{{#koenig-card
icon="koenig/markdown"
isSelected=isSelected
isEditing=isEditing
onEnterEdit=(action "enterEditMode")
selectCard=(action selectCard)
editCard=(action editCard)
}}
{{#if isEditing}}
{{gh-textarea
class="koenig-card-markdown"
value=payload.markdown
update=(action "updateMarkdown")
autoExpand=".gh-koenig-editor"}}
{{else}}
{{renderedMarkdown}}
{{/if}}
{{/koenig-card}}