File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 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
8585
8686### Properties
8787
88+ * ` autoFocus ` ` Boolean ` automatically focuses the editor when it is mounted (default false)
8889* ` 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
9194* ` options ` ` Object ` options passed to the CodeMirror instance
9295* ` onChange ` ` Function (newValue) ` called when a change is made
96+ * ` onCursorActivity ` ` Function (codemirror) ` called when the cursor is moved
9397* ` 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
94101
95102See the [ CodeMirror API Docs] ( https://codemirror.net/doc/manual.html#api ) for the available options.
96103
You can’t perform that action at this time.
0 commit comments