Plugin for TeX math formula rendering with MathJax

Hi everyone!
Wouldn’t it be cool if Mailspring could display mathematical formulas typed in LaTeX?

(There are solutions to the problem of communicating math via email, but best of them limit you to using Gmail, while Mailspring allows you to use any university mail server)

As far as I understand, this is totally possible, since Mailspring’s interface is built with Electron, and MathJax can be hacked into Electron apps – see Fredrik Sävje’s Math with Slack, for example

I’d like to try making a plugin with, say, a button “render TeX” , which, when toggled, would render all formulae in the text that are in $surrounding$

Where do I start with this?

Cheers!