mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-11-28 23:59:25 +08:00
docs: update content
This commit is contained in:
parent
4dd079cf44
commit
06d674a7f6
@ -73,8 +73,27 @@ Mention.configure({
|
||||
})
|
||||
```
|
||||
|
||||
| renderLabel | `String` | `({ options, node }) => …` | Define how a mention label should be rendered. |
|
||||
| suggestion | `Object` | `{ … }` | [Read more](/api/utilities/suggestion) |
|
||||
### renderLabel
|
||||
Define how a mention label should be rendered.
|
||||
|
||||
```js
|
||||
Mention.configure({
|
||||
renderLabel({ options, node }) {
|
||||
return `${options.suggestion.char}${node.attrs.label ?? node.attrs.id}`
|
||||
}
|
||||
})
|
||||
```
|
||||
|
||||
### suggestion
|
||||
[Read more](/api/utilities/suggestion)
|
||||
|
||||
```js
|
||||
Mention.configure({
|
||||
suggestion: {
|
||||
// …
|
||||
},
|
||||
})
|
||||
```
|
||||
|
||||
## Source code
|
||||
[packages/extension-mention/](https://github.com/ueberdosis/tiptap/blob/main/packages/extension-mention/)
|
||||
|
Loading…
Reference in New Issue
Block a user