Ghost/ghost/admin/app/components/gh-image-uploader-with-preview.hbs

24 lines
748 B
Handlebars
Raw Normal View History

{{#if @image}}
<div class="gh-image-uploader -with-image">
<div><img src={{@image}}></div>
{{#if (feature 'lexicalEditor')}}
<KoenigImageEditor
@imageSrc={{@image}}
@saveUrl={{@update}}
/>
{{/if}}
<a class="image-action image-delete" title="Delete" {{on "click" (fn @remove "")}}>
{{svg-jar "trash"}}
<span class="hidden">Delete</span>
</a>
</div>
{{else}}
<GhImageUploader
@text={{@text}}
@altText={{@altText}}
@allowUnsplash={{@allowUnsplash}}
@update={{@update}}
@uploadStarted={{optional @uploadStarted}}
@uploadFinished={{optional @uploadFinished}}
/>
{{/if}}