Jira macro get rendered html of description field

Almost, I saw that the description field from Jira issues is already retrieved in HTML, hence I guess that I need to send it to the HTML macro before returning from the method code.

Copying from the examples in the extension page, I got that:

xcontext.method.output.value = [new WordBlock(text)]

renders like this:

immagine

But

xcontext.method.output.value = [new MacroBlock("xwiki-rendering-syntax-html5", [:], "<div>Hello!</div>", true)]

Renders to nothing (I see an empty string) - I actually do not recall from where I got that string…

immagine

I tried “html” too:

xcontext.method.output.value = [new MacroBlock("html", [:], text, true)]

But again that renders to nothing.