TTMSFNCWXHTMLMemo - Default font size

The default font size is "16", but this value is not available in the font size menu.
Once you have changed the font size, it is difficult to get back to the default size.
Either this size should be added in the selection or the default font size should be e.g. 14.

Tested with a VCL app.

My current workaround is

procedure TFMain.HTMLMemo1Init(Sender: TObject);

Supplementary question:
How to integrate a custom button, e.g. to save the document or some other useful function?

My workaround doesn't seem to be a good idea after all.
After saving the text and reloading the content, an additional "?" (original content was "123") appears.

The error usually occurs only the first time you save.
If I overwrite the content after the 1st save and then save again, the content is fine (except for the extra line breaks)

I have attached my test project, it is the same as for the case TMSFNCWXHTMLMemo - HTML import incorrect

<!DOCTYPE html>
    body {
      font-family: "Segoe UI";
<p><span style="font-size: 14px;">?123</span><br></p>
</html> (90.6 KB)


Thanks for your detailed report and test project.

We added 16 to the list. Furthermore, we also added a new property (CustomFontSizes) that you can use to define your own list of font sizes.

We applied a fix for this.

This is currently not supported. The underlying library has support for custom buttons but those custom buttons will be added after the existing toolbar buttons in a similar style. We can add this to our list to investigate once we can allocate time and resources on it.

Is there any way to change the default font size. 16 seems to be quite large but calling the SetFontSize function on an empty memo doesn't seem to have any effect.


When are you calling SetFontSize? It should work from the OnInit event, that is when the control is initialized and you can interact with it:

procedure TForm1.TMSFNCWXHTMLMemo1Init(Sender: TObject);