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: 

Strip unwanted wiki markup from description field for using the content in a scripted field

JPfeiffer
June 17, 2020

Hi,
I try to strip unwanted wiki markup from my description field to use the raw text content in a scripted field.

This is the function:

public String renderToPlainText(Issue issue, Logger log = null) {
JiraRendererPlugin renderer =     ComponentAccessor.getRendererManager().getRendererForType("atlassian-wiki-renderer")
return renderer.render(issue.getDescription(), issue.getIssueRenderContext())
}

I found only a way to show the wiki markup as text in the scripted field but not to strip it totally:

public String renderAsText(String s,
IssueRenderContext issuerendercontext) {
return s;
}

Does anyone know a solution for this problem?

0 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.