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

37 lines
1.4 KiB
Handlebars
Raw Normal View History

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