mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-12-14 18:49:02 +08:00
parent
97a9154375
commit
a23f3a6e6e
@ -274,7 +274,7 @@ export default class Editor extends Emitter {
|
||||
if (typeof content === 'string') {
|
||||
const htmlString = `<div>${content}</div>`
|
||||
const parser = new window.DOMParser()
|
||||
const element = parser.parseFromString(htmlString, 'text/html').body
|
||||
const element = parser.parseFromString(htmlString, 'text/html').body.firstElementChild
|
||||
return DOMParser.fromSchema(this.schema).parse(element, parseOptions)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user