trichview.com

trichview.support




Re: HTML WYSIWYG and images


Return to index


Author

Message

James Crosswell

Posted: 02/16/2005 1:23:25


Sergey Tkachenko wrote:

> Use OnHTMLSaveImage or OnSaveImage2 events to customize HTML image saving.


Yes I saw these - I'm not quite sure what to do with them though. I

think maybe the OnSaveItemToFile event would be more useful, since it

has an OutStr parameter that I can modify... but I'm not sure how to get

the value I need for this:


procedure TfrmHTMLEditor.txtEditorSaveItemToFile(Sender: TCustomRichView;

   const Path: String; RVData: TCustomRVData; ItemNo: Integer;

   SaveFormat: TRVSaveFormat; Unicode: Boolean; var OutStr: String;

   var DoDefault: Boolean);

var

   i: Integer;

begin

   inherited;


   // Just to see what we can do with these images

   if ( RVData.GetItemStyle(ItemNo) = rvsPicture ) then

     if SaveFormat = rvsfHTML then

       begin


         OutStr := ???

                 // TODO: work out the original url that was used

               // for the image when it was imported... if I'm

               // lucky the importers will have stored this in a

               // tag or a filename or something and I can get at

               // it using a GetTag(ItemNo) or something... but I'm

               // a bit stuck here


         DoDefault := False;


       end;


end;


Any suggestions here?


Thanks in advance.


Best Regards,


James Crosswell

Software Engineer

Microforge.net Limited

http://www.microforge.net





Powered by ABC Amber Outlook Express Converter