From 8a23c4c9455897007042d4301d323fd97546e60f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20K=C3=BChn?= Date: Fri, 1 Feb 2019 19:03:49 +0100 Subject: [PATCH] add editor methods to readme --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.md b/README.md index 7dc175d53..b5c68ac88 100644 --- a/README.md +++ b/README.md @@ -77,6 +77,19 @@ export default { | `onBlur` | `Function` | `undefined` | This will return an Object with the `event` and current `state` and `view` of Prosemirror on blur. | | `onUpdate` | `Function` | `undefined` | This will return an Object with the current `state` of Prosemirror, a `getJSON()` and `getHTML()` function and the `transaction` on every change. | +## Editor Methods + +| **Method** | **Arguments**| **Description** | +| --- | :---: | --- | +| `setContent` | `content, emitUpdate` | Replace the current content. You can pass an HTML string or a JSON document. `emitUpdate` defaults to `false`. | +| `clearContent` | `emitUpdate` | Clears the current content. `emitUpdate` defaults to `false`. | +| `setOptions` | `options` | Overwrites the current editor properties. | +| `registerPlugin` | `plugin` | Register a Prosemirror plugin. | +| `getJSON` | – | Get the current content as JSON. | +| `getHTML` | – | Get the current content as HTML. | +| `focus` | — | Focus the editor | +| `destroy` | – | Destroys the editor. | + ## Components | **Name** | **Description** |