diff --git a/README.md b/README.md index fd47a66fb..8a88c5b97 100644 --- a/README.md +++ b/README.md @@ -53,6 +53,25 @@ export default { | `extensions` | `Array` | `[]` | A list of extensions used, by the editor. This can be `Nodes`, `Marks` or `Plugins`. | | `@update` | `Function` | `undefined` | This will return the current `state` of Prosemirror on every change. | +## Scoped Slots + +| **Name** | **Description** | +| --- | --- | +| `editor` | Here the content will be rendered. | +| `menubar` | Here a menu bar will be rendered. | +| `menububble` | Here a menu bubble will be rendered. | + +### Slot Properties + +The `menubar` and `menububble` slot will receive some properties. + +| **Property** | **Type** | **Description** | +| --- | :---: | --- | +| `nodes` | `Object` | A list of available nodes with active state and command. | +| `marks` | `Object` | A list of available marks with active state and command. | +| `focused` | `Boolean` | Whether the editor is focused. | +| `focus` | `Function` | A function to focus the editor. | + ## Extensions By default the editor will only support some boring paragraphs. Other nodes and marks are available as **extensions**. There is a package called `tiptap-extensions` with the most basic nodes, marks and plugins. @@ -284,6 +303,47 @@ export default class IframeNode extends Node { } ``` +## Building a Menu + +This is a basic example of building a custom menu. A more advanced menu can be found at the [examples page](https://tiptap.scrumpy.io). + +```vue + + + +``` + ## Contributing Please see [CONTRIBUTING](CONTRIBUTING.md) for details.