Problems with Jira Editor Tables

Hello all,

I’ve some problems retrieving the HTML from wiki fields with tables.

We can retrieve the HTML from a jira field using the expand parameter renderedFields, however, when the field has a table, we don’t have any info about the columns width.

Example:

HTML that Jira Rest API provides:

<div class='table-wrap'>\n<table class='confluenceTable'><tbody>\n<tr>\n<th class='confluenceTh'><b>1</b></th>\n<th class='confluenceTh'><b>2</b></th>\n<th class='confluenceTh'><b>3</b></th>\n</tr>\n<tr>\n<td class='confluenceTd'>&nbsp;</td>\n<td class='confluenceTd'>&nbsp;</td>\n<td class='confluenceTd'>&nbsp;</td>\n</tr>\n<tr>\n<td class='confluenceTd'>&nbsp;</td>\n<td class='confluenceTd'>&nbsp;</td>\n<td class='confluenceTd'>&nbsp;</td>\n</tr>\n</tbody></table>\n</div>\n\n\n<div class='table-wrap'>\n<table class='confluenceTable'><tbody>\n<tr>\n<th class='confluenceTh'><b>3</b></th>\n<th class='confluenceTh'><b>4</b></th>\n<th class='confluenceTh'><b>5</b></th>\n</tr>\n<tr>\n<td class='confluenceTd'>&nbsp;</td>\n<td class='confluenceTd'>&nbsp;</td>\n<td class='confluenceTd'>&nbsp;</td>\n</tr>\n<tr>\n<td class='confluenceTd'>&nbsp;</td>\n<td class='confluenceTd'>&nbsp;</td>\n<td class='confluenceTd'>&nbsp;</td>\n</tr>\n</tbody></table>\n</div>\n

The html for both tables is similar and we don’t have any info about the column width and we can’t reproduce a table similar to the one Jira is showing. Is there any way to know the column width?

Cheers,
Mário Ferreira

Hi @MarioFerreira,

I believe this is a gap in the API. Version 3 of the REST API returns the columns widths, but this is in Atlassian Document Format (ADF) and we don’t provide an adequate spec or libraries to help with the parsing so I don’t think this is a viable alternative for you.

I have created JRACLOUD-76063 to cover this.

Regards,
Dugald

1 Like