Languages

React - is it possible to run CodeMirror 6 in SSR mode under Node.js?

10 points
Asked by:
Rubi-Reyna
677

Hi all!

I am looking for React CodeMirror 6 component with SSR support.

Is it possible to run it under Node.js?

1 answer
4 points
Answered by:
Root-ssh
178180

By default CodeMirror 6 and ealier versions are not designed to run under Node.js (in SSR). CodeMirror 6 provides some API that lets to highlight source code under Node.js.

Example React CodeMirror 6 SSR inplementation by Dirask contributor:
https://github.com/dirask/dirask-tutorials/tree/master/dirask-tutorials-nodejs/React%2BSSR%2BCodeMirror-6

 

See also

  1. https://dirask.com/snippets/CodeMirror-6-highlight-source-code-under-Node-js-run-under-node-Dn6abD
0 commentsAdd comment
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.
Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join