mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 17:56:25 +00:00
Fixes the theme of code block by codemirror
This commit is contained in:
@@ -186,7 +186,7 @@ export default class MarkdownPreview extends React.Component {
|
|||||||
setCodeTheme (theme) {
|
setCodeTheme (theme) {
|
||||||
theme = consts.THEMES.some((_theme) => _theme === theme)
|
theme = consts.THEMES.some((_theme) => _theme === theme)
|
||||||
? theme
|
? theme
|
||||||
: 'default'
|
: 'elegant'
|
||||||
this.getWindow().document.getElementById('codeTheme').href = `${appPath}/node_modules/codemirror/theme/${theme}.css`
|
this.getWindow().document.getElementById('codeTheme').href = `${appPath}/node_modules/codemirror/theme/${theme}.css`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ export const DEFAULT_CONFIG = {
|
|||||||
preview: {
|
preview: {
|
||||||
fontSize: '14',
|
fontSize: '14',
|
||||||
fontFamily: 'Lato',
|
fontFamily: 'Lato',
|
||||||
codeBlockTheme: 'xcode',
|
codeBlockTheme: 'elegant',
|
||||||
lineNumber: true
|
lineNumber: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user