mirror of
https://github.com/eliasstepanik/strudel-docker.git
synced 2026-01-11 21:58:31 +00:00
add editorDidMount
This commit is contained in:
parent
72835c80ed
commit
292f171f28
@ -5,11 +5,12 @@ import 'codemirror/mode/pegjs/pegjs.js';
|
||||
import 'codemirror/theme/material.css';
|
||||
import 'codemirror/lib/codemirror.css';
|
||||
|
||||
export default function CodeMirror({ value, onChange, options }: any) {
|
||||
export default function CodeMirror({ value, onChange, options, editorDidMount }: any) {
|
||||
options = options || {
|
||||
mode: 'javascript',
|
||||
theme: 'material',
|
||||
lineNumbers: true,
|
||||
styleSelectedText: true,
|
||||
};
|
||||
return <CodeMirror2 value={value} options={options} onBeforeChange={onChange} />;
|
||||
return <CodeMirror2 value={value} options={options} onBeforeChange={onChange} editorDidMount={editorDidMount} />;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user