mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-22 06:01:45 +00:00
Specified MarkdownPreview class
This commit is contained in:
@@ -833,9 +833,9 @@ export default class MarkdownPreview extends React.Component {
|
||||
}
|
||||
)
|
||||
|
||||
document.querySelectorAll('iframe').forEach(item => {
|
||||
const rect = item.getBoundingClientRect()
|
||||
const imgList = item.contentWindow.document.body.querySelectorAll('img')
|
||||
const markdownPreviewIframe = document.querySelector('.MarkdownPreview')
|
||||
const rect = markdownPreviewIframe.getBoundingClientRect()
|
||||
const imgList = markdownPreviewIframe.contentWindow.document.body.querySelectorAll('img')
|
||||
for (const img of imgList) {
|
||||
img.onclick = () => {
|
||||
const widthMagnification = document.body.clientWidth / img.width
|
||||
@@ -907,7 +907,6 @@ export default class MarkdownPreview extends React.Component {
|
||||
document.body.appendChild(overlay)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
focus () {
|
||||
|
||||
Reference in New Issue
Block a user