trichview.support
VERY Important Questions !! |
Author |
Message |
Alexander Adam |
Posted: 08/18/2002 16:46:59 hi! These questions came up when I wanted to finish my app. They're very important and urgent for me, so please try to answer, thanks in forward to that :) Okay, lets begin: 1) I had to extend OnUrlNeeded-Event (and the GetURL-Function) for an additonal Paramater, called "ExtraCode": procedure OnURLNeeded(Sender: TCustomRichView; id: Integer; var url: String; var ExtraCode: String); function GetUrl(Id: Integer; var ExtraCode: String): String; this parameter gives me the ability to add events to a Hyperlink like "OnClick". At the places where GetUrl() is called, I check if ExtraCode is <> '', if yes then I add the code to the Hyperlink so for example one of these places where extended: Write('<A href="%s"' + ExtraCode + '>', [...]) Would you please add this to your source? Otherwise I always would have to modify the newest source and that's too much always to do. I think that improves the exporting to HTML _very_ much. If you don't want to modify OnUrlNeeded, could you then maybe add a second one (OnUrlNeeded) with the "ExtraCode" - Param? 2) I use a special Text-Style with its own background to save HTML-Code as Html-Code, so I have set "rvteoHTMLCode" in Options. But in in spite of that, there are always <DIV>'s and <SPANS> round my Html-Code, so it doesn't work corretly in the browser of course (I for example tried to add a <script>..</script> but your component added a span round it..). What to do here? "rvteoHTMLCode" is set!!!? E.g. I have inserted "<hr><B>TEST</B><hr>" with this special TextStyle, when exporting to HTML he makes this out of it: "<P><SPAN class=RVTS85><hr></SPAN></P> <P><SPAN class=RVTS85><B>TEST</B></SPAN></P> <P><SPAN class=RVTS85><hr></SPAN></P>" 3) How to save controls when saving RVF to Stream? I use these two routines to load & save the RVData from the editor to and from a string. But If I have inserted a Button, no OnSaveComponent..lala is fired, so when reloading the string into RVF the control has gone. What to do here? >>> function SaveRVFString(Ed: TRichViewEdit): String; var Stream: TMemoryStream; begin Stream := TMemoryStream.Create; Ed.SaveRVFToStream(Stream, False); Stream.Position := 0; SetLength(Result, Stream.Size); Stream.ReadBuffer(PChar(Result)^, Stream.Size); Stream.Free; end; procedure LoadRFVString(const Source: String; Ed: TRichViewEdit); var Stream: TMemoryStream; begin Stream := TMemoryStream.Create; Stream.WriteBuffer(PChar(Source)^, Length(Source)); Stream.Position := 0; Ed.LoadRVFFromStream(Stream); Stream.Free; Ed.Format; end; <<< 4) How can I select the whole TextStyle? I mean, I have some lines with the same TextStyle, If User clicks on this part, I want to select it completly. How to do thaT? I know SetSelBounds and GetOffs...() but don't know what to do here..? BTw.: Thanks for a _fast_ reply to this question, may I send u a free copy of my Help-Editor when its ready for your _genial_ support? Alex |
Powered by ABC Amber Outlook Express Converter