Changes for page MentionsMacro

Last modified by DecalogExploitation on 2026/05/13 14:31

From version 2.1
edited by superadmin
on 2026/01/29 14:21
Change comment: Imported from XAR
To version 3.1
edited by DecalogExploitation
on 2026/05/13 14:31
Change comment: Install extension [org.xwiki.platform:xwiki-platform-mentions-ui/17.10.8]

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.superadmin
1 +xwiki:XWiki.DecalogExploitation
XWiki.JavaScriptExtension[0]
Code
... ... @@ -62,8 +62,10 @@
62 62   ckeditorPromise.done(function (ckeditor) {
63 63   function confMentions(name) {
64 64   return {
65 - feed: function (opts, callback) {
66 - search(opts.query, callback);
65 + dataCallback: function (options, callback) {
66 + // Remove the marker prefix and replace non-breaking space.
67 + const text = options.query.substring(1).replaceAll('\u00A0', ' ');
68 + search(text, callback);
67 67   },
68 68   marker: '@',
69 69   minChars: 0,
XWiki.StyleSheetExtension[0]
Code
... ... @@ -1,11 +1,14 @@
1 1  .xwiki-mention {
2 2   background-color: $services.mentions.mentionsColor;
3 3   border-radius: 8px;
4 - padding: 2px 5px 2px 5px;
4 + padding: 1px 5px 1px 5px;
5 + border: 1px solid var(--dropdown-divider-bg);
5 5  }
6 6  
7 7  .xwiki-mention.user.self {
8 - background-color: $services.mentions.selfMentionsColor;
9 + background-color: var(--mentions-self-bg);
10 + color: var(--mentions-self-color);
11 + border: 0;
9 9  }
10 10  
11 11  .xwiki-mention.removed {