Anki Transliteration Addon Similar to Mathjax

I’d like to create a sort of content block that transforms input, and gives you a live preview of what the output will be like, like Mathjax. Instead of producing latex or mathematical text, I’d like to transliterate from latin characters into Arabic ones, according to something like the Buckwalter transliteration scheme.

I’ve been looking through the source code and it seems the mathjax functionality is fairly integrated into the source code (references in at least 34 files), it’s not like an addon. How could I create an addon that would allow me to do this?