I’ve just installed an instance of wiki 17.1.0 using a docker compose file on TrueNAS Scale 24.10.2
I am testing some of the formatting and it seems that the box macro has a mind of it’s own.
Using either the macro, or typing the source directly looks fine.
{{box}}
Test
Test
Test
{{/box}}
But after I save it, the formatting gets messed up, when I check the source again it’s done this:
{{box}}Test
Test
Test{{/box}}
And that causes the effect you can see on this page:
I keep fixing it, and it keeps reverting to:
{{box}}FileMaker 2024 Server (v21) for [[macOS 13,14, & 15>>https://downloads.claris.com/esd/fms_21.1.1.40.dmg]]
FileMaker 2023 Server (v20) for [[macOS 12, 13, & 14>>https://downloads.claris.com/esd/fms_20.3.2.205.dmg]]
FileMaker Server (v19) for [[macOS (older versions)>>https://downloads.claris.com/esd/fms_19.6.4.402.dmg]]{{/box}}
{{box}}FileMaker 2024 (v21) for [[macOS 13, 14, & 15>>https://downloads.claris.com/esd/fmp_21.1.1.41.dmg]]
FileMaker 2024 (v21) for [[Windows>>https://downloads.claris.com/esd/fmp_21.1.1.41_x64.exe]]{{/box}}
{{box}}FileMaker 2023 (v20) for [[macOS 12, 13, & 14>>https://downloads.claris.com/esd/fmp_20.3.2.201.dmg]]
FileMaker 2023 (v20) for [[Windows>>https://downloads.claris.com/esd/fmp_20.3.2.201_x64.exe]]{{/box}}
{{box}}FileMaker v19 [[macOS (older versions)>>https://downloads.claris.com/esd/fmp_19.6.3.302.dmg]]
FileMaker v19 [[Windows>>https://downloads.claris.com/esd/fmp_19.6.3.302_x64.exe]]{{/box}}
The key here is to do some formatting and to leave one empty line before and after each box macro usage. The following written in wiki mode/source will produce a nice result:
{{box}}
FileMaker 2024 Server (v21) for [[macOS 13,14, & 15>>https://downloads.claris.com/esd/fms_21.1.1.40.dmg]]
FileMaker 2023 Server (v20) for [[macOS 12, 13, & 14>>https://downloads.claris.com/esd/fms_20.3.2.205.dmg]]
FileMaker Server (v19) for [[macOS (older versions)>>https://downloads.claris.com/esd/fms_19.6.4.402.dmg]]
{{/box}}
{{box}}
FileMaker 2024 (v21) for [[macOS 13, 14, & 15>>https://downloads.claris.com/esd/fmp_21.1.1.41.dmg]]
FileMaker 2024 (v21) for [[Windows>>https://downloads.claris.com/esd/fmp_21.1.1.41_x64.exe]]
{{/box}}
{{box}}
FileMaker 2023 (v20) for [[macOS 12, 13, & 14>>https://downloads.claris.com/esd/fmp_20.3.2.201.dmg]]
FileMaker 2023 (v20) for [[Windows>>https://downloads.claris.com/esd/fmp_20.3.2.201_x64.exe]]
{{/box}}
That seems like a bug, why would it reflow the source text just because of missing white space? I mean, glad it works but 1. it should probably auto format the needed whitespace, and 2. the boxes on this page need to be part of a 2nd level unnumbered list which it appears we can’t do and keep the box formatting.
The problem is that the main 4 points on the page are a numbered list and if the boxes can’t be a subset then it breaks the numbering of the bottom 2 points.
While it may look like a bug, this is the actual behavior and it is like that because there are 2 types of macros in XWiki: inline and standalone.
For examplle, the mentions macro is an inline macro that can be used anywhere in the content.
On the other side, the standalone macros include formatting macros, like the box macro which is not expected to be used inline, in a paragraph or as part of a list item.
In order to make this difference more explicit, this topic was recently created to help avoiding any confusion.
Additionally, I was not able to reproduce the issue on XWiki 17.1.0 with your first test example. I edited a page in the wiki content and placed the macro without adding lines but I didn’t get any formatting mess, only the display was improper, but expected as the macro was inline and not standalone (separated from the rest of content).
I cannot reproduce this. If I paste the following in inplace editing, source mode:
{{box}}
Test
Test
Test
{{/box}}
and then save, I still get the same content. You’ll need to explain in more details how to reproduce. Thx
PS: note that if you enter:
{{box}}Test
Test
Test{{/box}}
And then switch back to wysiwyg mode and save, it’ll be normalized to the following (but that’s “normal” since we have to convert from HTML to xwiki syntax and there’s a normalized syntax):
Sorry for the confusion. The example with the word test in it isn’t having the actual issue, I was just using that to show what was happening without all the extraneous text.
I read the topic you posted, but as I’m a brand new user most of that was above my head.
So bottom line, I can’t use boxes anywhere except in their own paragraphs, right?
Is there another formatting option that works similarly to box that can be used inline?