inkdropapp / inkdrop-math

Add math syntax support to markdown editor and preview
https://www.inkdrop.app/
MIT License
26 stars 7 forks source link

Using mhchem extension #12

Open erning opened 3 years ago

erning commented 3 years ago

To write nice chemical equations easily, we can use mhchem extension. Please see the following example.

markup

$\ce{2HCl + Na2CO3 = H2O + CO2 ^ + 2NaCl}$

rendered

According to KaTex's documentation, I just added require('katex/dist/contrib/mhchem.js') to this plugin and it works perfectly. Is it possible to formally add the mhchem support? It might be an option in the plugin settings. What is your opinion?

craftzdog commented 3 years ago

Looks nice. I guess it should be optional as it isn't part of core katex.