From d59ce5c30a41342190e9686340f9793d12ae7c3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20Kr=C3=BCger?= Date: Thu, 25 Nov 2021 12:24:07 +0100 Subject: [PATCH] Add `setEditable` to the documentation of `Editor` --- docs/api/editor.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/api/editor.md b/docs/api/editor.md index 17eb64e7d95..7755a05356e 100644 --- a/docs/api/editor.md +++ b/docs/api/editor.md @@ -124,6 +124,18 @@ editor.setOptions({ }, }) ``` + +### setEditable() +Update editable state of the editor. + +| Parameter | Type | Description | +| --------- | ------- | ------------------------------------------------------------- | +| editable | boolean | `true` when the user should be able to write into the editor. | + +```js +// Make the editor read-only +editor.setEditable(false) +``` ### unregisterPlugin() Unregister a ProseMirror plugin.