I am using the TMS FNC RichEditor Component. I will add text to it, then in another form I want to take that text and format like Bold, Color, underline ect. And add it to the current RichEditor. Currently I use the code below but it only transfers the text not format. How could I also transfer the format?
procedure CopyStreamToEditor(SourceEditor, TargetEditor: TTMSFNCRichEditor);
var
Stream: TMemoryStream;
begin
Stream := TMemoryStream.Create;
try
SourceEditor.SaveToStream(Stream);
Stream.Position := 0; // Reset stream position before loading
TargetEditor.LoadFromStream(Stream);
finally
Stream.Free;
end;
end;