uiwjs / react-md-editor

A simple markdown editor with preview, implemented with React.js and TypeScript.
https://uiwjs.github.io/react-md-editor
MIT License
2.03k stars 149 forks source link

Select Specific Languages for Code Highlighting #644

Open martinomburajr opened 1 month ago

martinomburajr commented 1 month ago

I wanted to know if it were possible to select specific languages to be included in the bundle for code highlighting.

Currently 0.5MB is dedicated to a lot of languages I will never make use of. Is there a way to build the MDEditor such that I can only import the ones I need hence reducing the bundle size?

image

jaywcjlove commented 1 month ago

@martinomburajr

https://github.com/uiwjs/react-md-editor/blob/bc85ed2a11793ed052e9a68d423841c707d0f282/core/README.md?plain=1#L140-L166

martinomburajr commented 1 month ago

Thanks, no way to specify specific code highlighting? e.g. Go, and SQL only, or any other combination

jaywcjlove commented 1 month ago

@martinomburajr You need to add this yourself.