trichview.support
Re: load stream to richview |
Author |
Message |
Yernar |
Posted: 12/06/2002 16:25:55 How about rv.style:=... ? ;) "mjg" <[email protected]> wrote: > >Can anyone help with this? > >When a user pastes (shift-ins) rich text into my rv, I want to automatically >convert this to it's HTML version and paste that instead. > >In my rv on-paste, I call > >procedure Paste_and_convert(in_rv:TRichViewEdit); >var rv:TRichViewEdit; mem:TMemoryStream; >begin > mem:=TMemoryStream.create; > rv:=TRichViewEdit.create(nil); > rv.options:=rv.options+[rvoAutoCopyRTF]; > rv.PasteRTF; > rv.selectall; > rv.SaveHTMLToStream(mem,'','stream','',[]); > rv.free; > mem.Position:=0; > in_rv.format; > in_rv.InsertRTFFromStreamed(mem); >end; > >Problem 1) >It won't work if I create rv dynamically. I have to add rv onto my form and >reference that one in Paste_and_convert() instead. > >Problem 2) >It doesn't work anyway. mem gets populated with something (ie. mem.size changes) >but InsertRTFFromStreamed() won't insert the mem stream into my original >in_rv. > >mem contains plain acsii text (html), will InsertRTFFromStreamed() fail if >it's not RTF format? How can I insert plain text? > >TIA > >Mart |
Powered by ABC Amber Outlook Express Converter