This plugin is only useful for developers, however, making it core allows us to centralize any component modification in one commit. This integration also adds a new site_setting: `styleguide_admin_only` which allows to enable a styleguide on a live site while restricting visibility to admins only. By default, styleguide is disabled.
11 lines
277 B
JavaScript
11 lines
277 B
JavaScript
import { cookAsync } from "discourse/lib/text";
|
|
|
|
export default Ember.Component.extend({
|
|
didInsertElement() {
|
|
this._super(...arguments);
|
|
|
|
const contents = $(this.element).html();
|
|
cookAsync(contents).then((cooked) => $(this.element).html(cooked.string));
|
|
},
|
|
});
|