mathjax.js 304 B

12345678910111213141516
  1. export default class MathJaxConfigurer {
  2. constructor(crowi) {
  3. this.crowi = crowi;
  4. const config = crowi.getConfig();
  5. this.isEnabled = !!config.env.MATHJAX; // convert to boolean
  6. }
  7. configure(md) {
  8. if (this.isEnabled) {
  9. md.use(require('markdown-it-mathjax')());
  10. }
  11. }
  12. }