# Problem with style parameter at the start of a table cell

**URL:** <https://forum.xwiki.org/t/problem-with-style-parameter-at-the-start-of-a-table-cell/9797>\
**Category:** Help / Discuss\
**Created:** [February 2, 2022, 7:19pm UTC](https://forum.xwiki.org/t/problem-with-style-parameter-at-the-start-of-a-table-cell/9797 "2022-02-02T19:19:56Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kido](https://forum.xwiki.org/user_avatar/forum.xwiki.org/kido/32/807_2.png) [@Kido](https://forum.xwiki.org/u/Kido)\
**Post date:** [February 2, 2022, 7:19pm UTC](https://forum.xwiki.org/t/problem-with-style-parameter-at-the-start-of-a-table-cell/9797/1 "2022-02-02T19:19:56Z")

</div>

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

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

gives

![Screenshot 2022-02-02 at 20.13.57](https://forum.xwiki.org/uploads/default/original/2X/b/b530a361503a40ac101d6af487ce90b5ba8cd5ef.png)

instead of

![Screenshot 2022-02-02 at 20.15.23](https://forum.xwiki.org/uploads/default/original/2X/c/cee7a9d7566acc9828b563b07881cc187f81ee76.png)

which I only achieve with

```auto
|{{{}}}(% 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

---

<div class="post-metadata">

**Author:** ![tmortagne](https://forum.xwiki.org/user_avatar/forum.xwiki.org/tmortagne/32/4930_2.png) [@tmortagne](https://forum.xwiki.org/u/tmortagne)\
**Post date:** [February 3, 2022, 9:21am UTC](https://forum.xwiki.org/t/problem-with-style-parameter-at-the-start-of-a-table-cell/9797/2 "2022-02-03T09:21:02Z")

</div>

> [@Kido](#):
>
> I’m not sure whether this is a bug or a feature.

`|(%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:

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

```

---

<div class="post-metadata">

**Author:** ![Kido](https://forum.xwiki.org/user_avatar/forum.xwiki.org/kido/32/807_2.png) [@Kido](https://forum.xwiki.org/u/Kido)\
**Post date:** [February 3, 2022, 9:22am UTC](https://forum.xwiki.org/t/problem-with-style-parameter-at-the-start-of-a-table-cell/9797/3 "2022-02-03T09:22:39Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![tmortagne](https://forum.xwiki.org/user_avatar/forum.xwiki.org/tmortagne/32/4930_2.png) [@tmortagne](https://forum.xwiki.org/u/tmortagne)\
**Post date:** [February 3, 2022, 1:13pm UTC](https://forum.xwiki.org/t/problem-with-style-parameter-at-the-start-of-a-table-cell/9797/4 "2022-02-03T13:13:06Z")

</div>

> [@Kido](#):
>
> Unfortunately the empty format is removed by the CKEditor as well.

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...](https://jira.xwiki.org/browse/XRENDERING).

---

<div class="post-metadata">

**Author:** ![Kido](https://forum.xwiki.org/user_avatar/forum.xwiki.org/kido/32/807_2.png) [@Kido](https://forum.xwiki.org/u/Kido)\
**Post date:** [February 3, 2022, 3:02pm UTC](https://forum.xwiki.org/t/problem-with-style-parameter-at-the-start-of-a-table-cell/9797/5 "2022-02-03T15:02:18Z")

</div>

I’ve created [Loading...](https://jira.xwiki.org/browse/XRENDERING-645)
