trichview.com

trichview.support




Re: HTML WYSIWYG and images


Return to index


Author

Message

Sergey Tkachenko

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


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

>      if SaveFormat = rvsfHTML then

>        begin

>          item := TRVGraphicItemInfo( Sender.GetItem( ItemNo ) );

>          OutStr := GetTagStr( txtEditor, item.Tag );

>          DoDefault := False;

>        end;


If I understand that you want to do, this code is wrong.

By default, item tags are used to store hyperlink targets.

None of OnSaveItemToFile, OnHTMLSaveImage or OnSaveImage2 affect saving HTML

hyperlinks. They are saved by OnWriteHyperlink event.


Where do you store link to external images?

1) You can store them in the item name (sometimes referred in trichview help

as "item text").

Item name is a first parameter of AddPictureEx/InsertPicture, you can work

with it using GetItemText/SetItemText and related methods of TRichViewEdit.

2) You can store them in the special item property rvespImageFileName (see

the help file on TRVExtraItemStrProperty type). In this case, may be you can

even avoid processing any events:

If rvsoUseItemImageFileNames is included in the Options parameter of

SaveHTML/SaveHTMLEx, images with defined (non-empty) file names will not be

saved, but their file names will be written in HTML.





Powered by ABC Amber Outlook Express Converter