Ghost/ghost/admin/lib/koenig-editor/addon/templates/components/koenig-card-html.hbs
Kevin Ansfield 8c2ff43707 🐛 Koenig - Fixed pasting of plain text
refs https://github.com/TryGhost/Ghost/issues/9724
- `formatMarkdown` was previously changed to return a SafeString but that meant any direct usage of the helper had to account for not dealing with a basic String type
- changed `formatMarkdown` to return a basic String
- modified helper usage of `{{sanitize-html}}` to use triple-curlies
2018-08-15 16:25:02 +01:00

25 lines
786 B
Handlebars

{{#koenig-card
icon="koenig/card-indicator-html"
class=(concat (kg-style "container-card") " mih10 miw-100 relative")
headerOffset=headerOffset
toolbar=toolbar
isSelected=isSelected
isEditing=isEditing
selectCard=(action selectCard)
deselectCard=(action deselectCard)
editCard=(action editCard)
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}}