mirror of
https://github.com/chinchang/web-maker.git
synced 2025-07-17 12:01:13 +02:00
Add setting for autoclosetags. fixes #347
This commit is contained in:
@@ -330,6 +330,7 @@ export default class ContentWrap extends Component {
|
|||||||
|
|
||||||
this.cm[type].setOption('keyMap', prefs.keymap);
|
this.cm[type].setOption('keyMap', prefs.keymap);
|
||||||
this.cm[type].setOption('lineWrapping', prefs.lineWrap);
|
this.cm[type].setOption('lineWrapping', prefs.lineWrap);
|
||||||
|
this.cm[type].setOption('autoCloseTags', prefs.autoCloseTags);
|
||||||
this.cm[type].refresh();
|
this.cm[type].refresh();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@@ -215,6 +215,13 @@ export default class Settings extends Component {
|
|||||||
pref={this.props.prefs.lineWrap}
|
pref={this.props.prefs.lineWrap}
|
||||||
onChange={this.updateSetting.bind(this)}
|
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
|
<CheckboxSetting
|
||||||
name="refreshOnResize"
|
name="refreshOnResize"
|
||||||
title="Your Preview will refresh when you resize the preview split"
|
title="Your Preview will refresh when you resize the preview split"
|
||||||
|
@@ -108,7 +108,8 @@ export default class App extends Component {
|
|||||||
lineWrap: true,
|
lineWrap: true,
|
||||||
infiniteLoopTimeout: 1000,
|
infiniteLoopTimeout: 1000,
|
||||||
layoutMode: 2,
|
layoutMode: 2,
|
||||||
isJs13kModeOn: false
|
isJs13kModeOn: false,
|
||||||
|
autoCloseTags: true
|
||||||
};
|
};
|
||||||
this.prefs = {};
|
this.prefs = {};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user