For a rich text editor that needs to process pasted HTML from MS Office applications, I am looking for a Java library that clears the contents of all style attributes in HTML elements, so only some CSS attributes are left to right:
- background color
- the border
- Colour
- font family
- font style
- font style
- list-style-type
- text alignment
- text-decoration
- alignment vertical
I can use JTidy to create a well-formed HTML document. To convert HTML elements (removing unnecessary elements) I can use http://htmlparser.sourceforge.net/
Is there anything comparable for CSS attributes?
source
share