Improve json editor
This commit is contained in:
@@ -1,11 +1,14 @@
|
|||||||
import * as React from 'react'
|
import * as React from 'react'
|
||||||
import { default as AceEditor } from 'react-ace'
|
import { default as AceEditor } from 'react-ace'
|
||||||
import { Theme, withTheme } from '@material-ui/core'
|
import { Theme, withTheme } from '@material-ui/core'
|
||||||
import 'brace/mode/json'
|
import 'ace-builds'
|
||||||
import 'brace/theme/dawn'
|
import 'ace-builds/webpack-resolver'
|
||||||
import 'brace/theme/monokai'
|
import 'ace-builds/src-noconflict/mode-json'
|
||||||
import 'brace/mode/xml'
|
import 'ace-builds/src-noconflict/mode-xml'
|
||||||
import 'brace/mode/text'
|
import 'ace-builds/src-noconflict/snippets/json'
|
||||||
|
import 'ace-builds/src-noconflict/snippets/xml'
|
||||||
|
import 'ace-builds/src-noconflict/mode-text'
|
||||||
|
import 'ace-builds/src-noconflict/theme-monokai'
|
||||||
import 'react-ace'
|
import 'react-ace'
|
||||||
|
|
||||||
function Editor(props: {
|
function Editor(props: {
|
||||||
@@ -27,6 +30,10 @@ function Editor(props: {
|
|||||||
name="UNIQUE_ID_OF_DIV"
|
name="UNIQUE_ID_OF_DIV"
|
||||||
width="100%"
|
width="100%"
|
||||||
height="200px"
|
height="200px"
|
||||||
|
enableSnippets={true}
|
||||||
|
enableBasicAutocompletion={true}
|
||||||
|
enableLiveAutocompletion={true}
|
||||||
|
showPrintMargin={false}
|
||||||
showGutter={true}
|
showGutter={true}
|
||||||
value={props.value}
|
value={props.value}
|
||||||
onChange={props.onChange}
|
onChange={props.onChange}
|
||||||
|
|||||||
Reference in New Issue
Block a user