citation-js / replacer

HTML API for Citation.js
https://citation-js.github.io/replacer/
15 stars 0 forks source link

Add option to use custom CSS selector #17

Open Pandapip1 opened 1 year ago

Pandapip1 commented 1 year ago

Pretty simple: I would like to be able to use replacer, but instead of targeting .citation-js, I would like to target code.language-csl-json.

larsgw commented 1 year ago

Do you have a suggestion for how to specify that option in the HTML?

Pandapip1 commented 1 year ago

Similarly to how MathJax does it:

<script>
MathJax = {
  tex: {
    inlineMath: [['$', '$'], ['\\(', '\\)']]
  },
  svg: {
    fontCache: 'global'
  }
};
</script>
<script type="text/javascript" id="MathJax-script" async
  src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js">
</script>