2018-05-02 19:31:17 +03:00
|
|
|
<div class="koenig-editor__editor-wrapper" data-kg="editor-wrapper">
|
2018-06-11 20:48:43 +03:00
|
|
|
<div class="koenig-editor__editor" data-gramm="false" data-kg="editor"></div>
|
2018-01-30 13:01:07 +03:00
|
|
|
</div>
|
|
|
|
|
|
|
|
{{!-- pop-up markup toolbar is shown when there's a selection --}}
|
2020-01-16 18:14:03 +03: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"}}
|
2020-10-15 20:03:18 +03:00
|
|
|
@addSnippet={{this.addSnippet}}
|
2020-01-16 18:14:03 +03:00
|
|
|
/>
|
2018-01-30 18:18:08 +03:00
|
|
|
|
2018-04-11 20:42:27 +03:00
|
|
|
{{!-- pop-up link hover toolbar --}}
|
2020-01-16 18:14:03 +03:00
|
|
|
<KoenigLinkToolbar
|
|
|
|
@editor={{this.editor}}
|
|
|
|
@container={{this.element}}
|
|
|
|
@linkRange={{this.linkRange}}
|
|
|
|
@selectedRange={{this.selectedRange}}
|
|
|
|
@editLink={{action "editLink"}}
|
|
|
|
/>
|
2018-04-11 20:42:27 +03:00
|
|
|
|
2018-04-06 19:49:16 +03:00
|
|
|
{{!-- pop-up link editing toolbar --}}
|
2020-01-16 18:14:03 +03:00
|
|
|
{{#if this.linkRange}}
|
|
|
|
<KoenigLinkInput
|
|
|
|
@editor={{this.editor}}
|
|
|
|
@linkRange={{this.linkRange}}
|
2020-03-07 21:22:56 +03:00
|
|
|
@linkRect={{this.linkRect}}
|
2020-01-16 18:14:03 +03:00
|
|
|
@selectedRange={{this.selectedRange}}
|
|
|
|
@cancel={{action "cancelEditLink"}}
|
|
|
|
/>
|
2018-04-06 19:49:16 +03:00
|
|
|
{{/if}}
|
|
|
|
|
2020-10-15 20:03:18 +03:00
|
|
|
{{!-- pop-up snippet editing toolbar --}}
|
|
|
|
{{#if this.snippetRange}}
|
|
|
|
<KoenigSnippetInput
|
|
|
|
@editor={{this.editor}}
|
|
|
|
@snippetRange={{this.snippetRange}}
|
|
|
|
@save={{@saveSnippet}}
|
|
|
|
@cancel={{this.cancelAddSnippet}}
|
|
|
|
/>
|
|
|
|
{{/if}}
|
|
|
|
|
2018-01-31 17:49:20 +03:00
|
|
|
{{!-- (+) icon and pop-up menu --}}
|
2020-01-16 18:14:03 +03:00
|
|
|
<KoenigPlusMenu
|
|
|
|
@editor={{this.editor}}
|
|
|
|
@editorRange={{this.selectedRange}}
|
2020-10-15 20:03:18 +03:00
|
|
|
@snippets={{this.snippets}}
|
2020-01-16 18:14:03 +03:00
|
|
|
@replaceWithCardSection={{action "replaceWithCardSection"}}
|
2020-10-15 20:03:18 +03:00
|
|
|
@replaceWithPost={{action "replaceWithPost"}}
|
2020-01-16 18:14:03 +03:00
|
|
|
/>
|
2018-02-03 19:54:19 +03:00
|
|
|
|
|
|
|
{{!-- slash menu popup --}}
|
2020-01-16 18:14:03 +03:00
|
|
|
<KoenigSlashMenu
|
|
|
|
@editor={{this.editor}}
|
|
|
|
@editorRange={{this.selectedRange}}
|
2020-10-15 20:03:18 +03:00
|
|
|
@snippets={{this.snippets}}
|
2020-01-16 18:14:03 +03:00
|
|
|
@replaceWithCardSection={{action "replaceWithCardSection"}}
|
2020-10-15 20:03:18 +03:00
|
|
|
@replaceWithPost={{action "replaceWithPost"}}
|
2020-01-16 18:14:03 +03:00
|
|
|
/>
|
2018-01-31 17:49:20 +03:00
|
|
|
|
2018-02-03 19:54:19 +03:00
|
|
|
{{!-- all component cards wormholed into the editor canvas --}}
|
2020-01-16 18:14:03 +03:00
|
|
|
{{#each this.componentCards as |card|}}
|
2020-07-20 14:10:17 +03:00
|
|
|
{{#in-element card.destinationElement}}
|
2018-02-01 14:26:24 +03:00
|
|
|
{{component card.componentName
|
2020-01-16 18:14:03 +03:00
|
|
|
editor=this.editor
|
2018-01-30 18:18:08 +03:00
|
|
|
postModel=card.postModel
|
|
|
|
cardName=card.cardName
|
|
|
|
payload=card.payload
|
|
|
|
env=card.env
|
|
|
|
options=card.options
|
2020-01-16 18:14:03 +03:00
|
|
|
headerOffset=this.headerOffset
|
2018-01-30 18:18:08 +03:00
|
|
|
saveCard=(action card.env.save)
|
|
|
|
cancelCard=(action card.env.cancel)
|
|
|
|
removeCard=(action card.env.remove)
|
2018-02-04 22:35:44 +03:00
|
|
|
isSelected=card.isSelected
|
2018-02-13 21:00:54 +03:00
|
|
|
isEditing=card.isEditing
|
2018-05-23 13:38:30 +03:00
|
|
|
selectCard=(action "selectCard" card)
|
|
|
|
deselectCard=(action "deselectCard" card)
|
2018-02-13 21:00:54 +03:00
|
|
|
editCard=(action "editCard" card)
|
2018-03-15 20:54:15 +03:00
|
|
|
deleteCard=(action "deleteCard" card)
|
2018-02-22 23:41:40 +03:00
|
|
|
moveCursorToPrevSection=(action "moveCursorToPrevSection" card)
|
|
|
|
moveCursorToNextSection=(action "moveCursorToNextSection" card)
|
|
|
|
addParagraphAfterCard=(action "addParagraphAfterCard" card)
|
2018-07-20 17:53:21 +03:00
|
|
|
registerComponent=(action (mut card.component))
|
2018-01-30 18:18:08 +03:00
|
|
|
}}
|
2020-07-20 14:10:17 +03:00
|
|
|
{{/in-element}}
|
2018-05-23 13:38:30 +03:00
|
|
|
{{/each}}
|