-
+
```
-## Editor Properties
+
-## Scoped Slots
+## Components
| **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. |
+| `` | Here the content will be rendered. |
+| `` | Here a menu bar will be rendered. |
+| `` | Here a menu bubble will be rendered. |
+| `` | Here a floating menu will be rendered. |
-### Slot Properties
+### EditorMenuBar
-The `menubar` and `menububble` slot will receive some properties.
+The `` component is renderless and will receive some properties through a scoped slot.
| **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. |
+| `commands` | `Array` | A list of all commands. |
+| `isActive` | `Function` | A function to check if your selected text is a node or mark. `isActive({node|mark}, attrs)` |
+| `markAttrs` | `Function` | A function to get all mark attributes of your selection. |
| `focused` | `Boolean` | Whether the editor is focused. |
| `focus` | `Function` | A function to focus the editor. |
+#### Example
+
+```vue
+
+
+
+
+
+
+
+```
+
+### EditorMenuBubble
+
+The `` component is renderless and will receive some properties through a scoped slot.
+
+| **Property** | **Type** | **Description** |
+| --- | :---: | --- |
+| `commands` | `Array` | A list of all commands. |
+| `isActive` | `Function` | A function to check if your selected text is a node or mark. `isActive({node|mark}, attrs)` |
+| `markAttrs` | `Function` | A function to get all mark attributes of your selection. |
+| `focused` | `Boolean` | Whether the editor is focused. |
+| `focus` | `Function` | A function to focus the editor. |
+| `menu` | `Object` | An object for positioning your menu. |
+
+#### Example
+
+```vue
+
+
+
+
+
+
+
+```
+
+### EditorFloatingMenu
+
+The `` component is renderless and will receive some properties through a scoped slot.
+
+| **Property** | **Type** | **Description** |
+| --- | :---: | --- |
+| `commands` | `Array` | A list of all commands. |
+| `isActive` | `Function` | A function to check if your selected text is a node or mark. `isActive({node|mark}, attrs)` |
+| `markAttrs` | `Function` | A function to get all mark attributes of your selection. |
+| `focused` | `Boolean` | Whether the editor is focused. |
+| `focus` | `Function` | A function to focus the editor. |
+| `menu` | `Object` | An object for positioning your menu. |
+
+#### Example
+
+```vue
+
+
+
+
+
+
+
+```
+
## Extensions
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.
@@ -90,71 +173,75 @@ By default, the editor will only support paragraphs. Other nodes and marks are a
```vue
-
-
-
Yay Headlines!
-
All these cool tags are working now.
-
-
+
+
+
+
+
+
+
+
```
@@ -230,7 +317,7 @@ export default class BlockquoteNode extends Node {
// this command will be called from menus to add a blockquote
// `type` is the prosemirror schema object for this blockquote
// `schema` is a collection of all registered nodes and marks
- command({ type, schema }) {
+ commands({ type, schema }) {
return wrapIn(type)
}
@@ -327,49 +414,6 @@ 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
-
-
-
-
-
-
-
-
-
-
This text can be made bold.
-
-
-
-
-
-```
-
## Development Setup
Currently, only Yarn is supported for development because of a feature called workspaces we are using here.