Web forum is in read-only mode. Login as active registered customer for write access
  Forum Search   New Posts New Posts

RichEditor : Convert to plain text

 Post Reply Post Reply
Author
dehorter olivier View Drop Down
Senior Member
Senior Member
Avatar

Joined: 05 Aug 2010
Posts: 121
Post Options Post Options   Quote dehorter olivier Quote  Post ReplyReply Direct Link To This Post Topic: RichEditor : Convert to plain text
    Posted: 13 May 2019 at 11:25am
Hi

How to convert an Html (or richedit) version to plain text in the same advRichEditor ?

I use a checkbox in order to indicate if I can use html enhancement or just use the plain text.

When the text use already html format, and I switch to plain text format, how to delete all enhancement (bold, italic, etc ) already present.

I try to use stream property without success :(

regards
olivier
Back to Top
Bruno Fierens View Drop Down
TMS Support
TMS Support
Avatar

Joined: 11 May 2010
Posts: 7968
Post Options Post Options   Quote Bruno Fierens Quote  Post ReplyReply Direct Link To This Post Posted: 13 May 2019 at 11:58am
You can use:
AdvRichEditor.ContentAsPlainText: string;
Back to Top
dehorter olivier View Drop Down
Senior Member
Senior Member
Avatar

Joined: 05 Aug 2010
Posts: 121
Post Options Post Options   Quote dehorter olivier Quote  Post ReplyReply Direct Link To This Post Posted: 13 May 2019 at 1:00pm
Hi

In order to retrieve the linebreak, I do this :

                Chaine := vTexte.ContentAsPlainText;
                liste.Text := Chaine;
                vTexte.Clear;
                FOR i := 0 TO liste.Count - 1 DO
                BEGIN
                    IF i > 0 THEN
                        vTexte.AddLineBreak;
                    vTexte.AddText(liste.Strings);
                END; //  Fin de FOR
regards
olivier

Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down