@iamakulov/codemirror-view 6.39.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (C) 2018-2021 by Marijn Haverbeke <marijn@haverbeke.berlin> and others
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,37 @@
1
+ # @codemirror/view [![NPM version](https://img.shields.io/npm/v/@codemirror/view.svg)](https://www.npmjs.org/package/@codemirror/view)
2
+
3
+ [ [**WEBSITE**](https://codemirror.net/) | [**DOCS**](https://codemirror.net/docs/ref/#view) | [**ISSUES**](https://github.com/codemirror/dev/issues) | [**FORUM**](https://discuss.codemirror.net/c/next/) | [**CHANGELOG**](https://github.com/codemirror/view/blob/main/CHANGELOG.md) ]
4
+
5
+ This package implements the DOM view component for the
6
+ [CodeMirror](https://codemirror.net/) code editor.
7
+
8
+ The [project page](https://codemirror.net/) has more information, a
9
+ number of [examples](https://codemirror.net/examples/) and the
10
+ [documentation](https://codemirror.net/docs/).
11
+
12
+ This code is released under an
13
+ [MIT license](https://github.com/codemirror/view/tree/main/LICENSE).
14
+
15
+ We aim to be an inclusive, welcoming community. To make that explicit,
16
+ we have a [code of
17
+ conduct](http://contributor-covenant.org/version/1/1/0/) that applies
18
+ to communication around the project.
19
+
20
+ ## Usage
21
+
22
+ ```javascript
23
+ import {EditorView} from "@codemirror/view"
24
+ import {basicSetup} from "codemirror"
25
+
26
+ const view = new EditorView({
27
+ parent: document.querySelector("#some-node"),
28
+ doc: "Content text",
29
+ extensions: [basicSetup /* ... */]
30
+ })
31
+ ```
32
+
33
+ Add additional extensions, such as a [language
34
+ mode](https://codemirror.net/#languages), to configure the editor.
35
+ Call
36
+ [`view.dispatch`](https://codemirror.net/docs/ref/#view.EditorView.dispatch)
37
+ to update the editor's state.