fix: add CreateNodeFromContentOptions to insertContent (#1678)

*  Add CreateNodeFromContentOptions  to insertContent

* 📝 Add it to the doc
This commit is contained in:
castroCrea
2021-08-09 14:40:17 +01:00
committed by GitHub
parent a0444b5ec3
commit aabdfd6f7d
4 changed files with 48 additions and 6 deletions

View File

@@ -16,6 +16,14 @@ editor.commands.insertContent('Example Text')
// HTML
editor.commands.insertContent('<h1>Example Text</h1>')
// HTML with trim white space
editor.commands.insertContent('<h1>Example Text</h1>',
{
parseOptions: {
preserveWhitespace: false,
}
})
// JSON/Nodes
editor.commands.insertContent({
type: 'heading',