Widget:Highlight: Difference between revisions
Jump to navigation
Jump to search
((by SublimeText.Mediawiker)) |
((by SublimeText.Mediawiker)) |
||
Line 3: | Line 3: | ||
var instance = new Mark(context); | var instance = new Mark(context); | ||
instance.mark("<!--{$term}-->"); | instance.mark("<!--{$term}-->"); | ||
</script> | </script><script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/jquery.mark.min.js" type="javascript"></script> |
Revision as of 22:20, 13 September 2021
<script> var context = document.querySelector(".highlight"); // requires an element with class "context" to exist var instance = new Mark(context); instance.mark(""); </script><script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/jquery.mark.min.js" type="javascript"></script>