Hi I am wondering if there is a way to tag users from within summernote? Like if the @ symbol is used the a list of users appears.
Example:

Thanks
Hi I am wondering if there is a way to tag users from within summernote? Like if the @ symbol is used the a list of users appears.
Example:

Thanks
Look for summernote hints.
Hi @JonL, thanks for getting back to me! would you be able to point me to a resources on where to find the summernote hints? I have been trying to look for it, but canāt find anything.
Thanks
Juan
hi guys,
Back at this and I am still having some problems trying to implement this
<textarea id="text1" class="form-control hint2mention"></textarea>
<script>
$(document).ready(function() {
$(".hint2mention").summernote({
height: 100,
theme:"lite",
hint: {
mentions: ['jayden', 'sam', 'alvin', 'david'],
match: /\B@(\w*)$/,
search: function (keyword, callback) {
callback($.grep(this.mentions, function (item) {
return item.indexOf(keyword) == 0;
}));
},
content: function (item) {
return '@' + item;
}
}
});
});
</script>
However, I have not been able to get it integrated with App connect, as I would like to get the list of users from a server connect and then use the value selected to send an email.
Any how was wondering if someone can please point me to what I am doing wrong.
Thanks
Juan
If anyone is looking for how to do this I have it working. Add the following code to your page in script tagsā¦
function tb_hints(){
dmx.global.set('editorConfig', {
height: 100,
theme:"lite",
placeholder: "Enter Description Here...",
hint: {
mentions: dmx.parse('sc_tripbits.data.titles'),
match: /\B@(\w*)$/,
search: function (keyword, callback) {
callback($.grep(this.mentions, function (item) {
return item.title.indexOf(keyword) == 0;
}));
},
template: function (item) {
return item.title;
},
content: function (item) {
return $('<a href="' + item.link + '">' + item.title + '</a>')[0];
}
}
});
}
The server connect returns a json array with title and link fields. I use the title field to populate the @mentions and when one is selected it inserts the link. Youāll want to replace the sc_tripbits.data.titles with your own server connect and change the ātitleā and ālinkā fields as appropriate. You can, of course, use whatever fields from your database you want.
Then add dmx-bind:config=āeditorConfigā to your summernote textarea and finally
run the function in the static onsuccess of your server connect, or in a flow with Run Javascript.
Voila!
Love this. Thanks Heather
Iām curious if you managed to get it so when a user is tagged you are able to detect this (as you wanted to send an email)?
Iāve managed to implement this thanks to @Heather_Mann, but Iām struggling on finding a way so I can insert something into the database when a hint is present when the text in summer note is submitted, as well as getting the text that was inserted by that hint (the username).
Aha - I was focused on getting the data from the database to populate the mention. Iāll have a think about the other side. Can you explain your use case a bit more in detail? That might help me figure it out.
Sure - And your post actually helped me a lot, populating the mention was also what I needed.
So essentially Iām using exactly your method, but, when the text in summernote is submitted (which in my use case, they are submitting a comment) I want to send a notification to any users that were tagged. The notification system is already built for other parts of my site, so my question is how to get tagged users in the summernote field and put those users into a variable I can use in a server action.
User tags are placed in the summernote in the following format:
$('<button type="button" class="btn btn-primary btn-sm">@' + item.first_name + ' ' + item.last_name + '</button>' + ' ')[0];
Iāll have a look at it more closely tomorrow (itās getting late here), but could you use the content function to populate a variable array (using dmx.parse - but I canāt think right now how to do that, lol) and then on submitting the form send that array to the server connect? You would need to check that every item in the array was in the summernote field (in case of deletion) but that seems doable. From there hopefully you can trigger the notifications system by iterating through the array that was passed to the server connect.
Again - itās late here so if Iām off track - apologies!
Thanks, thatās definitely in the right direction! I managed to get it working for tagging a single user using dmx.global.set, but I have no idea how to use dmx.parse or similar to make it so it adds it to an array/reads from an array instead.
You could look at doing the adding the value to the array with a flow and then calling the flow from JS and passing the variable. From another post, something likeā¦
dmx.parse("flow_stripe_error.run({stripe_error_message: āā + result.error.message + āā})");
Iām done for tonight. Looking forward to this solution!!
Good Luck!
H.
Well, the answer turned out to be much more simple! I looked at around 30 posts to get an idea of what might work and spent about an hour, but it turns out you can add to an array directly with dmx.parse. Hereās how Iāve got it working:
dmx.parse("postcomment.tagarr.addUniq(" + item.userID + ")"); (Array area | Array name | Add uniq function so an ID is only there once)You can then use the array in server connect actions. I do still have to figure out how to double-check for any removals, but thatās something Iāll tackle tomorrow. Thank you for your help!
Sweet! Glad you got it working. Now, if I need to dmx.parse to an array Iāll know where to find the structure! 
If you wouldnāt mind posting back here when you get the last bit figured out that would be great.
Hi, I am using this plugin but having trouble to do that mention feature. Its working when I am type @ and user list will be render. But i am try to do @ and # - on āhashā I will render other list.
Both(@ and #) can work in same editor? Stuck here. Appreciate if anyone help!