StimVinsh / xdocreport

Automatically exported from code.google.com/p/xdocreport
0 stars 0 forks source link

Use template engine directive in the HTML, Wiki, text styling (ex:<h1>${title1</h1>) #74

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
XDocReport start supporting text styling to replace mergefield, input-fields 
with styled value (HTML, Wiki, ...) coming from Java context.

--------------------------------------------------------
IXDocReport report = ...

FieldsMetadata metadata = report.createFieldsMetadata();
metadata.addFieldAsTextStyling("html", SyntaxKind.Html);

context.put("html", "<strong>XDocReport</strong>");
--------------------------------------------------------

It seems usefull to set template engine directive in the HTML like this : 

--------------------------------------------------------
IXDocReport report = ...

FieldsMetadata metadata = report.createFieldsMetadata();
metadata.addFieldAsTextStyling("html", SyntaxKind.Html, true);

context.put("name", "XDocReport");
context.put("html", "<strong>${name}</strong>");
--------------------------------------------------------

The true parameter tell to XDocReport that "<strong>${name}</strong>" must be 
proceesed by the template engine to get "<strong>XDocReport</strong>" before 
the text styling processing : 

--------------------------------------------------------
metadata.addFieldAsTextStyling("html", SyntaxKind.Html, true);
--------------------------------------------------------

XDocReport 0.9.5 will support this feature.

Original issue reported on code.google.com by angelo.z...@gmail.com on 7 Feb 2012 at 4:46

GoogleCodeExporter commented 8 years ago
Done.

Original comment by angelo.z...@gmail.com on 22 Feb 2012 at 3:20