Add setEditable to the documentation of Editor (#2199)

This commit is contained in:
Florian Krüger 2021-11-25 13:04:36 +01:00 committed by GitHub
parent b37b0921dd
commit 62197ce459
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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() ### unregisterPlugin()
Unregister a ProseMirror plugin. Unregister a ProseMirror plugin.