0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-24 23:48:13 -05:00

Switched over to public {{in-element}} API

no issue

- Ember 3.20.0 introduced `{{in-element}}` as a public API in place of the now-deprecated `{{-in-element}}` private API
- replaced our usage of the private API with the public API
This commit is contained in:
Kevin Ansfield 2020-07-20 12:10:17 +01:00
parent 9ea7aa5c86
commit 8824888ce7
2 changed files with 4 additions and 8 deletions

View file

@ -50,11 +50,7 @@
{{!-- all component cards wormholed into the editor canvas --}}
{{#each this.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}}
{{#in-element card.destinationElement}}
{{component card.componentName
editor=this.editor
postModel=card.postModel
@ -77,5 +73,5 @@
addParagraphAfterCard=(action "addParagraphAfterCard" card)
registerComponent=(action (mut card.component))
}}
{{/-in-element}}
{{/in-element}}
{{/each}}

View file

@ -332,7 +332,7 @@ export default Component.extend({
});
// the desination element is the container that gets rendered
// inside the editor, once rendered we use {{-in-element}} to
// inside the editor, once rendered we use {{in-element}} to
// wormhole in the actual ember component
let cardId = guidFor(card);
let destinationElementId = `koenig-editor-card-${cardId}`;
@ -344,7 +344,7 @@ export default Component.extend({
destinationElement
});
// after render we render the full ember card via {{-in-element}}
// after render we render the full ember card via {{in-element}}
run.schedule('afterRender', () => {
this.componentCards.pushObject(card);
});