docs: update content

This commit is contained in:
Hans Pagel
2021-04-07 22:53:31 +02:00
parent e61b2a51ed
commit fa23bae5b5
5 changed files with 31 additions and 11 deletions

View File

@@ -1,7 +1,7 @@
# setContent
The `setContent` command replaces the document with a new one. You can pass JSON or HTML, both work fine. Its basically the same as setting the `content` on initialization.
See also: [clearContent](/api/commands/clear-content)
See also: [insertContent](/api/commands/insert-content), [clearContent](/api/commands/clear-content)
## Parameters
@@ -9,7 +9,7 @@ See also: [clearContent](/api/commands/clear-content)
Pass a string (JSON or HTML) as [content](/guide/output). The editor will only render whats allowed according to the [schema](/api/schema).
`emitUpdate?: Boolean`
`emitUpdate?: Boolean (false)`
By default, it doesnt trigger the update event. Passing `true` doesnt prevent triggering the update event.