Skip to content

DocxReportingJavaMainTextStyling

Benjamin JALON edited this page Jul 1, 2019 · 5 revisions

Text styling

Since XDocReport 0.9.3 provides text styling feature. You can see demo at http://xdocreport.opensagres.cloudbees.net/textStyling.jsp?reportId=docx

What is text styling?

XDocReport can replace a mergefield from docx report:

  • by a value coming from Java context:
context.put("comments", "Text coming from Java context.");
  • to generate this report :

Since XDocReport 0.9.3, XDocReport provides the capability to style the text of the Java context with some syntax (HTML, Wiki, etc). For instance, you can set text as italic and bold with HTML syntax like this :

context.put("comments", "<p><i>Text</i> coming from <b>Java context</b>.</p>");

and generate this report :

.

Text styling syntax

Text Styling uses a syntax to style the text from the Java context. XDocReport provides several syntax like :

But it's possible to implement your own syntax if you wish: you can look how Markdown syntax has been integrated.

Clone this wiki locally