2018-05-02 18:31:17 +02:00
|
|
|
<div class="koenig-editor__editor-wrapper" data-kg="editor-wrapper">
|
2018-06-11 19:48:43 +02:00
|
|
|
<div class="koenig-editor__editor" data-gramm="false" data-kg="editor"></div>
|
2018-01-30 11:01:07 +01:00
|
|
|
</div>
|
|
|
|
|
|
|
|
{{!-- pop-up markup toolbar is shown when there's a selection --}}
|
2020-01-16 16:14:03 +01:00
|
|
|
<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"}}
|
|
|
|
/>
|
2018-01-30 16:18:08 +01:00
|
|
|
|
2018-04-11 19:42:27 +02:00
|
|
|
{{!-- pop-up link hover toolbar --}}
|
2020-01-16 16:14:03 +01:00
|
|
|
<KoenigLinkToolbar
|
|
|
|
@editor={{this.editor}}
|
|
|
|
@container={{this.element}}
|
|
|
|
@linkRange={{this.linkRange}}
|
|
|
|
@selectedRange={{this.selectedRange}}
|
|
|
|
@editLink={{action "editLink"}}
|
|
|
|
/>
|
2018-04-11 19:42:27 +02:00
|
|
|
|
2018-04-06 18:49:16 +02:00
|
|
|
{{!-- pop-up link editing toolbar --}}
|
2020-01-16 16:14:03 +01:00
|
|
|
{{#if this.linkRange}}
|
|
|
|
<KoenigLinkInput
|
|
|
|
@editor={{this.editor}}
|
|
|
|
@linkRange={{this.linkRange}}
|
|
|
|
@selectedRange={{this.selectedRange}}
|
|
|
|
@cancel={{action "cancelEditLink"}}
|
|
|
|
/>
|
2018-04-06 18:49:16 +02:00
|
|
|
{{/if}}
|
|
|
|
|
2018-01-31 15:49:20 +01:00
|
|
|
{{!-- (+) icon and pop-up menu --}}
|
2020-01-16 16:14:03 +01:00
|
|
|
<KoenigPlusMenu
|
|
|
|
@editor={{this.editor}}
|
|
|
|
@editorRange={{this.selectedRange}}
|
|
|
|
@replaceWithCardSection={{action "replaceWithCardSection"}}
|
|
|
|
/>
|
2018-02-03 17:54:19 +01:00
|
|
|
|
|
|
|
{{!-- slash menu popup --}}
|
2020-01-16 16:14:03 +01:00
|
|
|
<KoenigSlashMenu
|
|
|
|
@editor={{this.editor}}
|
|
|
|
@editorRange={{this.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 --}}
|
2020-01-16 16:14:03 +01:00
|
|
|
{{#each this.componentCards as |card|}}
|
2018-01-30 16:18:08 +01:00
|
|
|
{{!--
|
|
|
|
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
|
2020-01-16 16:14:03 +01:00
|
|
|
editor=this.editor
|
2018-01-30 16:18:08 +01:00
|
|
|
postModel=card.postModel
|
|
|
|
cardName=card.cardName
|
|
|
|
payload=card.payload
|
|
|
|
env=card.env
|
|
|
|
options=card.options
|
2020-01-16 16:14:03 +01:00
|
|
|
headerOffset=this.headerOffset
|
2018-01-30 16:18:08 +01:00
|
|
|
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
|
|
|
isEditing=card.isEditing
|
2018-05-23 12:38:30 +02:00
|
|
|
selectCard=(action "selectCard" card)
|
|
|
|
deselectCard=(action "deselectCard" card)
|
2018-02-13 19:00:54 +01:00
|
|
|
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-07-20 16:53:21 +02:00
|
|
|
registerComponent=(action (mut card.component))
|
2018-01-30 16:18:08 +01:00
|
|
|
}}
|
|
|
|
{{/-in-element}}
|
2018-05-23 12:38:30 +02:00
|
|
|
{{/each}}
|