discourse/app/assets/javascripts/admin/addon/components/highlighted-code.js
2020-12-01 15:31:26 -03:00

12 lines
343 B
JavaScript

import { observes, on } from "discourse-common/utils/decorators";
import Component from "@ember/component";
import highlightSyntax from "discourse/lib/highlight-syntax";
export default Component.extend({
@on("didInsertElement")
@observes("code")
_refresh() {
highlightSyntax(this.element, this.siteSettings, this.session);
},
});