Wiki to Html and back

Connect February 19, 2020

The renderedFields for a wiki property (like description) have html that references a css class which is not included in the value.  For example, a simple table in Jira will result in html:

<html><head></head><body><div class="table-wrap">
<table class="confluenceTable"><tbody>

....

Because the confluenceTable class is not surfaced, this html can not be rendered externally without having the style.

When moving from html to wiki, I'm using the DefaultWysiwygConverter class.  However, it doesn't recognize very common tags like <td>.  Also, using the style attribute for example on a span tag is also not recognized:

<span style=\"font-weight:bold;\">

Is there any solution to either of these issues in order to make the html to/from Jira useful externally.

 

1 answer

0 votes
Frank Dase March 27, 2020

you can request issues with the API like this /rest/api/2/issue/YOU-ISSUE-KEY?expand=renderedFields

 

Then you get the fields also in a rendered version. 

Suggest an answer

Log in or Sign up to answer