mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 01:36:22 +00:00
Fix #1797: In preview window, open external link in external browser.
This commit is contained in:
@@ -523,6 +523,15 @@ export default class MarkdownPreview extends React.Component {
|
||||
}
|
||||
|
||||
handlelinkClick (e) {
|
||||
e.preventDefault()
|
||||
e.stopPropagation()
|
||||
|
||||
const href = e.target.href
|
||||
if (href.match(/^http/i)) {
|
||||
shell.openExternal(href)
|
||||
return
|
||||
}
|
||||
|
||||
const noteHash = e.target.href.split('/').pop()
|
||||
// this will match the new uuid v4 hash and the old hash
|
||||
// e.g.
|
||||
|
||||
Reference in New Issue
Block a user