Hello SAP Community,
I am attempting to dynamically append Rich Text to text fields in an Adobe Interactive Form. This includes, lists such as bullets and numbering, as well as headings.
I have attempted several different methods in making this occur, but I have had little success.
The closest method to success is to convert HTML to ExData using the Javascript code provided below.
HTML to ExData//XML String to wrap the HTML
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>';
//Current HTML Data
var htmldata = this.rawValue;
// insert into envelope
var newStr = envel.replace("PLACEHOLDER",htmldata);
//Load the final XML
this.value.exData.loadXML(newStr, 1, 1);
As a further note, Conversion must occur if exporting from an SAP WebDynPro.
Notes:
Any Help would be greatly appreciated, I will reply back with any information that may help.
Thanks,
Matt Fleming