2021-05-27 19:59:22 +03:00
|
|
|
<div class="gh-koenig-editor relative w-100 vh-100 overflow-x-hidden overflow-y-auto z-0" {{did-insert this.registerElement}} ...attributes>
|
|
|
|
{{!-- full height content pane --}}
|
|
|
|
<div
|
|
|
|
class="gh-koenig-editor-pane flex flex-column mih-100"
|
|
|
|
{{on "mousedown" this.trackMousedown}}
|
|
|
|
{{on "mouseup" this.focusEditor}}
|
|
|
|
>
|
2021-07-01 19:56:39 +03:00
|
|
|
<GhEditorFeatureImage
|
|
|
|
@image={{@featureImage}}
|
|
|
|
@updateImage={{@setFeatureImage}}
|
|
|
|
@clearImage={{@clearFeatureImage}}
|
|
|
|
@alt={{@featureImageAlt}}
|
|
|
|
@updateAlt={{@setFeatureImageAlt}}
|
|
|
|
@caption={{@featureImageCaption}}
|
|
|
|
@updateCaption={{@setFeatureImageCaption}}
|
2021-07-15 17:50:32 +03:00
|
|
|
@forceButtonDisplay={{or (not @title) (eq @title "(Untitled)") this.titleIsHovered this.titleIsFocused}}
|
2021-07-01 19:56:39 +03:00
|
|
|
/>
|
2021-06-10 22:42:32 +03:00
|
|
|
|
2021-05-27 19:59:22 +03:00
|
|
|
<GhTextarea
|
|
|
|
@class="gh-editor-title"
|
|
|
|
@placeholder={{@titlePlaceholder}}
|
2021-06-14 17:35:15 +03:00
|
|
|
@shouldFocus={{or @titleAutofocus false}}
|
2021-05-27 19:59:22 +03:00
|
|
|
@tabindex="1"
|
|
|
|
@autoExpand=".gh-koenig-editor"
|
2021-05-27 20:06:35 +03:00
|
|
|
@value={{readonly this.title}}
|
2021-05-27 19:59:22 +03:00
|
|
|
@input={{this.updateTitle}}
|
|
|
|
@focus-out={{optional @onTitleBlur}}
|
|
|
|
@keyDown={{this.onTitleKeydown}}
|
|
|
|
@didCreateTextarea={{this.registerTitleElement}}
|
2021-06-16 19:56:25 +03:00
|
|
|
{{on "focus" (fn (mut this.titleIsFocused) true)}}
|
|
|
|
{{on "blur" (fn (mut this.titleIsFocused) false)}}
|
|
|
|
{{on "mouseover" (fn (mut this.titleIsHovered) true)}}
|
|
|
|
{{on "mouseleave" (fn (mut this.titleIsHovered) false)}}
|
2021-05-27 19:59:22 +03:00
|
|
|
data-test-editor-title-input={{true}}
|
|
|
|
/>
|
2018-01-30 13:01:07 +03:00
|
|
|
|
2021-05-27 19:59:22 +03:00
|
|
|
<KoenigEditor
|
|
|
|
@mobiledoc={{@body}}
|
|
|
|
@placeholder={{@bodyPlaceholder}}
|
|
|
|
@spellcheck={{true}}
|
|
|
|
@onChange={{@onBodyChange}}
|
|
|
|
@didCreateEditor={{this.onEditorCreated}}
|
|
|
|
@cursorDidExitAtTop={{this.focusTitle}}
|
|
|
|
@headerOffset={{@headerOffset}}
|
|
|
|
@dropTargetSelector=".gh-koenig-editor-pane"
|
|
|
|
@scrollContainerSelector={{@scrollContainerSelector}}
|
|
|
|
@scrollOffsetTopSelector={{@scrollOffsetTopSelector}}
|
|
|
|
@scrollOffsetBottomSelector={{@scrollOffsetBottomSelector}}
|
|
|
|
@wordCountDidChange={{@onWordCountChange}}
|
|
|
|
@snippets={{@snippets}}
|
|
|
|
@saveSnippet={{@saveSnippet}}
|
|
|
|
@deleteSnippet={{@deleteSnippet}}
|
|
|
|
/>
|
|
|
|
</div>
|
2018-05-30 19:14:39 +03:00
|
|
|
</div>
|