mirror of
https://github.com/discourse/discourse.git
synced 2025-01-22 20:41: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. |
||
---|---|---|
.. | ||
admin | ||
bootstrap-json | ||
confirm-new-email | ||
dialog-holder | ||
discourse | ||
discourse-common | ||
discourse-ensure-deprecation-order | ||
discourse-hbr | ||
discourse-plugins | ||
discourse-widget-hbs | ||
docs | ||
ember-addons | ||
ember-cli-progress-ci | ||
locales | ||
pretty-text | ||
select-kit | ||
truth-helpers | ||
wizard | ||
.licensee.json | ||
.npmrc | ||
discourse-js-processor.js | ||
handlebars-shim.js | ||
package.json | ||
polyfills.js | ||
service-worker.js.erb | ||
yarn.lock |