mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05: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)
|
|
},
|
|
}
|
|
})
|