|
@@ -117,6 +117,15 @@ export default class ScriptEditor extends React.Component<any, any> {
|
|
|
error_list: [],
|
|
|
}
|
|
|
},
|
|
|
+ indentUnit: 4,
|
|
|
+ tabSize: 4,
|
|
|
+ extraKeys: {
|
|
|
+ Tab: (cm) => {
|
|
|
+ const indentUnit = cm.getOption("indentUnit") as number
|
|
|
+ var spaces = Array(indentUnit + 1).join(" ");
|
|
|
+ cm.replaceSelection(spaces);
|
|
|
+ }
|
|
|
+ }
|
|
|
})
|
|
|
editor.setSize(null, '100%')
|
|
|
editor.setValue(this.props.scriptText)
|