| 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
- Edit a page with the WYSIWYG editor.
- Insert an Info Message macro with a sentence holding a bold word.
- 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.
|