uiwjs / react-codemirror

CodeMirror 6 component for React. @codemirror https://uiwjs.github.io/react-codemirror/
https://uiwjs.github.io/react-codemirror/
MIT License
1.63k stars 129 forks source link

Is it possible to use the themes from this project with CodeMirror 6 without using React? #644

Open brendand opened 6 months ago

brendand commented 6 months ago

I am working on a Swift app (macOS/AppKit and iOS/UIKit) and I'm using CodeMirror for a script editor screen. I'd love to be able to use the themes in this project, but I'm not sure how to integrate them without using React. Can the themes be used in the basic CodeMirror without all the React dependencies?

jaywcjlove commented 6 months ago

https://github.com/uiwjs/react-codemirror/blob/6440766e7ea354229dcbe1db2416eceb4fe70470/themes/abyss/README.md?plain=1#L22-L31

Everything should be fine under normal circumstances, but if you're using it in pure HTML, we might need to make some changes.

https://github.com/uiwjs/react-codemirror/blob/36a1e009436bbc259c6bab868d33ed0f2a406598/bundle.html#L12-L43

@brendand If your non-React application uses a bundling tool, it should be able to run.