docs: update content
This commit is contained in:
@@ -73,8 +73,27 @@ Mention.configure({
|
|||||||
})
|
})
|
||||||
```
|
```
|
||||||
|
|
||||||
| renderLabel | `String` | `({ options, node }) => …` | Define how a mention label should be rendered. |
|
### renderLabel
|
||||||
| suggestion | `Object` | `{ … }` | [Read more](/api/utilities/suggestion) |
|
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
|
## Source code
|
||||||
[packages/extension-mention/](https://github.com/ueberdosis/tiptap/blob/main/packages/extension-mention/)
|
[packages/extension-mention/](https://github.com/ueberdosis/tiptap/blob/main/packages/extension-mention/)
|
||||||
|
|||||||
Reference in New Issue
Block a user