Arsalan Shah
5 years ago
READ DESCRIPTION BEFORE ENABLE
This component allow users to mention other friends into the comments (only). Once the comment is submitted people can view mentioned user profile also.
This is just a UI and doesn't send any notification to mentioned user, for that purpose you can use mentioned users component on top of this : https://www.opensource-socialnetwork.org/component/view/4864/mention-notifications
NOTE
During mention it doesn't support spaces example @Some User it will not return anything but @Some will return friends with such a name. It will only show a friends not all users.

Mentions UI 3.2
Mentions UI 3.1
Mentions UI 2.0
Arsalan Shah
Replied 7 months ago
Some JS error was fixed https://github.com/opensource-socialnetwork/Mentions
Eric redegeld
Replied 7 months ago
whats are the changes for 3.3 and 3.4
Arsalan Shah
Replied 9 months ago
document.querySelector('[contenteditable=true]').addEventListener('DOMNodeInserted'
Dominik L
Replied 1 year ago
To get rid of the deprecation message, I replaced
this:
mentionUI.attach(document.querySelectorAll(".comment-box"));
document.querySelector('[contenteditable=true]').addEventListener('DOMNodeInserted', function(event) {
if (event.target.tagName == 'SPAN') {
event.target.outerHTML = event.target.innerHTML;
event.target.remove();
}
});
}
});
with:
mentionUI.attach(document.querySelectorAll(".comment-box"));
// Create a MutationObserver to watch for changes in the child nodes
const observer = new MutationObserver(function(mutations) {
mutations.forEach(function(mutation) {
mutation.addedNodes.forEach(function(node) {
if (node.nodeType === 1 && node.tagName === 'SPAN') {
node.outerHTML = node.innerHTML;
node.remove();
}
});
});
});
// Select the target node and configure the observer options
const targetNode = document.querySelector('[contenteditable=true]');
if (targetNode) {
observer.observe(targetNode, { childList: true, subtree: true });
}
}
});
Eric redegeld
Replied 1 year ago
so replace old version with this download in think
Arsalan Shah
Replied 1 year ago
[Deprecation] Listener added for a 'DOMNodeInserted' mutation event. Support for this event type has been removed, and this event will no longer be fired. S
Arsalan Shah
Replied 2 years ago
Wors fine

Alessandro pala
Replied 2 years ago
hi :) in the latest version it doesn't work
Dominik L
Replied 3 years ago
Can you enable the option, that I can also mention users with @ in normal post, please?
Dominik L
Replied 3 years ago
because I want user to mention everyone, not just friends