Consider the following scenario:
procedure TForm1.Button1Click(Sender: TObject);begin with TWpRichText.Create(Self) do begin Parent := Self; Align := AlClient; AsString := '<div>begin 3 enters</div><div></div><div></div><div></div><div>end 3 enter</div>'; AsWebPage := [wpFormatAsWebPage]; end;end;
This will not display the 3 empty paragraphs on the TWpRichText.
It will just output as
Zitatbegin 3 enters
end 3 enters
Now if i remove the AsWebPage := [wpFormatAsWebPage]; i will get an entirely different but still undesired result, but now it will display 6 empty lines.
Zitatbegin 3 enters
end 3 enters
I've tested this with wptools 6.13.1 and with wptools 6.25, both gave the same results.
I have managed to fix the formatting with wpFormatAsWebPage by changing the following code inside function TParagraph.Reformat
if cc = #10 then
begin
....
lastx := 0;
{$IFDEF OBEC}
iHeight := _DefaultHeight;
{$ELSE}
iHeight := 0;
{$ENDIF}
inc(i);
if i = CharCount then break;
Alles anzeigen
The issue without wpFormatAsWebPage is not important to me, so i leave that one up to you to fix.
PS.
I can not be sure my solution is correct until it has had extensive testing. In any case setting the height to 0 does not seem very useful to me. Defaultheight might not be sufficient either though, but it looks to be an improvement anyway.[/code][/quote]