Skip to content

Add profile image to the mention list #373

Answered by csculley
FrazeColder asked this question in Q&A
Discussion options

You must be logged in to vote

You should still be able to use renderItem in almost the same way

So instead of

        renderItem(item) {
          return `<img src="${item.profileImageUrl}">${item.value}`;
        },

you can just do

        renderItem(item) {
          const imgNode = document.createElement("img");
          imgNode.src = item.profileImageUrl;
          imgNode.innerText = item.value;
          return imgNode;
        },

The index page on the docs should have an example of using renderItem that you can reference and view on https://quill-mention.com. I'm not sure about the best way to integrate it into Vue/Nuxt3 off the top of my head, sorry

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@FrazeColder
Comment options

Answer selected by FrazeColder
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #371 on April 24, 2024 15:53.