TrvHtmlImporter does not support CSS in HTML (except for a very limited set of CSS attributes).
For HTML containing CSS formatting, use TrvHtmlViewImporter instead. However, it is available only for VCL version of TRichView.
TrvHtmlViewImporter requires a free third-party component THTMLViewer https://github.com/BerndGabriel/HtmlViewer.
Plans for future:
I do not plan to improve THtmlImporter. Instead, I plan to implement TRichView.LoadHtml method from scratch. I plan to implement it in this year, but I cannot guarantee it.
Greetings Sergey,
Ah thank you so much for the information.
I understand there is so much in html to look into and a native would be better.
I personally have gone and duplicated HtmlImporter and modified it a lot to support our needs for special import. (It also has a regex engine so we can change tags on the fly before hand.)
Thank you again for your excellent help. I'll look into the other code. Thanks again.
Greetings Sergey,
I added a bit to rvHtmlViewImport (I think you said though it will no longer be supported, correct?)
If it is easy to add perhaps update this:
{------------------------------------------------------------------------------}
function TRVHTMLViewImporter.AppendFromFile(const FileName: TRVUnicodeString;
RV: TCustomRichView): Boolean;
begin
Result := HTMLViewer <> nil;
if not Result then
exit;
try
HTMLViewer.LoadFromFile(FileName);
AppendHtmlViewer(HTMLViewer, RV, ExtractFilePath(FileName));
except
Result := False;
end;
end;
This makes it possible to Append or could change it to fix Insert well sort of. Just a quick idea.