1
0
mirror of https://github.com/chinchang/web-maker.git synced 2025-07-16 19:46:19 +02:00

Add setting for autoclosetags. fixes #347

This commit is contained in:
Kushagra Gour
2018-11-16 23:40:43 +05:30
parent bffb095832
commit b1f2e62c0b
3 changed files with 10 additions and 1 deletions

View File

@@ -330,6 +330,7 @@ export default class ContentWrap extends Component {
this.cm[type].setOption('keyMap', prefs.keymap);
this.cm[type].setOption('lineWrapping', prefs.lineWrap);
this.cm[type].setOption('autoCloseTags', prefs.autoCloseTags);
this.cm[type].refresh();
});
}

View File

@@ -215,6 +215,13 @@ export default class Settings extends Component {
pref={this.props.prefs.lineWrap}
onChange={this.updateSetting.bind(this)}
/>
<CheckboxSetting
name="autoCloseTags"
title="Add the closing tag automatically on seeing an opening tag in HTML"
label="Auto-close tags"
pref={this.props.prefs.autoCloseTags}
onChange={this.updateSetting.bind(this)}
/>
<CheckboxSetting
name="refreshOnResize"
title="Your Preview will refresh when you resize the preview split"

View File

@@ -108,7 +108,8 @@ export default class App extends Component {
lineWrap: true,
infiniteLoopTimeout: 1000,
layoutMode: 2,
isJs13kModeOn: false
isJs13kModeOn: false,
autoCloseTags: true
};
this.prefs = {};