diff --git a/README.md b/README.md index 89d0b6b3..a714e7d2 100644 --- a/README.md +++ b/README.md @@ -53,9 +53,28 @@ 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. +By default the editor will only support paragraphs. Other nodes and marks are available as **extensions**. There is a package called `tiptap-extensions` with the most basic nodes, marks and plugins. ### Available Extensions @@ -118,7 +137,7 @@ export default { ### Create Custom Extensions -The most powerful feature of tiptap is that you can create you own extensions. There are 3 basic types of extensions. +The most powerful feature of tiptap is that you can create your own extensions. There are 3 types of extensions. | **Type** | **Description** | | --- | --- | @@ -211,7 +230,7 @@ export default class BlockquoteNode extends Node { ### Create a Node as a Vue Component -The real power of the nodes comes in combination with Vue components. Lets build a iframe node, where you can change its url (this can also be found in our [examples](https://github.com/heyscrumpy/tiptap/tree/master/examples/Components/Routes/Embeds)). +The real power of the nodes comes in combination with Vue components. Lets build an iframe node, where you can change its url (this can also be found in our [examples](https://github.com/heyscrumpy/tiptap/tree/master/examples/Components/Routes/Embeds)). ```js import { Node } from 'tiptap' @@ -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.