{{#koenig-card icon="koenig/markdown" class=(concat (kg-style "container-card") " koenig-card-markdown-rendered") toolbar=toolbar isSelected=isSelected isEditing=isEditing onEnterEdit=(action "enterEditMode") onLeaveEdit=(action "leaveEditMode") selectCard=(action selectCard) editCard=(action editCard) }} {{#if isEditing}} {{#gh-editor as |editor|}} {{#gh-markdown-editor markdown=(readonly payload.markdown) onChange=(action "updateMarkdown") enableSideBySide=false enablePreview=false enableHemingway=false options=(hash status=false) uploadedImageUrls=editor.uploadedImageUrls onImageFilesSelected=(action editor.uploadImages) imageMimeTypes=editor.imageMimeTypes as |markdown| }} {{markdown.editor}} {{/gh-markdown-editor}} {{!-- files are dragged over editor pane --}} {{#if editor.isDraggedOver}}

Drop image(s) here to upload

{{/if}} {{!-- files have been dropped ready to be uploaded --}} {{#if editor.droppedFiles}} {{#gh-uploader files=editor.droppedFiles accept=editor.imageMimeTypes extensions=editor.imageExtensions onComplete=(action editor.uploadComplete) onCancel=(action editor.uploadCancelled) as |upload| }}
{{#if upload.errors}}

Upload failed

{{#each upload.errors as |error|}}
{{error.fileName}} - {{error.message}}
{{/each}} {{else}}

Uploading {{pluralize upload.files.length "image"}}...

{{upload.progressBar}} {{/if}}
{{/gh-uploader}} {{/if}} {{/gh-editor}} {{else}} {{renderedMarkdown}} {{/if}} {{/koenig-card}}