diff --git a/README.md b/README.md index 6630710c..5df60bab 100644 --- a/README.md +++ b/README.md @@ -68,6 +68,7 @@ useBuiltInExtensions | **Property** | **Type** | **Default** | **Description** | | --- | :---: | :---: | --- | | `content` | `Object\|String` | `null` | The editor state object used by Prosemirror. You can also pass HTML to the `content` slot. When used both, the `content` slot will be ignored. | +| `editorProps` | `Object` | `{}` | A list of [Prosemirror editorProps](https://prosemirror.net/docs/ref/#view.EditorProps). | | `editable` | `Boolean` | `true` | When set to `false` the editor is read-only. | | `autoFocus` | `Boolean` | `false` | Focus the editor on init. | | `extensions` | `Array` | `[]` | A list of extensions used, by the editor. This can be `Nodes`, `Marks` or `Plugins`. | diff --git a/packages/tiptap/src/Editor.js b/packages/tiptap/src/Editor.js index 41766d46..95cc4586 100644 --- a/packages/tiptap/src/Editor.js +++ b/packages/tiptap/src/Editor.js @@ -14,6 +14,7 @@ export default class Editor { constructor(options = {}) { this.defaultOptions = { + editorProps: {}, editable: true, autoFocus: false, extensions: [], @@ -167,6 +168,9 @@ export default class Editor { }, }, }), + new Plugin({ + props: this.options.editorProps, + }), ], }) }