+ Hey, try to select some text here. There will popup a menu for selecting some inline styles. Remember: you have full control about content and styling of this menu.
+
- Hey, try to select some text here. There will popup a menu for selecting some inline styles. Remember: you have full control about content and styling of this menu.
+ Hey, try to select some text here. You’ll see a formatting menu pop up. And as always, you are in full control about content and styling of this menu.
`,
})
diff --git a/docs/src/docPages/api/extensions/bubble-menu.md b/docs/src/docPages/api/extensions/bubble-menu.md
index bda72d462..9c1d132d3 100644
--- a/docs/src/docPages/api/extensions/bubble-menu.md
+++ b/docs/src/docPages/api/extensions/bubble-menu.md
@@ -2,7 +2,9 @@
[![Version](https://img.shields.io/npm/v/@tiptap/extension-bubble-menu.svg?label=version)](https://www.npmjs.com/package/@tiptap/extension-bubble-menu)
[![Downloads](https://img.shields.io/npm/dm/@tiptap/extension-bubble-menu.svg)](https://npmcharts.com/compare/@tiptap/extension-bubble-menu?minimal=true)
-This extension will make a contextual menu appear near a selection of text.
+This extension will make a contextual menu appear near a selection of text. Use it to let users apply [marks](/api/marks) to their text selection.
+
+As always, the markup and styling is totally up to you. The menu is positioned absolute and requires a wrapper with `position: relative`, that’s basically the only requirement though.
## Installation
```bash
@@ -13,15 +15,17 @@ yarn add @tiptap/extension-bubble-menu
```
## Settings
-| Option | Type | Default | Description |
-| ------------ | ------------- | --------- | --------------------------------------------------------- |
-| element | `HTMLElement` | `null` | The DOM element of your menu. |
-| keepInBounds | `Boolean` | `true` | Specifies that the element is not rendered across bounds. |
+| Option | Type | Default | Description |
+| ------------ | ------------- | ------- | -------------------------------------------------------------------- |
+| element | `HTMLElement` | `null` | The DOM element that contains your menu. |
+| keepInBounds | `Boolean` | `true` | When enabled, it’s rendered inside the bounding box of the document. |
## Source code
[packages/extension-bubble-menu/](https://github.com/ueberdosis/tiptap-next/blob/main/packages/extension-bubble-menu/)
-## Using Vanilla JavaScript
+## Usage
+
+### JavaScript
```js
import { Editor } from '@tiptap/core'
import BubbleMenu from '@tiptap/extension-bubble-menu'
@@ -35,7 +39,7 @@ new Editor({
})
```
-## Using a framework
+### Frameworks
diff --git a/docs/src/docPages/examples/interactive.md b/docs/src/docPages/examples/interactivity.md
similarity index 91%
rename from docs/src/docPages/examples/interactive.md
rename to docs/src/docPages/examples/interactivity.md
index da30aa67b..9edeea16d 100644
--- a/docs/src/docPages/examples/interactive.md
+++ b/docs/src/docPages/examples/interactivity.md
@@ -1,4 +1,4 @@
-# Interactive node views
+# Interactivity
Thanks to [node views](/guide/node-views) you can add interactivity to your nodes. If you can write it in JavaScript, you can add it to the editor.
diff --git a/docs/src/docPages/examples/minimal.md b/docs/src/docPages/examples/minimal.md
index 773df4ea6..00feb801b 100644
--- a/docs/src/docPages/examples/minimal.md
+++ b/docs/src/docPages/examples/minimal.md
@@ -1,3 +1,3 @@
-# Minimal
+# Minimal setup
diff --git a/docs/src/docPages/examples/savvy.md b/docs/src/docPages/examples/savvy.md
index 65450a8e4..71784533e 100644
--- a/docs/src/docPages/examples/savvy.md
+++ b/docs/src/docPages/examples/savvy.md
@@ -1,3 +1,3 @@
-# Savvy editor
+# A clever editor
diff --git a/docs/src/docPages/examples/community.md b/docs/src/docPages/examples/suggestions.md
similarity index 87%
rename from docs/src/docPages/examples/community.md
rename to docs/src/docPages/examples/suggestions.md
index fd34d2d55..65c298809 100644
--- a/docs/src/docPages/examples/community.md
+++ b/docs/src/docPages/examples/suggestions.md
@@ -1,4 +1,4 @@
-# Suggestions
+# Mentions
diff --git a/docs/src/docPages/examples/todo-app.md b/docs/src/docPages/examples/todo-app.md
deleted file mode 100644
index b96614258..000000000
--- a/docs/src/docPages/examples/todo-app.md
+++ /dev/null
@@ -1,3 +0,0 @@
-# Todo App
-
-
diff --git a/docs/src/links.yaml b/docs/src/links.yaml
index 1bc8ef06c..8212593a6 100644
--- a/docs/src/links.yaml
+++ b/docs/src/links.yaml
@@ -53,6 +53,9 @@
# type: pro
- title: Markdown shortcuts
link: /examples/markdown-shortcuts
+ - title: Bubble menu
+ link: /examples/bubble-menu
+ type: new
- title: Tables
link: /examples/tables
# type: pro
@@ -61,19 +64,19 @@
- title: Formatting
link: /examples/formatting
- title: Tasks
- link: /examples/todo-app
+ link: /examples/tasks
- title: Long texts
link: /examples/book
- title: Drawing
link: /examples/drawing
- title: Mentions
- link: /examples/community
+ link: /examples/suggestions
- title: Minimal setup
link: /examples/minimal
- title: A clever editor
link: /examples/savvy
- title: Interactivity
- link: /examples/interactive
+ link: /examples/interactivity
- title: Guide
items:
@@ -197,6 +200,7 @@
# type: draft
- title: BubbleMenu
link: /api/extensions/bubble-menu
+ type: new
- title: CharacterCount
link: /api/extensions/character-count
- title: Collaboration