{{yield (hash
  editor=this.editor
  activeMarkupTagNames=this.activeMarkupTagNames
  activeSectionTagNames=this.activeSectionTagNames
  activeSectionAttributes=this.activeSectionAttributes
  toggleMarkup=this.toggleMarkup
  toggleLink=this.toggleLink
  addCard=this.addCard
  addAtom=this.addAtom
  addCardInEditMode=this.addCardInEditMode
  toggleSection=this.toggleSection
  setAttribute=this.setAttribute
  isDefaultAttributeValue=this.isDefaultAttributeValue
)}}

<div class="mobiledoc-editor__editor-wrapper">
  <div class="mobiledoc-editor__editor"></div>
</div>

{{#if this.linkOffsets}}
  <TetherToSelection>
    <MobiledocLinkPrompt
      @on-submit={{this.completeLink}}
      @on-cancel={{this.cancelLink}}
    />
  </TetherToSelection>
{{/if}}

{{#each this.componentCards as |card|}}
  <EmberWormhole @to={{card.destinationElementId}}>
    {{! LEGACY: Payload is passed as the legacy "data" attr below. This
        is deprecated and should be removed before 1.0 }}
    {{component card.cardName
        editor=this.editor
        postModel=card.postModel
        cardName=card.cardName
        payload=card.payload
        data=card.payload
        env=card.env
        options=card.options
        editCard=card.env.edit
        saveCard=card.env.save
        cancelCard=card.env.cancel
        removeCard=card.env.remove
    }}
  </EmberWormhole>
{{/each}}

{{#each this.componentAtoms as |atom|}}
  <EmberWormhole @to={{atom.destinationElementId}}>
    {{component atom.atomName
        editor=this.editor
        postModel=atom.postModel
        atomName=atom.atomName
        payload=atom.payload
        value=atom.value
        options=atom.options
        saveAtom=atom.callbacks.save
        }}
  </EmberWormhole>
{{/each}}
