Certain fonts cause problems for the TMSFNCWXHTMLMemo.
In the demo program "HTMLMemo Advanced" the result looks correct, when I open it with a standard webbrowser, not all fonts are correct (see picture).
When I open the saved HTML document again in the demo program, the fonts are correct in the demo program, but not in the web browser.
When closing the demo program "HTMLMemo Advanced", it takes several seconds until the program closes.
The demo program "HTMLMemo Standard" closes without noticeable delay.
The ribbon does not look very nice under 4k (150%, 200% tested - see picture (D10.4.2 & D11))
As requested I send two files by email, or also as attachment.
The file "Original_HTMLMemoDemo.html" is a file, which was saved without any changes directly after starting the demo program (different font as result in the web browser).
The file "HTMLMemoDemo.html" is the example mentioned above.
In general, the editor behaves a bit strange, especially when there are still (numeric) bullets involved.
Yesterday I wanted to create a text with numeric bullets and a table. In doing so, I regularly saved the file as an html file and viewed each in the web browser. Well, I did not manage to make the document error free.
So all you need to do is write a text, save it and view the result in the web browser
We have seen the issue when you create a standalone HTML file out of it and we're working on an improvement.
We are working on improvements for the high DPI handling in the FNC ribbon as well.
Could you also find out why the program closes only after several seconds?
When closing the demo program "HTMLMemo Advanced", it takes several seconds until the program closes.
The demo program "HTMLMemo Standard" closes without noticeable delay.
I have also noticed this in connection with the TMSFNCWebBrowser, but I have not been able to find a direct cause (initialization?).
According to the version history, the HTML import function has been improved. I assume that the export function is still being revised. Currently the problem is not fixed yet.
Regarding the delayed exit:
I have tested on four different Dell machines (laptop/PC) and the behavior occurs with all four machines.
The operating system is Win10 Enterprise (20H2) in each case.
Problem slow exit
I found the cause in the sample project "HTMLMemo Advanced" (VCL Version!)
program Demo;
uses
Vcl.Forms,
UDemo in '..\..\Shared Code\Form Unit\HTMLMemo Advanced\UDemo.pas' {Form1},
UBL in '..\..\Shared Code\Business Logic\HTMLMemo Advanced\UBL.pas';
{$R *.res}begin
Application.Initialize;
Application.MainFormOnTaskbar := True;
**Application.CreateForm(TForm1, Form1);**
**Application.CreateForm(TForm1, Form1);**
Application.Run;
end.
.
Is it possible that this property AutoClearCache does not exist in the TTMSFNCWXHTMLMemo
-> Does a FNCHTMLMemo exist at all?
type
TTMSFNCHTMLMemoOpen = class(TTMSFNCHTMLMemo);
procedure TForm1.FormCreate(Sender: TObject);
begin
TTMSFNCHTMLMemoOpen(TMSFNCHTMLMemo1).AutoClearCache := False;
end;
.
.
I don't know if it has a correlation:
Earlier I installed "TMS Web Core" and since then the TTMSFNCWXHTMLMemo is displayed very delayed. Both in the IDE (dragging new TMSFNCWXHTMLMemo onto the form) and after starting the program. (This also happens when I use the TMSFNCWebBrowser component, )
Addendum
.
You can see how it looks from the attachment in post number three (zip file), or in the picture of the first post.
In the answer to the 4th post it was recognized that the output function is faulty - but the input function was corrected ???
We have seen the issue when you create a standalone HTML file out of it and we're working on an improvement.
We are working on improvements for the high DPI handling in the FNC ribbon as well.
We added TTMSFNCWXHTMLMemo.SaveAsHTMLFile, but the demos were not updated accordingly.
What you are seeing as different fonts comes from a behavior in Summernote. It does not automatically apply the default selected font to your output HTML, so when you open the result in your browser, all text that are not formatted will be displayed in a default font available.
TTMSFNCWXHTMLMemo.SaveAsHTMLFile will save the output as a whole HTML page with html, head and body tags included + the default selected font applied as font-family. You'll see the difference if you compare the result of TTMSFNCWXHTMLMemo.SaveAsHTMLFile with TTMSFNCWXHTMLMemo.HTML.SaveToFile.
Ok, I have overlooked/misunderstood this.
What is special is that an HTML component does not output HTML-compliant text by default.
As a "user", I assume this.
With this function it works as it should.
Best thanks for this.
Will there also be a function to write HTML-conform text into a stream?
In relation to databases, this is still important.