Since I wan't to integrate in my Delphi Application a TRichViewEdit, that allows to integrate Hyperlinks like in the Demo "CreateHyperlink" and TextFormating (Bold, Italic, Underline) like in the Demo "Editor 2" I got to the Point where the declaration of constant redefine actions:
How to combine these two demos.
1) All constants used for calls of ApplyStyleConversion must be unique.
Since "Editor 2" already uses constants from 1 to 8:
2) Add these new constants to TForm1.rveStyleConversion (of "Editor 2" demo). I copied code from TForm1.GetNonHypertextStyleNo and TForm1.GetHypertextStyleNo directly in this event:
Thanks a lot, this solves the Issue. But I've encountered two additional things.
1. While exporting with SaveHTML I always get complete HTML-Files. Means I also have a HTML Head and Body Tags. But I only wan't the pure HTML-Code between the BODY-Tags. I wrote a small Routine cropping the rest off, but isn't there a chance to get only the Part converted without HTML around it?
2. When adding a link like in the Example, and exporting it as HTML (see 1.) I have the Links formated Blue and Underlined. I understand that these Formating are neccessary in Editor to display Links, but oi they have to get exported??
To 1: Thanks a lot he solution. Only on thing, while editing you get a font tag (font size="2" face="Microsoft San Serif" into the generated HTML. Sure this is the font used in the Edit, but I don't think that this should be in the final HTML
To 2: Well I think for a proper HTML-Export this shouldn't be in that way
1) You can include rvsoDefault0Style in the Options parameter.
With this option, properties of TextStyles[0], including font size and name, will not be written in HTML. For other text styles, their properties will be written in HTML only if they are different from properties of TextStyles[0].
2) It's arguable. In this way, the output does not depend on the browser settings (links are not necessary blue and underlined by default) and looks like in the editor.