How can I populate suggestion items dynamically? #765
Answered
by
plstreatmewell
plstreatmewell
asked this question in
Questions & Help
-
Hi there! TipTap is great WYSIWYG Editor. Thanks for developing and maintaining it! BTW, I have a question. data () {
return {
editor: new Editor ({
extensions: [
new Mention({
item: () => [
{ id: 1, name: 'A' },
{ id: 2, name: 'B' },
{ id: 3, name: 'C' },
{ id: 4, name: 'D' }
],
// ........
})
]
})
}
} Thank you for reading! |
Beta Was this translation helpful? Give feedback.
Answered by
plstreatmewell
Jul 19, 2020
Replies: 1 comment 1 reply
-
-----[SOLVED]-----
|
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
plstreatmewell
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-----[SOLVED]-----
Assigning reference of this.items to items inside new Mention() works!
After that, you can push or delete items from this.items and that changes suggestion items too!