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.
Validate your expertise in managing Jira Service Projects for Cloud. Master configuration, optimize workflows, and manage users seamlessly. Earn global 🗺️ recognition and advance your career as a trusted Jira Service management expert.
Get Certified! ✍️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.