change default indentation
This commit is contained in:
parent
42d59d3fb3
commit
7f5d83a161
2 changed files with 2 additions and 2 deletions
|
@ -18,7 +18,7 @@ class Editor extends React.Component {
|
||||||
});
|
});
|
||||||
this._cm.getWrapperElement().style['font-size'] = `${this.props.fontSize}px`;
|
this._cm.getWrapperElement().style['font-size'] = `${this.props.fontSize}px`;
|
||||||
this._cm.setOption('indentWithTabs', this.props.isTabIndent);
|
this._cm.setOption('indentWithTabs', this.props.isTabIndent);
|
||||||
this._cm.setOption('indentUnit', this.props.indentationAmount);
|
this._cm.setOption('tabSize', this.props.indentationAmount);
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidUpdate(prevProps) {
|
componentDidUpdate(prevProps) {
|
||||||
|
|
|
@ -3,7 +3,7 @@ import * as ActionTypes from '../../../constants';
|
||||||
const initialState = {
|
const initialState = {
|
||||||
isVisible: false,
|
isVisible: false,
|
||||||
fontSize: 18,
|
fontSize: 18,
|
||||||
indentationAmount: 4,
|
indentationAmount: 2,
|
||||||
isTabIndent: true
|
isTabIndent: true
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue