mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 09:46:22 +00:00
Fix wrong styling of todo items in exported HTML
The issue happened because styles connected with todo list were applied directly to HTML in Preview component. I added class to `li` tag of each todo item and style it from css.
This commit is contained in:
@@ -360,10 +360,6 @@ export default class MarkdownPreview extends React.Component {
|
||||
}
|
||||
this.refs.root.contentWindow.document.body.innerHTML = markdown.render(value)
|
||||
|
||||
_.forEach(this.refs.root.contentWindow.document.querySelectorAll('.taskListItem'), (el) => {
|
||||
el.parentNode.parentNode.style.listStyleType = 'none'
|
||||
})
|
||||
|
||||
_.forEach(this.refs.root.contentWindow.document.querySelectorAll('a'), (el) => {
|
||||
this.fixDecodedURI(el)
|
||||
el.addEventListener('click', this.anchorClickHandler)
|
||||
|
||||
@@ -178,6 +178,8 @@ ul
|
||||
margin-bottom 1em
|
||||
li
|
||||
display list-item
|
||||
&.taskListItem
|
||||
list-style none
|
||||
p
|
||||
margin 0
|
||||
&>li>ul, &>li>ol
|
||||
|
||||
Reference in New Issue
Block a user