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

35 lines
1.2 KiB
Handlebars

{{!-- full height content pane --}}
<div
class="gh-koenig-editor-pane flex flex-column mih-100"
onmousedown={{action "trackMousedown"}}
onmouseup={{action "focusEditor"}}
>
{{gh-textarea
class="gh-editor-title"
placeholder=titlePlaceholder
tabindex="1"
autoExpand=".gh-koenig-editor"
value=(readonly title)
input=(action "onTitleChange" value="target.value")
focus-out=(action "onTitleFocusOut")
keyDown=(action "onTitleKeydown")
didCreateTextarea=(action "onTitleCreated")
data-test-editor-title-input=true
}}
{{koenig-editor
mobiledoc=body
placeholder=bodyPlaceholder
autofocus=bodyAutofocus
spellcheck=true
onChange=(action "onBodyChange")
didCreateEditor=(action "onEditorCreated")
cursorDidExitAtTop=(action "focusTitle")
headerOffset=headerOffset
dropTargetSelector=".gh-koenig-editor-pane"
scrollContainerSelector=scrollContainerSelector
scrollOffsetTopSelector=scrollOffsetTopSelector
scrollOffsetBottomSelector=scrollOffsetBottomSelector
wordCountDidChange=(action onWordCountChange)
}}
</div>