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

Suggest an answer

Log in or Sign up to answer