Merge branch 'main' of https://github.com/ueberdosis/tiptap-next
This commit is contained in:
@@ -2,7 +2,9 @@
|
||||
[](https://www.npmjs.com/package/@tiptap/extension-bubble-menu)
|
||||
[](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
|
||||
<demos :items="{
|
||||
Vue: 'Extensions/BubbleMenu/Vue',
|
||||
React: 'Extensions/BubbleMenu/React',
|
||||
|
||||
6
docs/src/docPages/examples/bubble-menu.md
Normal file
6
docs/src/docPages/examples/bubble-menu.md
Normal file
@@ -0,0 +1,6 @@
|
||||
# Bubble menu
|
||||
|
||||
<demos :items="{
|
||||
Vue: 'Examples/BubbleMenu/Vue',
|
||||
React: 'Examples/BubbleMenu/React',
|
||||
}" />
|
||||
@@ -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.
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
# Minimal
|
||||
# Minimal setup
|
||||
|
||||
<demo name="Examples/Minimal" highlight="7-9,25-27" />
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
# Savvy editor
|
||||
# A clever editor
|
||||
|
||||
<demo name="Examples/Savvy" />
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Suggestions
|
||||
# Mentions
|
||||
|
||||
<demos :items="{
|
||||
Vue: 'Examples/Community/Vue',
|
||||
3
docs/src/docPages/examples/tasks.md
Normal file
3
docs/src/docPages/examples/tasks.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# Tasks
|
||||
|
||||
<demo name="Examples/Tasks" />
|
||||
@@ -1,3 +0,0 @@
|
||||
# Todo App
|
||||
|
||||
<demo name="Examples/TodoApp" />
|
||||
Reference in New Issue
Block a user