1
0
Fork 0
mirror of https://github.com/TryGhost/Ghost-Admin.git synced 2023-12-14 02:33:04 +01:00
Ghost-Admin/lib/koenig-editor/addon/templates/components/koenig-editor.hbs

54 lines
1.7 KiB
Handlebars
Raw Normal View History

<div class="koenig-editor__editor-wrapper">
<div class="koenig-editor__editor"></div>
</div>
{{!-- pop-up markup toolbar is shown when there's a selection --}}
{{koenig-toolbar
editorRange=selectedRange
activeMarkupTagNames=activeMarkupTagNames
activeSectionTagNames=activeSectionTagNames
toggleMarkup=(action "toggleMarkup")
toggleSection=(action "toggleSection")
}}
{{!-- (+) icon and pop-up menu --}}
{{koenig-plus-menu
editor=editor
editorRange=selectedRange
replaceWithCardSection=(action "replaceWithCardSection")
replaceWithListSection=(action "replaceWithListSection")
}}
{{!-- slash menu popup --}}
{{koenig-slash-menu
editor=editor
editorRange=selectedRange
replaceWithCardSection=(action "replaceWithCardSection")
replaceWithListSection=(action "replaceWithListSection")
}}
{{!-- all component cards wormholed into the editor canvas --}}
{{#each componentCards as |card|}}
{{!--
TODO: move to the public {{in-element}} API when it's available
https://github.com/cibernox/rfcs/blob/make-in-element-public/text/0000-promote-in-element-to-public-api.md
--}}
{{#-in-element card.destinationElement}}
{{component card.componentName
editor=editor
postModel=card.postModel
cardName=card.cardName
payload=card.payload
env=card.env
options=card.options
saveCard=(action card.env.save)
cancelCard=(action card.env.cancel)
removeCard=(action card.env.remove)
isSelected=card.isSelected
selectCard=(action "selectCard" card)
isEditing=card.isEditing
editCard=(action "editCard" card)
}}
{{/-in-element}}
{{/each}}