This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/plugins/styleguide/assets/javascripts/discourse/components/styleguide-markdown.js
Jarek Radosz 4ad77f3382
DEV: Remove .es6 extensions from core (#14912)
Still supported in plugins though.
2021-11-13 12:51:53 +01:00

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));
},
});