Details
-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
15.5-rc-1
-
None
-
Unknown
-
Description
Steps to reproduce
- Edit a page with the WYSIWYG editor.
- Type /box and pick Box in the Quick Actions.
- Save, and look at the page source.
Expected result
{{box}}{{/box}}, as when the box macro is inserted from the Insert Macro dialog with an empty content: the box is rendered empty and the user can type in it.
Actual result
{{box/}}: the macro is inserted with no content at all. The box macro renders nothing for a missing content, so the user gets no box to type in, and the same macro is saved differently depending on how it was inserted.
This applies to every macro that supports a content and has no mandatory field, inserted from the generic macro Quick Actions. The xwiki-macro-maybe-install-insert command of plugin.js inserts the macro without a content, while the Insert Macro dialog includes an empty content on purpose, see macroEditor.js: "we want to generate {{macro}}{{/macro}} instead of {{macro/}} when the macro supports content".
The fix would be to insert the macro with an empty content when its descriptor declares one.
Found while discussing XRENDERING-827 on the forum.
Attachments
Issue Links
- relates to
-
XRENDERING-827 The box and message macros give no box when inserted with no content
-
- Open
-
-
XWIKI-25563 Insert the wrapper macros from Quick Actions without the Edit Macro dialog when the content is their only mandatory field
-
- Open
-
-
XWIKI-19982 Add ability to add a macro by using the keyboard
-
- Closed
-