using rest api to update table in a page, background color cell does not work anymore

Deleted user April 1, 2020


I was able to change background color of TD of a table in legacy pages, but not in new pages (the new style), it seems confluence strips the style of a TD when after I submit it through rest api 


any help?



1 answer

0 votes
Daniam Ali Castellanos T_ July 7, 2021

We're on the same page here.

I read somewhere about that you need to iterate throughout the HTML of it, and make changes there.

<p>Testing page</p><table class=\"wrapped\"> <colgroup> <col /><col /><col /></colgroup> <tbody> <tr> <th>Header 1</th> <th>Header 2</th> <th>Header 3</th> </tr> <tr><td class=\"highlight-grey\" data-highlight-colour=\"grey\"> <span style=\"color: rgb(255,255,255);\"> Row 1A </span></td> <td class=\"highlight-red\" data-highlight-colour=\"red\">Row 1B</td><td class=\"highlight-green\" data-highlight-colour=\"green\">Row 1C</td></tr> </tbody></table> <p class=\"auto-cursor-target\"> <br /></p>


But still haven't got there, if you manage to do something about it, let me know, maybe together we can achieve something.

Duane Kuroda March 20, 2024

I have tried to modify my HTML to only one style change

style=\"background-color: yellow;\"

using that same style on 3 cells to see if it worked. It did not. Note: before I sent my HTML to confluence, I also saved locally, and my local file renders properly, applying the style. The view-source on the confluence page does not show any styling code.

I'm curious what others have done to get formatted tables. Anyone?

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events