basant307/AI_Governance_Project
045
1# codemirror [](https://www.npmjs.org/package/codemirror)2 3[ [**WEBSITE**](https://codemirror.net/) | [**DOCS**](https://codemirror.net/docs/ref/#codemirror) | [**ISSUES**](https://github.com/codemirror/dev/issues) | [**FORUM**](https://discuss.codemirror.net/c/next/) | [**CHANGELOG**](https://github.com/codemirror/basic-setup/blob/main/CHANGELOG.md) ]4 5This package provides an example configuration for the6[CodeMirror](https://codemirror.net/) code editor. The actual editor7is implemented in the various packages under the `@codemirror` scope,8which this package depends on.9 10The [project page](https://codemirror.net/) has more information, a11number of [examples](https://codemirror.net/examples/) and the12[documentation](https://codemirror.net/docs/).13 14This code is released under an15[MIT license](https://github.com/codemirror/basic-setup/tree/main/LICENSE).16 17We aim to be an inclusive, welcoming community. To make that explicit,18we have a [code of19conduct](http://contributor-covenant.org/version/1/1/0/) that applies20to communication around the project.21 22## Usage23 24```javascript25import {EditorView, basicSetup} from "codemirror"26 27const view = new EditorView({28 parent: document.body,29 doc: "Hello",30 extensions: [basicSetup /* ... */]31})32```33 34This sets up a basic code editor containing the word "Hello". You'll35usually want to add at least a [language36mode](https://codemirror.net/#languages) to your configuration.37 