The WYSIWYG editor is, theoretically, not supposed to generate content for a specific wiki syntax. Other syntaxes, or future XWiki syntax versions, may support block level content inside list items and table cells. Currently, the only way we can adjust the WYSIWYG editor output to match the source syntax is through a configuration that says which HTML elements are allowed in which context (parent HTML element). We can use this to forbid block level content inside list items and table cells, but this would forbid groups (DIVs) a well. If we allow DIVs (besides inline content) then we allow block level macros as well, which are wrapped in a DIV. Rendering syntax groups have no special marker, so there's no simple way to say "the only block level content allowed is a group". But even if we had this, the fact that groups are allowed doesn't mean they are inserted automatically. This can't be done through configuration. And if we make the WYSIWYG editor do it then it becomes bound to a specific source syntax (we may have issues with other syntaxes).
On the WYSIWYG side, it's not complex to wrap the inserted macro in a DIV (group) in some conditions (e.g. when you are alone inside a table cell or list item) but it doesn't feel right to have this logic inside the WYSIWYG editor.
This message was sent by Atlassian Jira (v9.3.0#930000-sha1:287aeb6)
If image attachments aren't displayed, see this article.