ExtJS 4 HTMLEditor - Set value with style tags

RobertTA

New Member
I'm getting content of .doc file with Java; it gives me separated styled HTML, has style classes defined above the body. ExtJS 4 has HTML editor but when I set this HTML to this editor, it gives me plain text and shows style definitions too. I need to import this .doc file's content into HTML editor with proper styles. As an information, converted HTML has right syntax, when I create a sample .html file to test it everything is ok.Here's a converted HTML that I got from .doc file:\[code\]<html> <head> <META http-equiv="Content-Type" content="text/html; charset=UTF-8"> <style type="text/css"> .b1 { white-space-collapsing:preserve; } .b2 { margin: 1.1798611in 1.1798611in 1.1798611in 1.1798611in; } .s1 { font-weight:bold; color:black; } .s2 { color:black; } .s3 { font-style:italic; color:black; } .p1 { text-align:center; hyphenate:none; font-family:Times New Roman; font-size:12pt; } .p2 { text-align:justify; hyphenate:none; font-family:Times New Roman; font-size:12pt; } .p3 { text-align:end; hyphenate:none; font-family:Times New Roman; font-size:12pt; } </style> <meta content="talha " name="author"> </head> <body class="b1 b2"> <p class="p1"><span class="s1">Letter</span> </p> <p class="p2"></p> <p class="p2"><span class="s2">Paragraph</span> </p> <p class="p2"></p> <p class="p2"><span class="s2">Sample </span> </p> <p class="p2"></p> <p class="p2"><span class="s2">Third One</span> </p> <p class="p2"></p> <p class="p2"></p> <p class="p3"><span class="s2">Regards</span> </p> <p class="p3"><span class="s2">blablbla</span> </p> </body></html>\[/code\]
 
Back
Top