Hi, i am having problems with the FNCRichtexteditor.
i want to save the content to a database so i am converting the entered text to a stream which i am converting tot base64 to save in the database.
so saving :
tmpS:=TMemoryStream.Create;
MEMO.SaveToStream(tmpS);
tmpS.Position:=0;
Base64String:=TTMSFNCUtils.SaveStreamToBase64(tmpS);
(the base64string is save in a SQL server table (varchar(max)
on loading :
tmpS:=TMemorystream.Create;
try
TTMSFNCUtils.LoadStreamFromBase64(pDS.FieldByName('comm').AsString,tmpS);
tmpS.Position:=0;
MEMOa_iu_comm.BeginUpdate;
MEMOa_iu_comm.Clear;
MEMOa_iu_Comm.LoadFromStream(tmpS);
MEMOa_iu_comm.EndUpdate;
finally
tmpS.Free;
end;
this works perfect for any text i copy in the richtext editor.
also when i add text manually (by typing) this works perfect
but when i enter some text manually and change some setting (bold, italic), the application blocks
while debugging i can see that at the MEMOa_iu_Comm.LoadFromStream(tmpS) stops the application (no error, no exception)
maybe also important to know is that i add multiple richtexteditors at runtime to a Layout (for each record in the database there is a richtexteditor added to a layout. But that works perfect;
any ideas ?