NikulinIlya / vue-easymde

📝 Vue-EasyMDE - use easy-markdown-editor with vue.js.
MIT License
21 stars 10 forks source link

How to make custom code renderers #15

Open logicminds opened 3 years ago

logicminds commented 3 years ago

First off thank you for forking this project. Using this component is really easy and has replaced quill.

I want to make a custom code render function where when the user runs the specifies the following code block the javascript code will convert to a math function using something like https://latex.codecogs.com/ or katex to render on the client. Quilljs has a method of doing this called formula which is pretty simple to setup. If I can get this working I would be happy to make a PR. I am just not sure how to do this. How do I detect and render this math code block?

```math
\int \frac{1}{x} dx = \ln \left| x \right| + C
```