1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 01:36: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:
Nikolay Lopin
2018-02-10 14:03:02 +03:00
parent 12447effc9
commit d7d77dbfe9
4 changed files with 21 additions and 4 deletions

View File

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