Convert HTML to Jira WikiMarkup

While Atlassian made some workaround ways to convert Jira WikiMarkup to HTML.

There is no way to do the other way around and convert HTML to Jira WikiMarkup.

I saw all over the community, a lot of people looking for a way of doing it.

So i decided to create packages for any environment people asked me:

Nuget package for .Net : https://www.nuget.org/packages/Html2JiraMarkup/

npm package for JS: https://www.npmjs.com/package/html-2-jira-markup

 

Hope it will be useful for many other people.

You are welcome to say thanks or ask for package to another language / framework and i will try to do my best.

 

Thanks :)

18 comments

Anandraj Rajaram November 30, 2021

@Nir Haimov  can you share any libraries for Java. To Convert Html to Jira Markup?

Nir Haimov
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 30, 2021

Hi @Anandraj Rajaram 

I will try to find some free time and create library for Java too.
i will update with link once i'm done

Anandraj Rajaram November 30, 2021

Thanks @Nir Haimov . 

Nir Haimov
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 7, 2022

Hi @Anandraj Rajaram 

Sorry for keeping you waiting for nothing.
Eventually, i will not create a Java library, i tried to, but found myself too long around it, so decided to let it go.
You can however look at the implementation i did in one of the exiting packages, and try to do the same in Java

Anandraj Rajaram January 7, 2022

Thanks, @Nir Haimov . I got this library from Atlassian

<dependency>
<groupId>com.atlassian.renderer</groupId>
<artifactId>atlassian-renderer</artifactId>
<version>8.0.5</version>
</dependency>

 and temporarily solved with the below method

convertXHtmlToWikiMarkup

but just got few minor issues like the above method is not converting <BIG> html tags

Andrew Hines (!) January 7, 2022

Hi Nir - This is great. I'm looking for exactly this - but in PowerShell (!)

Is that easy to provide ? If so would you be kind enough ??

Thanks ;) Andy

Nir Haimov
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 8, 2022

Hi @Andrew Hines (!) 

Sorry, but i'm not familiar with PowerShell

siddhesh pawar February 9, 2022

Hi @Anandraj Rajaram ,

can you please guide me how you resolved this issue?

where you added the library?

<dependency>
<groupId>com.atlassian.renderer</groupId>
<artifactId>atlassian-renderer</artifactId>
<version>8.0.5</version>
</dependency>

and where and how you used below method? 

convertXHtmlToWikiMarkup
Fabio Silva March 10, 2022

Hello, @Nir Haimov  In one of your answers in this thread you said  "You can however look at the implementation i did in one of the exiting packages, and try to do the same in Java".

Is this open source? If yes, can you provide repository links? I am interested in C# sources.

Thank you

Nir Haimov
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 10, 2022

Hi @Fabio Silva 

This is not exactly an open-source.
What I meant is, if you use one of my packages you can view the package content with your IDE (like visual studio)

Anyway, I made a package for C# https://www.nuget.org/packages/Html2JiraMarkup/

RS May 9, 2022

Hi @Nir Haimov ,
If we have table tags in html string its not getting recognised in jira, its just printing table as is. Any known bug ?

Michael.Leibovitch2 August 19, 2022

Hi @Nir Haimov 

I tried to use Html2JiraMarkup on C# and the return value was the same as the HTML original value.

Am I missing something?

 

Thanks,

Michael.

Nir Haimov
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 20, 2022

Hi @Michael.Leibovitch2 

Please share the HTML string you are trying to convert and your code where you tried to use it

Suzanna Bryon October 6, 2022

@Nir Haimov I used Html2JiraMarkup, but it didn't convert fully. Is that how it is designed to work?

 

image.png

Nir Haimov
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 8, 2022

Hi @Suzanna Bryon 

Yes, It might not fully convert exactly as expected

Like # people like this
shrikant maheshwari March 7, 2023

@Nir Haimov 

Hi Nir,

Is there any package available for NODE JS ?

Manoj Channa March 9, 2023

https://www.npmjs.com/package/html-2-jira-markup JS package did not do a good job for converting HTMLs. So did not use in our case. 

Like cmilner likes this
Eruvavenkata Lingareddy --CNTR
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 9, 2024

Hi Nir Haimov

Good day.

I also have a same requirement, Is there any JavaScript library to convert html tags into Jira Wiki Markup language to use it in my SAPUI application ?  

Regards, Venkat.

Comment

Log in or Sign up to comment
TAGS
AUG Leaders

Atlassian Community Events