Anki add-on: Markdown and KaTeX Support (Preview Fix)

Patched version of the original Markdown and KaTeX Support add-on by Jwrede. The original add-on stopped being fully functional in Anki due to multiple breaking API and DOM changes. This patch restores the editor preview and study render.