diff --git a/docs/src/docPages/api/commands/clear-content.md b/docs/src/docPages/api/commands/clear-content.md index 112f31e7..922c910f 100644 --- a/docs/src/docPages/api/commands/clear-content.md +++ b/docs/src/docPages/api/commands/clear-content.md @@ -13,9 +13,9 @@ By default, it doesn’t trigger the update event. Passing `true` doesn’t prev ## Usage ```js // Remoe all content from the document -this.editor.commands.clearContent() +editor.commands.clearContent() // Remove all content, and trigger the `update` event -this.editor.commands.clearContent(true) +editor.commands.clearContent(true) ``` diff --git a/docs/src/docPages/api/commands/clear-nodes.md b/docs/src/docPages/api/commands/clear-nodes.md index 334b4bee..ebf6ed0c 100644 --- a/docs/src/docPages/api/commands/clear-nodes.md +++ b/docs/src/docPages/api/commands/clear-nodes.md @@ -3,6 +3,6 @@ The `clearNodes` command normalizes nodes to a simple paragraph, it even normali ## Usage ```js -this.editor.commands.clearNodes() +editor.commands.clearNodes() ``` diff --git a/docs/src/docPages/api/commands/insert-content.md b/docs/src/docPages/api/commands/insert-content.md index a504a705..73516d9b 100644 --- a/docs/src/docPages/api/commands/insert-content.md +++ b/docs/src/docPages/api/commands/insert-content.md @@ -11,13 +11,13 @@ The command is pretty flexible and takes plain text, HTML or even JSON as a valu ## Usage ```js // Plain text -this.editor.commands.insertContent('Example Text') +editor.commands.insertContent('Example Text') // HTML -this.editor.commands.insertContent('

Example Text

') +editor.commands.insertContent('

Example Text

') // JSON/Nodes -this.editor.commands.insertContent({ +editor.commands.insertContent({ type: 'heading', attrs: { level: 1, diff --git a/docs/src/docPages/api/commands/set-content.md b/docs/src/docPages/api/commands/set-content.md index e7a94f6b..00420893 100644 --- a/docs/src/docPages/api/commands/set-content.md +++ b/docs/src/docPages/api/commands/set-content.md @@ -19,10 +19,10 @@ Options to configure the parsing can be passed during initialization and/or with ## Usage ```js // HTML -this.editor.commands.setContent('

Example Text

') +editor.commands.setContent('

Example Text

') // JSON -this.editor.commands.setContent({ +editor.commands.setContent({ "type": "doc", "content": [ { diff --git a/docs/src/docPages/api/commands/update-attributes.md b/docs/src/docPages/api/commands/update-attributes.md index 3c40caf2..520b22ff 100644 --- a/docs/src/docPages/api/commands/update-attributes.md +++ b/docs/src/docPages/api/commands/update-attributes.md @@ -14,9 +14,9 @@ This expects an object with the attributes that need to be updated. It doesn’t ## Usage ```js // Update node attributes -this.editor.commands.updateAttributes('heading', { level: 1 }) +editor.commands.updateAttributes('heading', { level: 1 }) // Update mark attributes -this.editor.commands.updateAttributes('highlight', { color: 'pink' }) +editor.commands.updateAttributes('highlight', { color: 'pink' }) ```