Verified Commit 796a1352 authored by David Beniamine's avatar David Beniamine
Browse files

Avoid and intercept katex errors

1. Intercept katex error so that LDs after a bad LD are still displayed
2. Load katex also in readonly mode for reports

Closes #504
parent e88bbfd2
......@@ -247,7 +247,11 @@ function updateMathMLContent(dom_id, data) {
$("#" + dom_id).html(data);
}
typesetHtmlFormulas(dom_id);
katexRenderAll();
try {
katexRenderAll();
} catch(e) {
console.log(e);
}
}
/**
......
......@@ -47,11 +47,11 @@
{!! $helper->loadAsset("/libraries/epsilonwriter/ew_init.js") !!}
{!! $helper->loadAsset("/libraries/epsilonwriter/EpsiWriter.css") !!}
{!! $helper->loadAsset("/libraries/tinymce/plugins/epsilon/katex.js") !!}
{!! $helper->loadAsset("/libraries/tinymce/plugins/epsilon/katex.css") !!}
{!! $helper->loadAsset("/libraries/epsilonwriter/natives.js") !!}
<?php } ?>
{!! $helper->loadAsset("/libraries/tinymce/plugins/epsilon/katex.js") !!}
{!! $helper->loadAsset("/libraries/tinymce/plugins/epsilon/katex.css") !!}
<!-- functions -->
<?php
......
Supports Markdown
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