-
-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17 from condorheroblog/master
- Loading branch information
Showing
86 changed files
with
1,326 additions
and
11,612 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
--- | ||
description: Bubble Menu | ||
|
||
next: | ||
text: Internationalization | ||
link: /guide/internationalization.md | ||
--- | ||
|
||
# Bubble Menu | ||
|
||
The bubble menu, as its name suggests, is a context menu that appears when you select content for editing. It provides quick access to editing operations, such as `Bold`, `Italic`, and `Code`, among others. | ||
|
||
## Usage | ||
|
||
The bubble menu will be automatically enabled when you import the correct plugins. | ||
|
||
The system provides the following default bubble menus: | ||
|
||
| Component Name | Functionality | Configuration Field | | ||
|:---------------:|----------------------------------------------------------------------------------------------|---------------------| | ||
| BubbleMenuText | Provides text-related editing operations like bold, italic, underline, etc. | textConfig | | ||
| BubbleMenuLink | Provides link-related operations like add, edit, delete links | linkConfig | | ||
| BubbleMenuImage | Provides image-related operations like resizing, alignment, etc. | imageConfig | | ||
| BubbleMenuVideo | Provides video-related operations like playback control, size adjustment, etc. | videoConfig | | ||
| TableBubbleMenu | Provides table-related operations like adding/deleting rows and columns, merging cells, etc. | tableConfig | | ||
| ColumnsMenu | Provides multi-column layout operations like adjusting column numbers, widths, etc. | columnConfig | | ||
| ContentMenu | Provides general content-related operations like copy, paste, delete, etc. | floatingMenuConfig | | ||
|
||
## Disabling the Bubble Menu | ||
|
||
If you don't want to use the bubble menu, you can disable it using the `hideBubble` property. | ||
|
||
```jsx | ||
<RcTiptapEditor | ||
{...otherProps} | ||
hideBubble={true} | ||
/> | ||
``` | ||
|
||
## Disabling a Specific Bubble Menu | ||
|
||
If you want to disable a specific bubble menu, you can do so using the `bubbleMenu` property. For example, to disable the text-related menu: | ||
|
||
```jsx | ||
<RcTiptapEditor | ||
{...otherProps} | ||
bubbleMenu={{ | ||
textConfig: { | ||
hidden: true, | ||
} | ||
}} | ||
/> | ||
``` | ||
|
||
## Customizing the Bubble Menu | ||
|
||
If you want to customize the bubble menu, you can configure it using the `render` function within the `bubbleMenu` property. | ||
|
||
```jsx | ||
<RcTiptapEditor | ||
{...otherProps} | ||
bubbleMenu={{ | ||
render: (props, menuDom) => { | ||
return <YourComponent /> | ||
}, | ||
}} | ||
/> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.