From 3e8eec6364335486d2d9fc1bdc0b3d5549fc362b Mon Sep 17 00:00:00 2001 From: ryanbliss Date: Fri, 26 Jul 2019 17:04:52 -0600 Subject: [PATCH] Added NodeView Prop Types documentation --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.md b/README.md index 169c97a9a..2e1397782 100644 --- a/README.md +++ b/README.md @@ -446,6 +446,19 @@ export default class IframeNode extends Node { } ``` +#### NodeView Prop Types + +| **Prop** | **Type** | **Description** | +| --- | :---: | --- | +| `node` | `Object` | The Prosemirror node object. Common use case is to get `node.attrs` using a getter on a computed property. | +| `updateAttrs` | `Function` | A function to update `node.attrs` defined in `schema`. Common use case is as setter on a computed property. | +| `view` | `Object` | The Prosemirror editor view instance. | +| `options` | `Array` | An array of your extension options. | +| `getPos` | `Function` | A function that returns the anchored position of the node. | +| `selection` | `Boolean` | A boolean that is set when the node is or is not selected. Common use case is using `watch` to see when the view is selected/unselected to do something, such focus an `` or refocus the editor. | + +## Editor Methods + ## Development Setup Currently, only Yarn is supported for development because of a feature called workspaces we are using here.