Using Math Symbols in Wix

948 views Asked by At

I have a blog on a website, which is built through Wix. I want to write mathematic symbols in the blog posts.

I have a DataBase "Blog Posts" with a title field and a rich text field. I want to apply the typesetter KaTeX to the text. I created a textbox and linked it to the rich text field. I assume now that some code should let the textbox know to apply KaTeX. I don't know which code to use and where to apply it.

In their installation page, KaTeX give the code to load as a global variable:

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.css" integrity="sha384-qCEsSYDSH0x5I45nNW4oXemORUZnYFtPy/FqB/OjqxabTMW5HVaaH9USK4fN3goV" crossorigin="anonymous">
<script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.js" integrity="sha384-YFVvRUwgqxkAVN9bmAVLsKilmOKfQLyUx0ZlmDNs0aBUTsvMLnRxE3Km0NrZa0i9" crossorigin="anonymous"></script>

I guess I should apply this code inside the following

    $w.onReady(function () {
        $w('#textbox').onReady(){
            \\some code that links to KaTeX
        }
    });

I have no idea how to start. Should I simply print this inside? I doubt that this is the whole html text that should be printed, and I don't know where to print it.

0

There are 0 answers