mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 17:56:25 +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) => {
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user