1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-22 14:11:42 +00:00

Specified MarkdownPreview class

This commit is contained in:
roottool
2019-01-27 22:26:31 +09:00
parent 1683d63f33
commit 5e87ec2627

View File

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