wikijs-fork/client/js/pages/view.js

29 lines
737 B
JavaScript
Raw Normal View History

'use strict'
import $ from 'jquery'
2017-04-14 18:15:11 +00:00
import MathJax from 'mathjax'
module.exports = (alerts) => {
if ($('#page-type-view').length) {
let currentBasePath = ($('#page-type-view').data('entrypath') !== 'home') ? $('#page-type-view').data('entrypath') : ''
2017-04-14 18:15:11 +00:00
// MathJax Render
MathJax.Hub.Config({
jax: ['input/TeX', 'input/MathML', 'output/SVG'],
extensions: ['tex2jax.js', 'mml2jax.js'],
TeX: {
extensions: ['AMSmath.js', 'AMSsymbols.js', 'noErrors.js', 'noUndefined.js']
},
SVG: {
scale: 120,
font: 'STIX-Web'
},
showMathMenu: false
})
require('../modals/create.js')(currentBasePath)
require('../modals/move.js')(currentBasePath, alerts)
}
2017-02-09 01:52:37 +00:00
}