I followed your suggestion but had more problems as before.
The normal import seems nice with simple sites. The result with Wikipedia is more ugly then with TRvHtmlImporter : New line for each new Item that includes rvioSameAsPrev.
Next trouble: There is an Option in Patchwork to append other sites to the same TRichViewEdit (Flag 'Ctrl'). No problem with TRvHtmlImporter because of the property ClearDocument = False. So I need with TRVHTMLViewImporter to import for additionals sites into another TRichViewEdit and append its content to the regular. But:
1. Save and Load RTF works, but with bad formatting
2. Save and Append RVF crashes at the rvConcept.Format (shown below) or, if I use TStream instead, at SaveRVFToStream
Code: Select all
Screen.Cursor := crHourGlass;
if KeyHit(VK_CONTROL) then
begin
rvConcept.AddNL('', 0, 0);
rvConcept.AddNL(cSepar, 0, 0); // '- - - - - - -'
rvConcept.AddNL('', 0, 0);
end
else
rvConcept.Clear;
try
if not Ctrl then
RvHTMLVi.LoadFromClipboard(rvConcept, HTMLViewer1)
else
begin
RvHTMLVi.LoadFromClipboard(rvTemp, HTMLViewer1);
// append
Stream := T(String)Stream.Create('');
try
rvTemp.SaveRVFToStream(Stream, False); // < ---------- c r a s h (TStream)
rvTemp.Format;
Stream.Position := 0;
rvConcept.AppendRVFFromStream(Stream, -1);
rvConcept.Format; // < ---------- c r a s h (TStringStream)
finally
Stream.Free;
end;
end;