12 lines
283 B
JavaScript
12 lines
283 B
JavaScript
import highlightText from 'discourse/lib/highlight-text';
|
|
|
|
export default Ember.Component.extend({
|
|
tagName: 'span',
|
|
|
|
_highlightOnInsert: function() {
|
|
const term = this.get('highlight');
|
|
highlightText(this.$(), term);
|
|
}.observes('highlight').on('didInsertElement')
|
|
|
|
});
|