wiki/client/js/pages/view.js

44 lines
1022 B
JavaScript
Raw Normal View History

'use strict'
2017-05-04 21:41:33 -05:00
/* eslint-disable no-new */
import $ from 'jquery'
2017-04-14 13:15:11 -05: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-05-04 21:41:33 -05:00
// Copy Path
2017-05-20 22:21:16 -05:00
// new Vue({
// el: '.modal-copypath',
// render: h => h(CopyPath)
// })
2017-05-04 21:41:33 -05:00
2017-04-14 13:15:11 -05: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'
},
2017-04-15 12:15:23 -05:00
tex2jax: {
preview: 'none'
},
showMathMenu: false,
showProcessingMessages: false,
messageStyle: 'none'
2017-04-14 13:15:11 -05:00
})
2017-04-15 12:15:23 -05:00
MathJax.Hub.Configured()
2017-04-14 13:15:11 -05:00
require('../modals/create.js')(currentBasePath)
require('../modals/move.js')(currentBasePath, alerts)
}
2017-02-08 19:52:37 -06:00
}