Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions docs/extensions/Blockquote/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,12 @@ const extensions = [
Blockquote // [!code ++]
];
```

## Options

### shortcutKeys

Type: `string[]`\
Default: `['shift', 'mod', 'B']`

Keyboard shortcuts for the extension.
9 changes: 9 additions & 0 deletions docs/extensions/Bold/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,12 @@ const extensions = [
Bold // [!code ++]
];
```

## Options

### shortcutKeys

Type: `string[]`\
Default: `['mod', 'B']`

Keyboard shortcuts for the extension.
9 changes: 9 additions & 0 deletions docs/extensions/BulletList/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,12 @@ const extensions = [
BulletList // [!code ++]
];
```

## Options

### shortcutKeys

Type: `string[]`\
Default: `['shift', 'mod', '8']`

Keyboard shortcuts for the extension.
9 changes: 9 additions & 0 deletions docs/extensions/Code/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,12 @@ const extensions = [
Code // [!code ++]
];
```

## Options

### shortcutKeys

Type: `string[]`\
Default: `['mod', 'E']`

Keyboard shortcuts for the extension.
24 changes: 24 additions & 0 deletions docs/extensions/Heading/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,27 @@ const extensions = [
Heading // [!code ++]
];
```

## Options

### shortcutKeys

Type: `string[][]`\
Default: `['alt', 'mod', '${level}']`

Keyboard shortcuts for the extension. To override shortcuts for different heading levels:

```tsx
Heading.configure({
shortcutKeys: [
['alt', 'mod', '0'],
['alt', 'mod', '1'],
['alt', 'mod', '2'],
['alt', 'mod', '3'],
['alt', 'mod', '4'],
['alt', 'mod', '5'],
['alt', 'mod', '6'],
...
]
});
```
16 changes: 16 additions & 0 deletions docs/extensions/Highlight/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,19 @@ const extensions = [
Highlight // [!code ++]
];
```

## Options

### shortcutKeys

Type: `string[]`\
Default: `['⇧', 'mod', 'H']`

Keyboard shortcuts for the extension.

### defaultColor

Type: `string`\
Default: `none`

The initial color used in the action button. If not provided, no color is selected.
9 changes: 9 additions & 0 deletions docs/extensions/History/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,12 @@ const extensions = [
History // [!code ++]
];
```

## Options

### shortcutKeys

Type: `string[][]`\
Default: `[['mod', 'Z'], ['shift', 'mod', 'Z']]`

Keyboard shortcuts for the extension.
9 changes: 9 additions & 0 deletions docs/extensions/HorizontalRule/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,12 @@ const extensions = [
HorizontalRule // [!code ++]
];
```

## Options

### shortcutKeys

Type: `string[]`\
Default: `['mod', 'alt', 'S']`

Keyboard shortcuts for the extension.
9 changes: 9 additions & 0 deletions docs/extensions/ImportWord/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,12 @@ const extensions = [
ImportWord, // [!code ++]
];
```

## Options

### shortcutKeys

Type: `string[]`\
Default: `['alt', 'mod', 'S']`

Keyboard shortcuts for the extension.
9 changes: 9 additions & 0 deletions docs/extensions/Indent/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,12 @@ const extensions = [
Indent // [!code ++]
];
```

## Options

### shortcutKeys

Type: `string[][]`\
Default: `[['Tab'], ['Shift', 'Tab']]`

Keyboard shortcuts for the extension.
9 changes: 9 additions & 0 deletions docs/extensions/Italic/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,12 @@ const extensions = [
Italic // [!code ++]
];
```

## Options

### shortcutKeys

Type: `string[]`\
Default: `['mod', 'I']`

Keyboard shortcuts for the extension.
9 changes: 9 additions & 0 deletions docs/extensions/MoreMark/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,12 @@ const extensions = [
MoreMark // [!code ++]
];
```

## Options

### shortcutKeys

Type: `string[][]`\
Default: `[['mod', '.'], ['mod', ',']]`

Keyboard shortcuts for the extension.
9 changes: 9 additions & 0 deletions docs/extensions/OrderedList/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,12 @@ const extensions = [
OrderedList // [!code ++]
];
```

## Options

### shortcutKeys

Type: `string[]`\
Default: `['mod', 'shift', '7']`

Keyboard shortcuts for the extension.
9 changes: 9 additions & 0 deletions docs/extensions/Strike/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,12 @@ const extensions = [
Strike // [!code ++]
];
```

## Options

### shortcutKeys

Type: `string[]`\
Default: `['shift', 'mod', 'S']`

Keyboard shortcuts for the extension.
19 changes: 19 additions & 0 deletions docs/extensions/Table/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,22 @@ const extensions = [
Table // [!code ++]
];
```

## Hiding default items from the bubble menu

By default, a bubble menu is used to provide controls for table editing (such as adding rows, cols, ...).
Items from this menu can be hidden with "hiddenActions" option in the tableConfig.

```jsx
<RichTextEditor
{...otherProps}
bubbleMenu={{
tableConfig: {
hiddenActions: ['setCellBackground'],
}
}}
/>
```

For supported action keys, please see [TableBubbleMenu.tsx](https://github.com/hunghg255/reactjs-tiptap-editor/blob/main/src/components/menus/components/TableBubbleMenu.tsx)

9 changes: 9 additions & 0 deletions docs/extensions/TaskList/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,12 @@ const extensions = [
TaskList // [!code ++]
];
```

## Options

### shortcutKeys

Type: `string[]`\
Default: `['shift', 'mod', '9']`

Keyboard shortcuts for the extension.
9 changes: 9 additions & 0 deletions docs/extensions/TextAlign/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,12 @@ const extensions = [
TextAlign // [!code ++]
];
```

## Options

### shortcutKeys

Type: `string[][]`\
Default: `[['mod', 'shift', 'L'], ['mod', 'shift', 'E'], ['mod', 'shift', 'R'], ['mod', 'shift', 'J']]`

Keyboard shortcuts for the extension (left, center, right & justify).
9 changes: 9 additions & 0 deletions docs/extensions/TextUnderline/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,12 @@ const extensions = [
TextUnderline // [!code ++]
];
```

## Options

### shortcutKeys

Type: `string[]`\
Default: `['mod', 'U']`

Keyboard shortcuts for the extension.
1 change: 1 addition & 0 deletions src/components/BubbleMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export function BubbleMenu({ editor, disabled, bubbleMenu }: BubbleMenuComponent
extensionsNames.includes('table') && !bubbleMenu?.tableConfig?.hidden ? <TableBubbleMenu actions={bubbleMenu?.tableConfig?.actions}
editor={editor}
key="table"
hiddenActions={bubbleMenu?.tableConfig?.hiddenActions}
/> : null,
extensionsNames.includes('link') && !bubbleMenu?.linkConfig?.hidden ? <BubbleMenuLink disabled={disabled}
editor={editor}
Expand Down
Loading
Loading