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 Leaders.
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

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 Leaders.
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 Leaders.
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 Leaders.
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

Suggest an answer

Log in or Sign up to answer