{"repo":"scniro/react-codemirror2","free":true,"listed":false,"github":"https://github.com/scniro/react-codemirror2","clone":"git clone https://github.com/scniro/react-codemirror2.git","description":"Codemirror integrated components for React","language":"TypeScript","stars":1701,"topics":["codemirror","react","typescript"],"license":"MIT","category":"ui-components","readme_excerpt":"react-codemirror2 demo @ scniro.github.io/react-codemirror2 Install react-codemirror2 ships with the notion of an uncontrolled and controlled component. UnControlled consists of a simple wrapper largely powered by the inner workings of codemirror itself, while Controlled will demand state management from the user, preventing codemirror changes unless properly handled via value . The latter will offer more control and likely be more appropriate with redux heavy apps. uncontrolled usage controlled usage requiring codemirror resources - codemirror codemirror comes as a peer dependency, meaning you'll need to require it in your project in addition to react-codemirror2 . This prevents any versioning conflicts that would arise if codemirror came as a dependency through this wrapper. It's been observed that version mismatches can cause difficult to trace issues such as syntax highlighting disappearing without any explicit errors/warnings - additional Since codemirror ships mostly unconfigured, the user is left with the responsibility for requiring any additional resources should they be necessary. This is often the case when specifying certain language modes and themes. How to import/require these assets will vary according to the specifics of your development environment. Below is a sample to include the assets necessary to specify a mode of xml (HTML) and a material theme. note that the base codemirror.css file is required in all use cases props prop type&nbsp; default components ","default_branch":null,"files":null,"tree":[],"storefront":"/r/scniro","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/scniro/react-codemirror2/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}