Board index » delphi » How to save RichEdit contents with RTF codes?

How to save RichEdit contents with RTF codes?

Hi All,

I need to let users save the content of a RichEdit if they modify it.
At this point they can bring in a file to the RichEdit, modify it and
print it (as part of a QuickReport).
They can also save their changes, but only the text, not the RTF codes.
(fonts, bold, underline)

Does anyone know how can I can let them save their modifications with
the RTF formatting?

Setting the PlainText property to True shows the formatting if a new
file is displayed, but does not keep the RTF formatting once a
modification is made.

I tried sending the user's visible RichEdit contents
(RichEdit1.OnChange) to an invisible RichEdit which had PlainText set to
True. This
just removed the PlainText RichEdit formatting.

Alternatively, is there a third party RichEdit which does this very
well?

As always, Thanks again for the help,
M. Berlin

 

Re:How to save RichEdit contents with RTF codes?


Moshe:

thisRichEdit.Lines.SaveToFile;

with PlainText set to false should do it for you.

--
Regards
Ralph (TeamB)
Herrsching, Germany
(TeamB cannot respond to questions received via email)

Quote
Moshe Berlin <75320.1...@compuserve.com> wrote in message

<35E192C7.21345...@compuserve.com>...
|Hi All,
|
|I need to let users save the content of a RichEdit if they modify it.
<deletia>
|
|Does anyone know how can I can let them save their modifications with
|the RTF formatting?

Re:How to save RichEdit contents with RTF codes?


Ralph!
!!RichEdit.SaveToFile()!!
Simple, effective, great  :-)
Thank you, Thank you, Thank you!
Moshe

Quote
Ralph Friedman (TeamB) wrote:

Moshe:
thisRichEdit.Lines.SaveToFile;
with PlainText set to false should do it for you.
Quote
> Regards
> Ralph (TeamB)
> Herrsching, Germany
> (TeamB cannot respond to questions received via email)

Other Threads