Writing Math in 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 a code should let the textbox know to apply KaTeX. I don’t know which code to use and where to apply it.

My attempt:

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