mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-03 03:55:26 +03:00
e636e58b12
no issue - adds a hidden file input to the `gh-markdown-editor` component - when the editor image toolbar button is clicked, capture the current selection (it gets during the file upload), trigger the file dialog then when files are selected initiate the same upload+insert process as drag/drop image uploads
18 lines
533 B
Handlebars
18 lines
533 B
Handlebars
{{yield (hash
|
|
editor=(component "gh-simplemde"
|
|
value=markdown
|
|
placeholder=placeholder
|
|
autofocus=autofocus
|
|
onChange=(action "updateMarkdown")
|
|
onEditorInit=(action "setEditor")
|
|
onEditorDestroy=(action "destroyEditor")
|
|
options=simpleMDEOptions)
|
|
isFullScreen=_isFullScreen
|
|
isSplitScreen=_isSplitScreen
|
|
focus=(action "focusEditor")
|
|
)}}
|
|
|
|
<div style="display:none">
|
|
{{gh-file-input multiple=true action=(action onImageFilesSelected) accept=imageMimeTypes}}
|
|
</div>
|