Ghost/ghost/admin/lib/koenig-editor/addon/components/koenig-card-html.hbs
renovate[bot] 1b8dbb132f
Update Test & linting packages (#15338)
* Update Test & linting packages
* Fixed new `no-quoteless-attributes` template lint errors

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Kevin Ansfield <kevin@lookingsideways.co.uk>
2022-09-13 09:19:14 +01:00

28 lines
1008 B
Handlebars

<KoenigCard
@icon="koenig/card-indicator-html"
@class={{concat (kg-style "container-card") " mih10 miw-100 relative"}}
@headerOffset={{this.headerOffset}}
@toolbar={{this.toolbar}}
@payload={{this.payload}}
@isSelected={{this.isSelected}}
@isEditing={{this.isEditing}}
@selectCard={{action this.selectCard}}
@deselectCard={{action this.deselectCard}}
@editCard={{action this.editCard}}
@saveCard={{action this.saveCard}}
@saveAsSnippet={{this.saveAsSnippet}}
@onLeaveEdit={{action "leaveEditMode"}}
@editor={{this.editor}}
>
{{#if this.isEditing}}
<GhCmEditor @value={{this.payload.html}}
@class="koenig-card-html--editor"
@autofocus={{true}}
@lineWrapping={{true}}
@update={{action "updateHtml"}}
/>
{{else}}
<div class="koenig-card-html-rendered">{{{sanitize-html this.payload.html}}}</div>
<div class="koenig-card-click-overlay"></div>
{{/if}}
</KoenigCard>