File tree 1 file changed +9
-2
lines changed
1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -85,12 +85,19 @@ You can interact with the CodeMirror instance using a `ref` and the `getCodeMirr
85
85
86
86
### Properties
87
87
88
+ * ` autoFocus ` ` Boolean ` automatically focuses the editor when it is mounted (default false)
88
89
* ` autoSave ` ` Boolean ` automatically persist changes to underlying textarea (default false)
89
- * ` value ` ` String ` the editor value
90
- * ` preserveScrollPosition ` ` Boolean=false ` Preserve previous scroll position after updating value
90
+ * ` className ` ` String ` adds a custom css class to the editor
91
+ * ` codeMirrorInstance ` ` Function ` provides a specific CodeMirror instance (defaults to ` require('codemirror') ` )
92
+ * ` defaultValue ` ` String ` provides a default (not change tracked) value to the editor
93
+ * ` name ` ` String ` sets the name of the editor input field
91
94
* ` options ` ` Object ` options passed to the CodeMirror instance
92
95
* ` onChange ` ` Function (newValue) ` called when a change is made
96
+ * ` onCursorActivity ` ` Function (codemirror) ` called when the cursor is moved
93
97
* ` onFocusChange ` ` Function (focused) ` called when the editor is focused or loses focus
98
+ * ` onScroll ` ` Function (scrollInfo) ` called when the editor is scrolled
99
+ * ` preserveScrollPosition ` ` Boolean=false ` preserve previous scroll position after updating value
100
+ * ` value ` ` String ` the editor value
94
101
95
102
See the [ CodeMirror API Docs] ( https://codemirror.net/doc/manual.html#api ) for the available options.
96
103
You can’t perform that action at this time.
0 commit comments