Format jira markup to HTML and vice versa, C#, Atlassian.SDK

I am using C#, Visual studio 2019 and the nuget package “Atlassian.SDK” v 12.4.0.
Everything is working fine, creating Issues, editing Issues, creating subtasks etc. The only thing i cannot workout, is how to format HTML to Jira markup. Its primarily the HTML tables creating the issues.

The “Issue” description field and Comments field, both use Jira markup.
Do I have top write the converter myself, or is there some solution I am missing?

Any help would be very much appreciated.


I did a bit of Googling and you might find some useful utilities inside DotNetWikiBot. I can’t vouch for it from my own use though.

What jumped out about this post is the use of wiki markup. Under the hood, the Atlassian.SDK is using the older v2 REST APIs. These APIs still use wiki markup in Jira text fields, while the newer v3 APIs use Atlassian Document Format (ADF). ADF is a JSON-based representation of rich text stored in Atlassian products (not just Jira anymore). Although I’m not aware of any C# libraries for ADF, the specific case of mapping tables from HTML to ADF would be easier because the node mappings are 1:1.

I only point this out because the implicit binding to the older APIs might limit the lifespan of your converter, if you do have to write it yourself.

We tried to use the ADF format in our client side to format the Wiki Syntax for the user. It was a bit complicated to use and at first we though that we managed to get it working. That was until some of our testers tried to use attachments / user mention and stuff like that.
Our current approach is to use the expand=renderedFields approach to render existing comments/descriptions (+ using regex to replace some urls to absolute urls as the relative urls would not work in our plugin domain)

If there is a better way, I would love to know it too

1 Like

@m.herrmann maybe try npm and instantiate ADF editor in the client side. (It’s pitty it has no doc).