mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-23 10:53:34 +03:00
8824888ce7
no issue - Ember 3.20.0 introduced `{{in-element}}` as a public API in place of the now-deprecated `{{-in-element}}` private API - replaced our usage of the private API with the public API
77 lines
2.6 KiB
Handlebars
77 lines
2.6 KiB
Handlebars
<div class="koenig-editor__editor-wrapper" data-kg="editor-wrapper">
|
|
<div class="koenig-editor__editor" data-gramm="false" data-kg="editor"></div>
|
|
</div>
|
|
|
|
{{!-- pop-up markup toolbar is shown when there's a selection --}}
|
|
<KoenigToolbar
|
|
@editor={{this.editor}}
|
|
@editorRange={{this.selectedRange}}
|
|
@activeMarkupTagNames={{this.activeMarkupTagNames}}
|
|
@activeSectionTagNames={{this.activeSectionTagNames}}
|
|
@toggleMarkup={{action "toggleMarkup"}}
|
|
@toggleSection={{action "toggleSection"}}
|
|
@toggleHeaderSection={{action "toggleHeaderSection"}}
|
|
@editLink={{action "editLink"}}
|
|
/>
|
|
|
|
{{!-- pop-up link hover toolbar --}}
|
|
<KoenigLinkToolbar
|
|
@editor={{this.editor}}
|
|
@container={{this.element}}
|
|
@linkRange={{this.linkRange}}
|
|
@selectedRange={{this.selectedRange}}
|
|
@editLink={{action "editLink"}}
|
|
/>
|
|
|
|
{{!-- pop-up link editing toolbar --}}
|
|
{{#if this.linkRange}}
|
|
<KoenigLinkInput
|
|
@editor={{this.editor}}
|
|
@linkRange={{this.linkRange}}
|
|
@linkRect={{this.linkRect}}
|
|
@selectedRange={{this.selectedRange}}
|
|
@cancel={{action "cancelEditLink"}}
|
|
/>
|
|
{{/if}}
|
|
|
|
{{!-- (+) icon and pop-up menu --}}
|
|
<KoenigPlusMenu
|
|
@editor={{this.editor}}
|
|
@editorRange={{this.selectedRange}}
|
|
@replaceWithCardSection={{action "replaceWithCardSection"}}
|
|
/>
|
|
|
|
{{!-- slash menu popup --}}
|
|
<KoenigSlashMenu
|
|
@editor={{this.editor}}
|
|
@editorRange={{this.selectedRange}}
|
|
@replaceWithCardSection={{action "replaceWithCardSection"}}
|
|
/>
|
|
|
|
{{!-- all component cards wormholed into the editor canvas --}}
|
|
{{#each this.componentCards as |card|}}
|
|
{{#in-element card.destinationElement}}
|
|
{{component card.componentName
|
|
editor=this.editor
|
|
postModel=card.postModel
|
|
cardName=card.cardName
|
|
payload=card.payload
|
|
env=card.env
|
|
options=card.options
|
|
headerOffset=this.headerOffset
|
|
saveCard=(action card.env.save)
|
|
cancelCard=(action card.env.cancel)
|
|
removeCard=(action card.env.remove)
|
|
isSelected=card.isSelected
|
|
isEditing=card.isEditing
|
|
selectCard=(action "selectCard" card)
|
|
deselectCard=(action "deselectCard" card)
|
|
editCard=(action "editCard" card)
|
|
deleteCard=(action "deleteCard" card)
|
|
moveCursorToPrevSection=(action "moveCursorToPrevSection" card)
|
|
moveCursorToNextSection=(action "moveCursorToNextSection" card)
|
|
addParagraphAfterCard=(action "addParagraphAfterCard" card)
|
|
registerComponent=(action (mut card.component))
|
|
}}
|
|
{{/in-element}}
|
|
{{/each}} |