2021-07-20 12:54:19 +03:00
|
|
|
<KoenigCard
|
|
|
|
@icon="koenig/card-indicator-email"
|
|
|
|
@class={{concat (kg-style "container-card") " kg-email-card mih10 miw-100 relative"}}
|
2021-07-20 20:33:39 +03:00
|
|
|
@style={{@cardStyle}}
|
|
|
|
@headerOffset={{@headerOffset}}
|
2021-07-20 12:54:19 +03:00
|
|
|
@toolbar={{this.toolbar}}
|
2021-07-20 20:33:39 +03:00
|
|
|
@payload={{@payload}}
|
|
|
|
@isSelected={{@isSelected}}
|
|
|
|
@isEditing={{@isEditing}}
|
|
|
|
@selectCard={{@selectCard}}
|
|
|
|
@deselectCard={{@deselectCard}}
|
|
|
|
@editCard={{@editCard}}
|
|
|
|
@saveCard={{@saveCard}}
|
|
|
|
@saveAsSnippet={{@saveAsSnippet}}
|
|
|
|
@onLeaveEdit={{this.leaveEditMode}}
|
|
|
|
@addParagraphAfterCard={{@addParagraphAfterCard}}
|
|
|
|
@moveCursorToPrevSection={{@moveCursorToPrevSection}}
|
|
|
|
@moveCursorToNextSection={{@moveCursorToNextSection}}
|
|
|
|
@editor={{@editor}}
|
2021-07-20 12:54:19 +03:00
|
|
|
as |card|
|
|
|
|
>
|
2021-07-20 20:33:39 +03:00
|
|
|
{{#if @isEditing}}
|
2021-07-20 12:54:19 +03:00
|
|
|
<KoenigTextReplacementHtmlInput
|
2021-07-20 20:33:39 +03:00
|
|
|
@html={{@payload.html}}
|
2021-07-20 12:54:19 +03:00
|
|
|
@placeholder="Email only content..."
|
|
|
|
@autofocus={{true}}
|
|
|
|
@class="miw-100 bn bg-transparent"
|
2021-07-20 20:33:39 +03:00
|
|
|
@onChange={{this.updateHtml}}
|
|
|
|
@onFocus={{fn (mut this.isFocused) true}}
|
|
|
|
@onBlur={{fn (mut this.isFocused) false}}
|
|
|
|
@didCreateEditor={{this.registerEditor}}
|
2021-07-20 12:54:19 +03:00
|
|
|
/>
|
|
|
|
<div class="kg-card-help">
|
|
|
|
<p>
|
|
|
|
<span>Only visible when delivered by email, this card will not be published on your site.</span>
|
|
|
|
<a href="https://ghost.org/help/email-newsletters/#email-cards" class="dib lh-zero v-mid kg-card-help-icon-link" target="_blank" rel="noreferer nopener">{{svg-jar "help" class="stroke-midgrey"}}</a>
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
{{else}}
|
|
|
|
<p>{{{this.formattedHtml}}}</p>
|
|
|
|
<div class="koenig-card-click-overlay"></div>
|
|
|
|
{{/if}}
|
|
|
|
</KoenigCard>
|