This issue has been created
 
 
XWiki Platform / cid:jira-generated-image-avatar-fb6e51a1-13b5-4979-97c8-f5105f008724 XWIKI-25536 Open

Show the macro name and main parameter in the generic placeholder of the WYSIWYG editor

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-81db11c1-e741-4dcf-9c79-30ee373d28aa Charpentier Lucas created this issue on 23/Oct/26 13:03
 
Summary: Show the macro name and main parameter in the generic placeholder of the WYSIWYG editor
Issue Type: cid:jira-generated-image-avatar-fb6e51a1-13b5-4979-97c8-f5105f008724 Improvement
Affects Versions: 17.10.14, 18.8.0
Assignee: Unassigned
Components: CKEditor
Created: 23/Oct/26 13:03
Priority: cid:jira-generated-image-static-major-e73970dd-bc77-43ff-9def-0d269463c941 Major
Reporter: Charpentier Lucas
Description:

When a macro has no visible output, the WYSIWYG editor shows a generic placeholder made of the macro ID, like "macro:id" or "macro:iconPicker". For macros whose output is invisible by design, such as an anchor or a script that changes other fields of the page, this placeholder is all the user sees, and it does not say what the macro does nor how it is configured.

The fix is done in the macro plugin of the editor, plugin.js, which builds the placeholder from the macro ID only:

  • Show the translated name of the macro instead of its ID, from the macro descriptor.
  • Add the value of its main parameter, for example the first mandatory one, so that two calls of the same macro can be told apart: "Anchor: someid", "Icon Picker: XWiki.TemplateProviderClass_0_icon".

This changes only the editor, so it fixes the macros below without a change in each of them, including the id macro of xwiki-rendering, which cannot depend on an API of the editor.

KOs covered

Macro Criterion Problem
id E1 wysiwyg The editor only shows the generic "macro:id" placeholder for {{id name="someid"/}}, without the anchor name, while view mode shows nothing since an anchor is invisible. The placeholder should say that it is an anchor and give its name, so that the user can find it and link to it.
iconPicker E1 wysiwyg The editor shows only the generic "macro:iconPicker" placeholder, while the macro has no visible output in view mode either: the placeholder does not say that the macro turns input fields of the page into icon pickers, nor which fields.

Impact found on macro fluidity

These 2 KOs come from the WYSIWYG usability audit of the macros, under the criterion E1 wysiwyg of its usability criteria, which accepts a dedicated edit representation that keeps the meaning of the macro. The page of each macro, linked in the table, has the full notes and the steps to reproduce. Fixing them means making the generic placeholder of the editor say which macro it is and how it is configured.