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

Merge pull request #214 from asmsuechan/master

Fixes the theme of code block by codemirror
This commit is contained in:
Sota Sugiura
2017-01-08 23:53:10 +09:00
committed by GitHub
2 changed files with 3 additions and 3 deletions

View File

@@ -184,9 +184,9 @@ export default class MarkdownPreview extends React.Component {
}
setCodeTheme (theme) {
theme = consts.THEMES.some((_theme) => _theme === theme)
theme = consts.THEMES.some((_theme) => _theme === theme) && theme !== 'default'
? theme
: 'default'
: 'elegant'
this.getWindow().document.getElementById('codeTheme').href = `${appPath}/node_modules/codemirror/theme/${theme}.css`
}

View File

@@ -34,7 +34,7 @@ export const DEFAULT_CONFIG = {
preview: {
fontSize: '14',
fontFamily: 'Lato',
codeBlockTheme: 'xcode',
codeBlockTheme: 'elegant',
lineNumber: true
}
}