Widget:Highlight: Difference between revisions

From Rangjung Yeshe Wiki - Dharma Dictionary
Jump to navigation Jump to search
((by SublimeText.Mediawiker))
((by SublimeText.Mediawiker))
 
(23 intermediate revisions by the same user not shown)
Line 1: Line 1:
<script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/mark.min.js" integrity="sha512-5CYOlHXGh6QpOFA/TeTylKLWfB3ftPsde7AnmhuitiTX4K5SqCLBeKro6sPS8ilsz1Q4NRx3v8Ko2IBiszzdww==" crossorigin="anonymous" referrerpolicy="no-referrer"></script><script>
<includeonly><script src="https://code.jquery.com/jquery-1.12.4.min.js"integrity="sha256-ZosEbRLbNQzLpnKIkEdrPv7lOy9C27hHQ+Xp8a4MxAQ="crossorigin="anonymous"></script>
var context = document.querySelector(".highlight"); // requires an element with class "context" to exist
<script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/jquery.mark.min.js"integrity="sha512-mhbv5DqBMgrWL+32MmsDOt/OAvqr/cHimk6B8y/bx/xS88MVkYGPiVv2ixKVrkywF2qHplNRUvFsAHUdxZ3Krg=="crossorigin="anonymous"referrerpolicy="no-referrer"></script>
var instance = new Mark(context);
<!--{foreach from=$term item=item}--><script>$(".mark-terms").mark("<!--{$item}-->");</script><!--{/foreach}--></includeonly>
instance.mark("<!--{$term}-->");
</script>

Latest revision as of 06:45, 20 June 2022