How to convert html to Atlassian markup in java app Edited

Hi Guys!

I have to implement parser (Java witchout atlassian SDK) which allow me to change my xml to csv to import issues. BUT i have to change description and comment in html to Atlassian wiki format. i found this:


So i add new dependency to my app:


But now i got this error:

Exception in thread "main" java.lang.NoClassDefFoundError: com/opensymphony/util/TextUtils
at com.atlassian.renderer.wysiwyg.converter.DefaultWysiwygConverter ...

Should i add some additional dependencies? 


1 answer

I'm not 100% sure how you're using the renderer, but I was able to convert HTML to MarkUp with the following relevant pom sections.

The snippets are below and working on github.

<!-- This exclusion is necessary if you are in a
situation which
it conflicts, EG: using spring-boot -->
<!-- -->

Does it support the conversion of inline style which embedded in html to the wiki format ?

like if there is html with css for italic text is like as below

    <div><span style="font-style:italic;">Test Italic</span></div>

will the confluence convert above html in the wiki italic style?

This kind of question is best just something you try yourself to find out. I wouldn't know off handedly, since I'm just consuming their library not actually writing it.

 It doesn't look like their library supports inline styles, but it does support the <i /> tag. You can see it demonstrated here:

You might have to do some data-transformations if you're consuming HTML from another resource.

Like 1 person likes this

Useful stuff! Thanks @Paul Baker for sharing this

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Feb 13, 2019 in Jira

Make your Atlassian Cloud products more secure: our NEW admin security guide

Hey admins! I’m Dave, Principal Product Manager here at Atlassian working on our cloud platform and security products. Cloud security is a moving target. As you adopt more products, employees consta...

742 views 0 12
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you