The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How does $wikiStyleRenderer.convertWikiToXHtml work?"

Fred Hauschel
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
March 7, 2013

I used this in my velocity html mail template:

$wikiStyleRenderer.convertWikiToXHtml($renderContext, $issue.getDescription());

But the output is:
$wikiStyleRenderer.convertWikiToXHtml($renderContext, $issue.getDescription());
instead of my formatted description. What's wrong?

Thanks Fredy

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

1 vote
Answer accepted
ConradR
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
March 7, 2013

That happens because $wikiStyleRenderer is not available in your context. You should take a look at rendererManager:

https://developer.atlassian.com/display/JIRADEV/Velocity+Context+for+Email+Templates

Fred Hauschel
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
March 12, 2013

Great thanks!

It's absolutely right, I was on the confluence help instead of jira ;-o. And in the confluence context it is ;-)

Fred Hauschel
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
March 12, 2013

My Solution is:

#if ( $rendererManager.getRenderedContent("atlassian-wiki-renderer", $issue.getDescription(), $issue.getIssueRenderContext()) )
$rendererManager.getRenderedContent("atlassian-wiki-renderer", $issue.getDescription(), $issue.getIssueRenderContext())
#else
description is missing...
#end