1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 01:36:22 +00:00

add default language for snippet note

This commit is contained in:
Baptiste Augrain
2018-08-30 17:52:50 +02:00
parent 039f73711a
commit 9f8246a26a
5 changed files with 25 additions and 6 deletions

View File

@@ -85,6 +85,7 @@ class UiTab extends React.Component {
displayLineNumbers: this.refs.editorDisplayLineNumbers.checked,
switchPreview: this.refs.editorSwitchPreview.value,
keyMap: this.refs.editorKeyMap.value,
snippetDefaultLanguage: this.refs.editorSnippetDefaultLanguage.value,
scrollPastEnd: this.refs.scrollPastEnd.checked,
fetchUrlTitle: this.refs.editorFetchUrlTitle.checked
},
@@ -386,6 +387,22 @@ class UiTab extends React.Component {
<p styleName='note-for-keymap'>{i18n.__('⚠️ Please restart boostnote after you change the keymap')}</p>
</div>
</div>
<div styleName='group-section'>
<div styleName='group-section-label'>
{i18n.__('Snippet Default Language')}
</div>
<div styleName='group-section-control'>
<select value={config.editor.snippetDefaultLanguage}
ref='editorSnippetDefaultLanguage'
onChange={(e) => this.handleUIChange(e)}
>
{
_.sortBy(CodeMirror.modeInfo.map(mode => mode.name)).map(name => (<option value={name}>{name}</option>))
}
</select>
</div>
</div>
<div styleName='group-checkBoxSection'>
<label>