Ghost/ghost/admin/app/templates/components/gh-markdown-editor.hbs

34 lines
939 B
Handlebars
Raw Normal View History

{{yield (hash
editor=(component "gh-simplemde"
value=this.markdown
placeholder=this.placeholder
autofocus=this.autofocus
onChange=(action "updateMarkdown")
onFocus=(action "updateFocusState" true)
onBlur=(action "updateFocusState" false)
onEditorInit=(action "setEditor")
options=this.simpleMDEOptions)
isFullScreen=this._isFullScreen
isSplitScreen=this._isSplitScreen
focus=(action "focusEditor")
)}}
<div style="display:none">
{{gh-file-input
multiple=true
action=(action this.onImageFilesSelected)
accept=this.imageMimeTypes}}
</div>
{{#if this._showUnsplash}}
{{gh-unsplash
select=(action "insertUnsplashPhoto")
close=(action "toggleUnsplash")}}
{{/if}}
{{#if this.showMarkdownHelp}}
{{gh-fullscreen-modal "markdown-help"
close=(action "toggleMarkdownHelp")
modifier="wide"}}
{{/if}}