Do all this in ABAP
1) Convert html to xstring
data(lv_len) = strlen( lv_html ).
data(lr_conv) = cl_abap_conv_out_ce=>create( ).
lr_conv->write( data = lv_html n = lv_len ).
lv_xstr = lr_conv->get_buffer( ).
2) XFA doesn't support most of the HTML tags so do the XSLT transformation
call transformation zhtml_xslt
source xml lv_xstr
result xml lv_xstr.
3) Encode xstring to base64
constants: lc_op_enc type x value 36.
data: lv_base64 type string.
call 'ssf_abap_service'
id 'OPCODE' field lc_op_enc
id 'BINDATA' field lv_xstr
id 'B64DATA' field lv_base64.
4) Example XSLT http://scn.sap.com/community/crm/webclient-ui-framework/blog/2014/01/14/converting-html-to-xhtml-using-clhtmltidy
Do all this is Adobe Form javascript
1) Create a global variable "Base64" and paste the script from below link
http://www.webtoolkit.info/javascript-base64.html
2) Write below code in the field's javascript to decode base64
var b64 = this.rawValue;
var xhtml = base64.Base64.decode(b64);
this.value.exData.loadXML(xhtml);
3) Make sure the script is set to Run At Server, if it's an interactive form
4) Make sure the field is rich text enabled