Commit 52776ec2 authored by RawKStar77's avatar RawKStar77

Break out loadMathJax() function to Module level

Delete console.log error
parent c1d35919
......@@ -7,6 +7,19 @@
# the markdown editor.
###
loadMathJax = ->
if !MathJax?
$.ajax {
url:"//cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"
dataType: 'script'
cache: true
complete: ->
# MathJax configuration overides.
MathJax.Hub.Config({
showMathMenu: false
})
}
markdown = ['$filter', '$sanitize', '$sce', '$timeout', ($filter, $sanitize, $sce, $timeout) ->
link: (scope, elem, attr, ctrl) ->
return unless ctrl?
......@@ -252,22 +265,6 @@ markdown = ['$filter', '$sanitize', '$sce', '$timeout', ($filter, $sanitize, $sc
$timeout -> inputEl.focus()
MathJaxFallback = false
loadMathJax = ->
try
if !MathJax?
$.ajax {
url:"//cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"
dataType: 'script'
cache: true
complete: ->
# MathJax configuration overides.
MathJax.Hub.Config({
showMathMenu: false
})
}
catch error
console.log error
renderMath = (textToCheck) ->
# Parses text for math as denoted by '$$'
i = 0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment