Dear Community,
I am new to XWiki and trying to understand how macro positioning works. I understand that there are standalone and inline macros. Obviously, macros can only be used inline when their output is suitable for it.
However, I am struggling to use very simple macros inline with other content when adding them to a document in the WYSIWYG editor.
Example:
I have a simple macro that uses the HTML macro to output a :
{{velocity}}
{{html}}
<span style="background-color: gold">Label</span>
{{/html}}
{{/velocity}}
Inline Support for the macro is enabled.
When I add the macro via UI in the WYSIWYG editor, it is placed in the document as a standalone macro. It fills the whole line, because the engine will add a <p>
element when rendering the macro content. I couldn’t find a way to position the macro inline with some text.
Now, when I switch to XWiki editor, and just add some text next to the macro, it works just fine inline with the text. When switching back to WYSIWYG I can now handle the macro as inline, I can move it, type next to it and so on. The additional <p>
is not inserted. It looks like the macro has “switched” its mode from standalone to inline.
I would like use the macro in inline mode immediately after inserting it in WYSIWYG editor. Is there some option to toggle between inline and standalone mode? I could not find any information about this, but I assume this must have a very simple solution and I am overlooking something here.
PS: I am using XWiki 17.4.1.