@codemirror/state
Advanced tools
Comparing version 0.19.1 to 0.19.2
@@ -0,1 +1,7 @@ | ||
## 0.19.2 (2021-09-13) | ||
### New features | ||
The editor state now has a `readOnly` property with a matching facet to control its value. | ||
## 0.19.1 (2021-08-15) | ||
@@ -2,0 +8,0 @@ |
@@ -1029,2 +1029,21 @@ import { Text } from '@codemirror/text'; | ||
/** | ||
This facet controls the value of the | ||
[`readOnly`](https://codemirror.net/6/docs/ref/#state.EditorState.readOnly) getter, which is | ||
consulted by commands and extensions that implement editing | ||
functionality to determine whether they should apply. It | ||
defaults to false, but when its highest-precedence value is | ||
`true`, such functionality disables itself. | ||
Not to be confused with | ||
[`EditorView.editable`](https://codemirror.net/6/docs/ref/#view.EditorView^editable), which | ||
controls whether the editor's DOM is set to be editable (and | ||
thus focusable). | ||
*/ | ||
static readOnly: Facet<boolean, boolean>; | ||
/** | ||
Returns true when the editor is | ||
[configured](https://codemirror.net/6/docs/ref/#state.EditorState^readOnly) to be read-only. | ||
*/ | ||
get readOnly(): boolean; | ||
/** | ||
Registers translation phrases. The | ||
@@ -1031,0 +1050,0 @@ [`phrase`](https://codemirror.net/6/docs/ref/#state.EditorState.phrase) method will look through |
{ | ||
"name": "@codemirror/state", | ||
"version": "0.19.1", | ||
"version": "0.19.2", | ||
"description": "Editor state data structures for the CodeMirror code editor", | ||
@@ -5,0 +5,0 @@ "scripts": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
217319
5601