mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 17:56:25 +00:00
fix: default.css not found
This commit is contained in:
@@ -170,10 +170,10 @@ export default class MarkdownPreview extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
setCodeTheme (theme) {
|
setCodeTheme (theme) {
|
||||||
theme = consts.THEMES.some((_theme) => _theme === theme)
|
const pathToCss = consts.THEMES.some((_theme) => _theme === theme)
|
||||||
? theme
|
? `theme/${theme}.css`
|
||||||
: 'default'
|
: 'lib/codemirror.css'
|
||||||
this.getWindow().document.getElementById('codeTheme').href = `${appPath}/node_modules/codemirror/theme/${theme}.css`
|
this.getWindow().document.getElementById('codeTheme').href = `${appPath}/node_modules/codemirror/${pathToCss}`
|
||||||
}
|
}
|
||||||
|
|
||||||
rewriteIframe () {
|
rewriteIframe () {
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ const consts = {
|
|||||||
'Dodger Blue',
|
'Dodger Blue',
|
||||||
'Violet Eggplant'
|
'Violet Eggplant'
|
||||||
],
|
],
|
||||||
THEMES: ['default'].concat(themes)
|
THEMES: themes,
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = consts
|
module.exports = consts
|
||||||
|
|||||||
Reference in New Issue
Block a user