cancel
Showing results for 
Search instead for 
Did you mean: 

How to use html in a richtext field to display formatted text

0 Kudos

When pass a html format string to adobe form(generated in ABAP by calling founction moudle), the result is that the text field shows the literal string not the text formatted.

I've configued the richtext correctly(field type="Text Field", field format="Rich Text" and data format set to "XHTML").

Here is an example:

*CALL FUNCTION 'FP_JOB_OPEN' "#EC **

CHANGING

ie_outputparams = lv_outputparams .....

CALL FUNCTION lv_funcname

EXPORTING

/1bcdwb/docparams = fp_docparams

text = '<body xmlns="http://www.w3.org/1999/xhtml" xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/"><p>Happy world!</p></body>' .....

I've used the following in the initialize event of the rich text field

b64 = this.rawValue;

xhtml = base64.Base64.decode(b64);

this.value.exData.loadXML(xhtml);

the final result displayed in the form is <body xmlns="http://www.w3.org/1999/xhtml" xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/"><p>Happy world!</p></body>

not Happy world!

Thanks and Best Regards,

Miller Miao

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

The rich text element should't be binded to the attribute of the context, otherwise, no data will be showed in the field.

Edited by: Miller Miao on May 19, 2011 10:15 AM