Problem with style parameter at the start of a table cell

Applying a style parameter to the first word of a table cell effects the whole cell:

|(% style="background-color:red" %)Some(%%) text|first line
second line

gives

Screenshot 2022-02-02 at 20.13.57

instead of

Screenshot 2022-02-02 at 20.15.23

which I only achieve with

|{{{}}}(% style="background-color:red" %)Some(%%) text|first line
second line

Since parameters that should apply to a cell are specified at the start of the cell, I’m not sure whether this is a bug or a feature. Anyway: Is there a better way to handle it? The empty verbatim block is not a good solution since it is removed by the CKEditor.

Server: Windows 10, JDK 11.0.12, Tomcat 8.5.72, XWiki 13.10.2
Client: Windows 10, Chrome

Thanks

Guido

|(%param=value%) is the standard syntax to set cell parameters (and in this context (%%) is actually the beginning of a new format without any parameter), so from this point of view it’s a feature.

Now on how to cover your use case, basically what you need is to “break” the cell parameter syntax (which is essentially what you did). I guess the cleanest way to do that would be to give the cell its own parameters before starting the red one, so something like:

|(%%)(% style="background-color:red" %)Some(%%) text|first line
second line

Unfortunately the empty format is removed by the CKEditor as well. So I would need to specify some ineffective format. Possible, but quite ugly…

Ha indeed it’s possible, in this case this become a xwiki syntax renderer bug (since it should find a way to keep what it’s told to serialize). Would be great if you could create an issue on Loading....

I’ve created Loading...

1 Like