Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.

Table with Rich Text

Avatar

Former Community Member

Hi,

I have a table with data in XHTML format. I set the table row to "Rich Text" and "XHTML" format. But its not printing in the rich format. Its just diplaying the row value as is.

I created another single text field (set to Rich Text and XHTML) and assigned the same row value. Its displaying in the correct format with all the formatting.

Does Table doesnt support XHTML format?

Thanks

Ravikanth

5 Replies

Avatar

Former Community Member

How are you assigning the rich text to the field ...are you simply setting the rawValue property?

Paul

Avatar

Former Community Member

Hi Paul,

Its through binding. The source table is from SAP, the data is in XHTML format. If I take the same data and bind it to a normal text field (with Rich Text, XHTML format set) it displays the data in Rich Text format (will all bold, colors, bullets etc)

Charli.

Avatar

Former Community Member

Is it a web service call (execute bindings)  to get the data or is it import/export bindings?

Paul

Avatar

Former Community Member

Hi Paul,

Its not an Import/Export binding. I think SAP uses Adobe Document Services to pass on the data to the form.

Charli

Avatar

Former Community Member

Hi Paul,

The issue is resolved. We did the following in the initialize event of the table row

var envel = '<?xml version="1.0" encoding="UTF-8"?><exData contentType="text/html" xmlns="http://www.xfa.org/schema/xfa-template/2.8/"><body xmlns="http://www.w3.org/1999/xhtml" xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/" xfa:APIVersion="Acroform:2.7.0.0" xfa:spec="2.1"><p>PLACEHOLDER</p></body></exData>';

var htmldata = xfa.resolveNode("xfa.form.data.DEVELOP_PLAN_MAIN.Table5.Row1.TEXT").rawValue;

// insert into envelope
var newStr = envel.replace("PLACEHOLDER",htmldata);

// load into current element
this.value.exData.loadXML(newStr, 1, 1);

Its now printing rich text.

Thanks for the help

Charli