refac: katex

This commit is contained in:
Timothy J. Baek
2024-08-09 00:01:38 +02:00
parent 3b370bbcb3
commit 92e77d7b33
8 changed files with 147 additions and 12 deletions
@@ -0,0 +1,9 @@
<script lang="ts">
import katex from 'katex';
import 'katex/contrib/mhchem';
export let content: string;
export let displayMode: boolean = false;
</script>
{@html katex.renderToString(content, { displayMode, throwOnError: false })}