# helper.RenderGlimmer before/after positional element

**URL:** https://meta.discourse.org/t/helper-renderglimmer-before-after-positional-element/352349
**Category:** Development
**Created:** [February 14, 2025, 6:41pm UTC](https://meta.discourse.org/t/helper-renderglimmer-before-after-positional-element/352349 "2025-02-14T18:41:20Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Arkshine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arkshine/32/298682_2.png) [@Arkshine](https://meta.discourse.org/u/Arkshine)
#### Post date: [February 14, 2025, 6:41pm UTC](https://meta.discourse.org/t/helper-renderglimmer-before-after-positional-element/352349/1 "2025-02-14T18:41:20Z")

</div>

With the `DecoratedHtml` change (lovely change, thanks for that!), I played around `decorateCookedElement`, and it seems to append into the positional element.

Is there a way to insert it before or after the positional element?

I have the impression it’s forced to append here:  
[https://github.com/discourse/discourse/blob/main/app/assets/javascripts/discourse/app/components/decorated-html.gjs#L48-L56](https://github.com/discourse/discourse/blob/main/app/assets/javascripts/discourse/app/components/decorated-html.gjs#L48-L56)

I guess a workaround would be to create a wrapper first and then call renderGlimmer on it.  
Or is there a better way?

---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [February 14, 2025, 7:20pm UTC](https://meta.discourse.org/t/helper-renderglimmer-before-after-positional-element/352349/2 "2025-02-14T19:20:16Z")

</div>

> [@Arkshine](#):
>
> I have the impression it’s forced to append here:

The only options Ember provide for `in-element` are

- the default, which replaces the entire contents of the element

- `insertBefore=null`, which appends the component as the last child of the element

Unfortunately, other values for `insertBefore` are not supported. ([ember forum reference](https://discuss.emberjs.com/t/why-does-in-element-only-allow-null-undefined-for-insertbefore/20471?u=davidtaylorhq))

So yup, if you need different positioning, a wrapper is the way to go 👍

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [March 16, 2025, 7:20pm UTC](https://meta.discourse.org/t/helper-renderglimmer-before-after-positional-element/352349/3 "2025-03-16T19:20:42Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
