mirror of
https://github.com/discourse/discourse.git
synced 2025-01-19 03:02:46 +08:00
ca2b2d034f
`helper.renderGlimmer` will return an HTML element which can be added to a post's `cooked` Example usage: ``` import { hbs } from "ember-cli-htmlbars"; api.decorateCookedElement((cooked, helper) => { const glimmerElement = helper.renderGlimmer( "div.my-wrapper-class", hbs`<DButton @icon={{@data.param}} @translatedLabel="Hello world from Glimmer Component"/>`, { param: "user-plus" } ); cooked.appendChild(glimmerElement); }, { onlyStream: true, id: "my-id" }); ``` See `widgets/render-glimmer.js` for more detailed usage information. |
||
---|---|---|
.. | ||
images | ||
javascripts | ||
stylesheets |