mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-26 11:31:42 +00:00
d420c247e1
Move MathJax inlineMath configuration from element to page GitOrigin-RevId: f17af484a0df517d6006ee1d42bde01d9c1fed08
15 lines
328 B
JavaScript
15 lines
328 B
JavaScript
/* global MathJax */
|
|
|
|
import App from '../base'
|
|
|
|
export default App.directive('mathjax', function ($compile, $parse) {
|
|
return {
|
|
link(scope, element, attrs) {
|
|
if (!(MathJax && MathJax.Hub)) return
|
|
|
|
setTimeout(() => {
|
|
MathJax.Hub.Queue(['Typeset', MathJax.Hub, element.get(0)])
|
|
}, 0)
|
|
},
|
|
}
|
|
})
|