Jira Text Formatting to HTML - JavaScript Parser Edited

Dear Community, 

 

is anyone there who knows a javascript parser, which parses the jira formatted text to html (e.x. *Hello World* -> <b>Hello World</b>).

 

Thanks a lot! 

Tobi

2 answers

1 accepted

0 votes
Stephen Deutsch Community Champion Jul 11, 2017

Hi Tobias,

the JIRA markup format is similar to the Textile markup format, but with some differences. As far as I know, there is no exact javascript parser for it.

However, there is a REST API call that can be made to the server to parse wiki markup into html. Example:

jQuery.ajax({
    contentType: 'application/json',
    type: 'POST',
    url: '/rest/api/1.0/render',
    data: '{"rendererType":"atlassian-wiki-renderer","unrenderedMarkup":"*Hello World*","issueKey":"SUPPORT-1"}',
    success: function( response ) {
        console.log(response);
    }
});

The issueKey portion of the parameters is not required, so if you are doing something that does not require the context of an issue, it will work without it.

Source: https://community.atlassian.com/t5/JIRA-questions/How-to-render-wiki-markup-in-velocity-for-JIRA/qaq-p/44097#qanda-message-44098

Hey, thanks a lot but i found a solution by myself. 

I needed to add &expand=renderedFields in the URL and everything is fine.

 

@Stephen Deutsch your solution works fine too.

 

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,739 views 11 18
Join discussion

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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot