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