Changes for page MentionsMacro

Last modified by Ludovic Dubost on 2024/07/22 15:59

From version 2.1
edited by Ludovic Dubost
on 2021/11/08 18:28
Change comment: Migrated property [priority] from class [XWiki.WikiMacroClass]
To version 3.1
edited by Ludovic Dubost
on 2022/01/27 10:36
Change comment: Install extension [org.xwiki.platform:xwiki-platform-mentions-ui/13.10.2]

Summary

Details

XWiki.JavaScriptExtension[0]
Code
... ... @@ -1,7 +1,6 @@
1 1  require.config({
2 2   paths: {
3 - 'xwiki-suggestUsers': "$xwiki.getSkinFile('uicomponents/suggest/suggestUsersAndGroups.js', true))" +
4 - "?v=$escapetool.url($xwiki.version)"
3 + 'xwiki-suggestUsers': $jsontool.serialize($xwiki.getSkinFile('uicomponents/suggest/suggestUsersAndGroups.js', true))
5 5   }
6 6  });
7 7  require(['deferred!ckeditor', 'xwiki-suggestUsers', 'jquery', 'xwiki-meta'], function (ckeditorPromise, suggestUsers, $, xm) {
... ... @@ -83,7 +83,7 @@
83 83   editor.once('afterInsertHtml', function () {
84 84   editor.execCommand('xwiki-macro-insert', {
85 85   name: 'mention',
86 - inline: true,
85 + inline: 'enforce',
87 87   parameters: {
88 88   reference: param.id,
89 89   style: 'FULL_NAME',
... ... @@ -99,7 +99,7 @@
99 99   }
100 100  
101 101   function updateConf(config, name) {
102 - const newConf = config;
101 + const newConf = config || {};
103 103   newConf.mentions = newConf.mentions || [];
104 104   newConf.mentions.push(confMentions(name));
105 105   return newConf;
XWiki.WikiMacroClass[0]
Default category
... ... @@ -1,0 +1,1 @@
1 +Notifications
Macro description
... ... @@ -1,1 +1,1 @@
1 -Insert a user mention.
1 +Inserts a user mention.