TAdvRichEditor MiniHTMLIO font changes

I have a TAdvRichEditor along with a AdvRichEditorMiniHTMLIO.  When initially typing text into an empty editor, it is Arial 10pt.  It is then saved to a database as this:

<FONT color="#000000">this&nbsp;initially&nbsp;is&nbsp;arial&nbsp;10</FONT>

When it is reloaded into the editor it is now Tahoma 8pt.  Why did it change?

I use this to load the editor:

Delphi 10.3.3
AdvRichEditorMiniHTMLIO from the TMS VCL UI Pack

I cannot reproduce this here.

Test code:

procedure TForm3.Button3Click(Sender: TObject);
  memo1.Lines.Text :=   AdvRichEditorMiniHTMLIO1.AsString;

results in:

<HTML><BODY style='font-family:"Arial";font-style:normal;font-weight:normal;font-size:10pt'><FONT color="#000000">this&nbsp;is&nbsp;a&nbsp;test</FONT></BODY></HTML>

As you can see the font is persisted and when loading from this memo, the text in TAdvRichEditor uses font Arial 10.

I may have not been clear or I am doing it all wrong, please try this:

Type something into a TAdvRichEditor.  Clicking Button 1 results in something like this:
<FONT color="#000000">test</FONT>

Then clicking Button2 results in this:
</FONT><SPAN style="background-color:#FFFFFF;display:inline-block"><FONT face="Tahoma" style="font-size:8pt" color="#000000">test</FONT></SPAN>

procedure TframeEmail.Button1Click(Sender: TObject);
  Memo1.Lines.Text := reEmailBody.ContentAsPlainHTML();

procedure TframeEmail.Button2Click(Sender: TObject);
  s: String;
  s := reEmailBody.ContentAsPlainHTML();
  Memo1.Lines.Text := reEmailBody.ContentAsPlainHTML();

I have tested exactly this and I cannot reproduce this.
Please double check you use the latest version and if a problem persists, send a sample source project with which we can reproduce this to support.

Sorry for the late response.  I'm not getting notifications of replies to ANY of my posts, so I have to remember to check back (yes, I submitted a support ticket to check as to why I am not getting notifications and all is configure right, and nothing is going to spam, so that is not it either).

Anyway, I just updated with the latest, released today, and it is still occurring.  I will put a sample together and send it over.  It might be a few days.  Hopefully I'll find that it is just something I'm doing wrong. :)

OK, please send the sample source project to our support email.

Sample sent (finally!) to support. :)

We traced & solved this issue. The next update will address this.

Thanks.  One more issue with this.  Using the same test program I sent you, you will see it also loses any indentation on a re-load.  Try indenting a 2nd line using the toolbar button for indenting a level, then click the save/restore button and see that the indent is lost.

And yet one more issue with this.  If I add an image to the html text and resize it, it is that size when saved, however it changes size when I re-load it.

On the html images issue just mention about the size changing on a reload.  If I set the editor to be HTMLImages := igInline, then it seem to retain the size.  I will be using this igInline setting anyway for sending emails so I'm good, but you still might want to investigate it when they are just links. ;)

We have addressed the persistence of indent in text. Next update will fix this.
We could not see an issue with persistence of image size. If a problem persists, do you have more detailed instructions how to reproduce this?


As for the image issue, if you still have that HTML Editor Test sample program I uploaded, you can run that.  Just add an image using the toolbar button, and resize the image down so it is about 1 inch square.  Then click the "Step Two" which reloads the editor.  The size of the image is now bigger.

As a simpler test, I also tried just adding a 640x480 image and did not bother resizing.  Hit the [step 2] button and the image changed size to something smaller.

You guys really need to increase the timeout of the forum page.  Many times after I enter a response, it reports that the session has timed out and can't submit. Luckily I can copy the text, refresh the page and paste it back.  Just so annoying. :(

We could find the issue with persisting image sizes in HTML. We have applied a fix. Next update will address this.

Hi bruno

i've same problem of HTML output format with AdvRichEditorMiniHTMLIO configured with PlainHTM = true, SpaceAsNBsp = False linked
to TAdvRichEdit and AdvRichEditorFormatToolBar to manage text

For example if i set Verdana, 10 i've in output :
Megagest menu principale
as you see only font color is set : face and size no !

when i try to change again font and size (with text selection) i've in output something like this
Megagest menu principale
font face is missing (you dont see 'verdana') and first '' intruction is incorrect !!

TMSVCLUIPackSetup 10.5.3 and delphi Rio 10.3.3

Can you help me ?

Thank you

I added and image with full html code because previous post was incomplete ... without html code

The HTML output should contain font settings different from the default Font set with AdvRichEditor.Font.
Is this the case?

Now seems go better but i've the incorrect "/FONT" on begin html string.... Now how can i set the default font when i start to write text ? i use AdvRichEditorFormatToolBar

The default font is the font as configured by property AdvRichEditor.Font
With what exact steps can we reproduce to have an incorrect tag?

TextBox.zip (3.0 KB)

Hi see my project

  1. How can change the default font and size from the combox of AdvRichEditorFormatToolBar? in the frmTextBox.Create i can't do that : TMSFontListComboBox.Items is always empty and i can't delete fonts too

  2. I have a problem with HTML font tag that dont put name and size if same font of rich edit. Hw can solve that ?