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

Revert "fix: default.css not found"

This reverts commit 7b55454a73b3eebbfe1ed4684157c2d822ee2f05.
This commit is contained in:
sota1235
2016-12-22 14:05:43 +09:00
parent 1118149b9e
commit b3263b41ff
2 changed files with 5 additions and 5 deletions

View File

@@ -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 () {

View File

@@ -30,7 +30,7 @@ const consts = {
'Dodger Blue',
'Violet Eggplant'
],
THEMES: themes,
THEMES: ['default'].concat(themes)
}
module.exports = consts