Stackedit/res/libs/mathjax_init.js
2013-09-17 00:14:17 +01:00

12 lines
538 B
JavaScript

require([
"settings",
"text!libs/mathjax_config.js"
], function(settings, mathjaxConfigJS) {
var script = document.createElement('script');
script.type = 'text/x-mathjax-config';
script.innerHTML = _.template(mathjaxConfigJS, {
tex: settings.extensionSettings.mathJax ? settings.extensionSettings.mathJax.tex : 'undefined',
tex2jax: settings.extensionSettings.mathJax ? settings.extensionSettings.mathJax.tex2jax : undefined
});
document.getElementsByTagName('head')[0].appendChild(script);
});