trichview.com

trichview.support




SaveHTMLToStream: Problem with font color


Return to index


Author

Message

Christian Kirchhoff

Posted: 04/15/2004 16:11:30


Hello,


I am using TRichEdit to enable the user to WYSIWYG edit text that is alter

exported to HTML and the pasted in a HTML template.

Under certain circumstances I don't want the text color information to be

in thre HTML code, so the text inserted in the HTML template will have the

color of the surrounding text.

What I do in that case is to first Select the whole text in the TRichView

and assign the font color "clNone" to it. Then I save the text as HTML to

a stream and insert it in the HTML code.

But there is still always a surrounding font tag setting the font to black.

Is this the definition of style 0 that is always included. Because the next

inner surrounding font tag has exactly the format definition that I applied

to the text. But there is another problem. The color "clNone" resulst in

the HTML code <font ...color= ....> The name"color" is there, but the value

of it is empty. If this name/value pair is the last one in the font tag,

it is ok. But if there is something coming after it, like <FONT size=4 color=

face="Times New Roman">, then the Browser seems to interprete the following

"face=..." as the color avlue and renders the text red.


is there a way to correct this?


Regards,


Christian Kirchhoff





Powered by ABC Amber Outlook Express Converter