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 --}}
|
2023-01-04 12:39:32 +03:00
|
|
|
{{!-- template-lint-disable no-invalid-interactive no-passed-in-event-handlers --}}
|
2021-05-27 19:59:22 +03:00
|
|
|
<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)}}
|
2022-11-10 16:43:15 +03:00
|
|
|
{{on "paste" this.cleanPastedTitle}}
|
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}}
|
2021-08-23 17:59:53 +03:00
|
|
|
@updateSnippet={{@updateSnippet}}
|
2021-05-27 19:59:22 +03:00
|
|
|
@deleteSnippet={{@deleteSnippet}}
|
2021-08-23 20:42:14 +03:00
|
|
|
@cardOptions={{@cardOptions}}
|
2021-09-10 11:24:38 +03:00
|
|
|
@postType={{@postType}}
|
2021-05-27 19:59:22 +03:00
|
|
|
/>
|
|
|
|
</div>
|
2022-11-10 16:43:15 +03:00
|
|
|
</div>
|