11import React , { Component , PropTypes } from 'react' ;
2- import brace from 'brace' ;
3- import AceEditor from 'react-ace' ;
2+ import brace from 'brace' ; // eslint-disable-line no-unused-vars
43import 'brace/mode/html' ;
54import 'brace/theme/chrome' ;
5+ import AceEditor from 'react-ace' ;
66
77import 'sass/editor' ;
88
@@ -27,6 +27,10 @@ export default class Editor extends Component {
2727 render ( ) {
2828 const { onUpdateClick } = this . props ;
2929 const { html } = this . state ;
30+ const editorProps = {
31+ $blockScrolling : Infinity ,
32+ wrap : true
33+ } ;
3034 return (
3135 < div id = "editor" >
3236 < AceEditor mode = "html"
@@ -37,10 +41,7 @@ export default class Editor extends Component {
3741 height = "auto"
3842 onChange = { this . onChange }
3943 onLoad = { this . onEditorLoad }
40- editorProps = { {
41- $blockScrolling : Infinity ,
42- wrap : true
43- } }
44+ editorProps = { editorProps }
4445 />
4546 < div className = "buttons" >
4647 < button onClick = { ( ) => onUpdateClick ( html ) } > Update HTML</ button >
@@ -51,8 +52,8 @@ export default class Editor extends Component {
5152}
5253
5354Editor . propTypes = {
54- initialHtml : React . PropTypes . string . isRequired ,
55- onUpdateClick : React . PropTypes . func . isRequired
55+ initialHtml : PropTypes . string . isRequired ,
56+ onUpdateClick : PropTypes . func . isRequired
5657} ;
5758
5859export default Editor ;
0 commit comments