2018-01-30 11:01:07 +01:00
|
|
|
<div class="koenig-editor__editor-wrapper">
|
|
|
|
<div class="koenig-editor__editor"></div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{{!-- pop-up markup toolbar is shown when there's a selection --}}
|
2018-02-20 16:14:28 +01:00
|
|
|
{{koenig-toolbar
|
2018-04-06 18:49:16 +02:00
|
|
|
editor=editor
|
2018-02-20 16:14:28 +01:00
|
|
|
editorRange=selectedRange
|
|
|
|
activeMarkupTagNames=activeMarkupTagNames
|
|
|
|
activeSectionTagNames=activeSectionTagNames
|
|
|
|
toggleMarkup=(action "toggleMarkup")
|
|
|
|
toggleSection=(action "toggleSection")
|
2018-04-06 18:49:16 +02:00
|
|
|
editLink=(action "editLink")
|
2018-02-20 16:14:28 +01:00
|
|
|
}}
|
2018-01-30 16:18:08 +01:00
|
|
|
|
2018-04-06 18:49:16 +02:00
|
|
|
{{!-- pop-up link editing toolbar --}}
|
|
|
|
{{#if linkRange}}
|
|
|
|
{{koenig-link-input
|
|
|
|
editor=editor
|
|
|
|
linkRange=linkRange
|
|
|
|
selectedRange=selectedRange
|
|
|
|
cancel=(action "cancelEditLink")
|
|
|
|
}}
|
|
|
|
{{/if}}
|
|
|
|
|
2018-01-31 15:49:20 +01:00
|
|
|
{{!-- (+) icon and pop-up menu --}}
|
|
|
|
{{koenig-plus-menu
|
|
|
|
editor=editor
|
2018-02-02 16:22:37 +01:00
|
|
|
editorRange=selectedRange
|
|
|
|
replaceWithCardSection=(action "replaceWithCardSection")
|
|
|
|
}}
|
2018-02-03 17:54:19 +01:00
|
|
|
|
|
|
|
{{!-- slash menu popup --}}
|
|
|
|
{{koenig-slash-menu
|
|
|
|
editor=editor
|
|
|
|
editorRange=selectedRange
|
|
|
|
replaceWithCardSection=(action "replaceWithCardSection")
|
2018-01-31 15:49:20 +01:00
|
|
|
}}
|
|
|
|
|
2018-02-03 17:54:19 +01:00
|
|
|
{{!-- all component cards wormholed into the editor canvas --}}
|
2018-01-30 16:18:08 +01:00
|
|
|
{{#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}}
|
2018-02-01 12:26:24 +01:00
|
|
|
{{component card.componentName
|
2018-01-30 16:18:08 +01:00
|
|
|
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)
|
2018-02-04 20:35:44 +01:00
|
|
|
isSelected=card.isSelected
|
2018-02-13 19:00:54 +01:00
|
|
|
selectCard=(action "selectCard" card)
|
|
|
|
isEditing=card.isEditing
|
|
|
|
editCard=(action "editCard" card)
|
2018-03-15 18:54:15 +01:00
|
|
|
deleteCard=(action "deleteCard" card)
|
2018-02-22 21:41:40 +01:00
|
|
|
moveCursorToPrevSection=(action "moveCursorToPrevSection" card)
|
|
|
|
moveCursorToNextSection=(action "moveCursorToNextSection" card)
|
|
|
|
addParagraphAfterCard=(action "addParagraphAfterCard" card)
|
2018-01-30 16:18:08 +01:00
|
|
|
}}
|
|
|
|
{{/-in-element}}
|
|
|
|
{{/each}}
|