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/app/assets/javascripts/discourse/components/highlight-text.js
2020-03-12 13:29:55 -04:00

14 lines
328 B
JavaScript

import Component from "@ember/component";
import highlightText from "discourse/lib/highlight-text";
export default Component.extend({
tagName: "span",
_highlightOnInsert: function() {
const term = this.highlight;
highlightText($(this.element), term);
}
.observes("highlight")
.on("didInsertElement")
});