Skip to content

Commit

Permalink
fix: fix adding mark only with insertContent(), fix #264
Browse files Browse the repository at this point in the history
  • Loading branch information
philippkuehn committed Apr 12, 2021
1 parent 28d30a1 commit 0a63123
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions packages/core/src/utilities/elementFromString.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
export default function elementFromString(value: string): HTMLElement {
const htmlString = `<div>${value}</div>`
const parser = new window.DOMParser()
const element = parser.parseFromString(htmlString, 'text/html').body

return element
return new window.DOMParser().parseFromString(value, 'text/html').body
}

0 comments on commit 0a63123

Please sign in to comment.