discourse/app/assets/javascripts/admin/components/highlighted-code.js.es6

12 lines
327 B
Plaintext
Raw Normal View History

import Component from "@ember/component";
2018-06-15 11:03:24 -04:00
import { on, observes } from "ember-addons/ember-computed-decorators";
import highlightSyntax from "discourse/lib/highlight-syntax";
export default Component.extend({
2018-06-15 11:03:24 -04:00
@on("didInsertElement")
@observes("code")
_refresh: function() {
highlightSyntax($(this.element));
}
});