Hello,
I can render html in CustomField, setting the wikirender for it.
How can we display html (rendered) in custom web-panel using velocity template from Java variable?
What I've tried so far:
My velocity.vm: (i want "html" variable to be rendered using wiki-markup)
#disable_html_escaping()
#set($componentManagerClass=$constantsManager.getClass().getClassLoader().findClass('com.atlassian.jira.ComponentManager')) #set ($method = $componentManagerClass.getDeclaredMethod('getInstance', null))
#set ($componentManager = $method.invoke(null, null))
#set ($rendererManager = $componentManager.getRendererManager() )
#set ($renderer = $rendererManager.getRendererForType("atlassian-wiki-render"))
#set ($ircontext = $issue.getIssueRenderContext())
#set ($renderedText = $renderer.render($html, $ircontext) )
<span style="font-weight: bold; color: green;">$renderedText</span>
Any help will be appreciated,
Regards.
Discover how Atlassian is revolutionizing service management with cutting-edge solutions for AI-powered support, HR Service Management, or DevOps connectivity.
Register here ⬇️Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.