mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-14 02:06:29 +00:00
Merge pull request #732 from asmsuechan/fix-image-path-on-dropped
Make it work on windows
This commit is contained in:
@@ -285,7 +285,7 @@ export default class MarkdownPreview extends React.Component {
|
|||||||
|
|
||||||
_.forEach(this.refs.root.contentWindow.document.querySelectorAll('img'), (el) => {
|
_.forEach(this.refs.root.contentWindow.document.querySelectorAll('img'), (el) => {
|
||||||
if (!/\/:storage/.test(el.src)) return
|
if (!/\/:storage/.test(el.src)) return
|
||||||
el.src = el.src.replace('/:storage', path.join(storagePath, 'images'))
|
el.src = `file:///${path.join(storagePath, 'images', path.basename(el.src))}`
|
||||||
})
|
})
|
||||||
|
|
||||||
codeBlockTheme = consts.THEMES.some((_theme) => _theme === codeBlockTheme)
|
codeBlockTheme = consts.THEMES.some((_theme) => _theme === codeBlockTheme)
|
||||||
|
|||||||
Reference in New Issue
Block a user