This issue has been created
 
 
XWiki Platform / cid:jira-generated-image-avatar-6dc35b46-04d9-4171-aeda-f7d004a74205 XWIKI-25443 Open

The Edit Macro dialog edits a rich text macro content as wiki syntax

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-7d3297b6-9c87-4ee5-93f0-1a3d2a9b6d2b Charpentier Lucas created this issue on 21/Oct/26 17:50
 
Summary: The Edit Macro dialog edits a rich text macro content as wiki syntax
Issue Type: cid:jira-generated-image-avatar-6dc35b46-04d9-4171-aeda-f7d004a74205 Improvement
Affects Versions: 17.10.14, 18.8.0
Assignee: Unassigned
Components: CKEditor
Created: 21/Oct/26 17:50
Priority: cid:jira-generated-image-static-major-ecd509e1-db80-467f-97f7-4e7411326e7f Major
Reporter: Charpentier Lucas
Description:

When the content of a macro is rich text, the Edit Macro dialog shows it in a plain text area of wiki syntax. A user who edits the page in the WYSIWYG editor then has to read and write markup: a nested macro, a link, a list or bold text shows as wiki syntax, and the formatting toolbar is not available. The same content is edited as rich text when it is edited in place, so the user sees it edited two different ways.

This text area is also the only way to edit the content of a macro called inline, in a sentence, a list item or a table cell, since its content cannot be edited in place, see XWIKI-19954, XWIKI-17417 and XWIKI-23309.

Steps to reproduce

  1. Edit a page with the WYSIWYG editor.
  2. Insert an Info Message macro with a sentence holding a bold word.
  3. Open the Edit Macro dialog of the same box.

Expected

The Content field is a rich text editor showing the sentence with the bold word, with the formatting tools of the WYSIWYG editor.

Actual

The Content field is a text area holding This is **bold**.

The WYSIWYG usability audit of the macros found this on every macro whose content is rich text, among them box, info, warning, success, error, example, figure, figureCaption, menu and content.

Notes

  • The text area is hard-coded: MacroDescriptorUIFactory uses the same <textarea name="$content"> edit template for every content, whatever the type declared by its content descriptor, while the parameters get the edit template of the HTML displayer of their type. XWIKI-23059 asks for the content to use a displayer too. This issue needs a displayer for the rich text type, java.util.List<org.xwiki.rendering.block.Block>, that loads a WYSIWYG editor.
  • When the content is also edited in place, the dialog shows it a second time. The dialog can already hide the parameters edited in place, when xwiki-macro.showInlineEditableParameters is false, but the CKEditor configuration sets it to true by default since XWIKI-23043. Whether to show the content in the dialog in that case should be decided with XWIKI-23035, which asks for it on the Async macro.