Sergey Tkachenko wrote:Do you use this code:
Code: Select all
procedure TForm3.RichViewEdit1HTMLSaveImage(Sender: TCustomRichView;
RVData: TCustomRVData; ItemNo: Integer; const Path: String;
BackgroundColor: TColor; var Location: String; var DoDefault: Boolean);
var FileName: String;
begin
if (ItemNo>=0) and
RVData.GetItemExtraStrProperty(ItemNo, rvespImageFileName, FileName) and
(FileName<>'') then begin
Location := 'file:///' + FileName;
DoDefault := False;
end;
if (ItemNo=-1) and (RVData.GetSourceRVData is TRVTableCellData) then begin
FileName := TRVTableCellData(RVData.GetSourceRVData).BackgroundImageFileName;
if FileName<>'' then begin
Location := 'file:///' + FileName;
DoDefault := False;
end;
end;
end;
Yes, I do use this code (I copied and pasted your code). Stepping thru it, I noticed that when ItemNo=-1 (cell bg img.), FileName = ''. Therefore, Location and DoDefault are never processed...
Sergey, my suggestion is the following: putting up a simple demo comprising a table with 1 row and 2 cols with a different background image in each cell, remembering that, when exported to HTML (CSS), the absolute path to the images should look like C:/xyz/w.jpg. In my opinion, this would solve the matter for many of us.
The other solution would be to let me know how to disable the [Picture...] buttons for tables and cells in the Table Properties dialog, so that the user doesn't set things that he can't see in the exported HTML when absolute path to image is used
In any case, the exporting to HTML capabilities of your component are amazing and with no doubt the best available on the market. Thanks for it!