List of docx4j supported XHTML tags
-
02-07-2021 - |
Pregunta
Is there a list to show what XHTML tags and CSS attributes are supported by docx4j XHTML importer?
Thanks.
Solución
*Disclosure: I wrote the docx4j code in question *
There is no definitive list. However, there is support for at least:
- p, div, li
- table
- h1 to h3
- table
- img
- span
- a
- br
There is no support for font color right now, nor u (underline).
Support is a 2 phase affair:
Flying Saucer (XHTMLRenderer) needs to support it
FS supports pretty much all of CSS 2.1; see What_XHTML CSS_features_does_Flying_Saucer_currently_support
docx4j needs to convert the relevant Flying Saucer construct to WordML
If in doubt, just try it on the XHTML of interest to you.
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow