-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to send user_id on mention #120
Comments
@gamenic-sandip If you are using textarea, it can be hard to achieve. <!-- with Vue 2.6+ 'v-slot' directive -->
<!-- note at least two '<span>' wrapper are required to work -->
<template v-slot:embeddedItem="s">
<span><span class="tag"><img class="avatar" :src="s.current.avatar">{{ s.current.name }}</span></span>
</template> and put a let mentionedUserIds = []
editor.querySelectorAll('[data-user-id]').forEach(el => {
mentionedUserIds.push(el.getAttribute('data-user-id'))
}) when sending messages |
Thanks for you reply @fritx |
may i know what do you mean by putting data-user-id onto span? @fritx |
@zhonghao23 there are two <template v-slot:embeddedItem="s">
<span><span class="tag"><img class="avatar" :src="s.current.avatar">{{ s.current.name }}</span></span>
</template> We can choose either one of them to be |
thank you for your quick reply @fritx |
Thank you very much for the help. I am using Element UI's textarea and basically I want to obtain only the members that have been selected and thus be able to send them to my backend, I am using v-model in the component but I do not get the expected result. It is similar to this problem but in my case I am using textarea
|
Hello @4ver @goldsteinr
Here i have list of user on mention and when i select user its sending user_name
I want to send user_id also
For example
If i have two user with same name
User1
User1
and when i send message in my backend i receive two users with same and and its difficult to found which user_id which
So i want to pass here user_id also but not showing here
Here user_name -> OK
Here :-
name-key="displayName" -> Name display on tag option
-> Name send to backend
I want to send user_id to backend without affecting above two
The text was updated successfully, but these errors were encountered: