Ghost/ghost/admin/app/components/gh-koenig-editor.hbs
Kevin Ansfield 1bd4b5cda7 Added delete button with confirmation to snippets in card menus
no issue

- show a delete icon when a snippet is hovered in plus/slash menus
- show a confirmation dialog when the delete icon is clicked
- keep menus open whilst displaying the delete confirmation dialog
2020-10-26 17:09:39 +00:00

37 lines
1.4 KiB
Handlebars

{{!-- 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>