Hi all,
if i use RichViewEdit1.SaveHTMLEx to create an HTML-File, all Images will be renamed to "img[n].gif".
What can i do to leave the original Filenames of the Images inside the created HTML-File (with or without Path-Information)?
Is there an easy way to do this?
Thanks and Regards from Germany
Ralf
HTML-Export and Imagefilenames
-
- Posts: 57
- Joined: Wed Aug 31, 2005 6:46 pm
-
- Site Admin
- Posts: 17566
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Yes, you can save images in different files using OnSaveImage2 or OnHTMLSaveImage.
See also the help on "TRVExtraItemStrProperty type":
rvespImageFileName
Applicable to: pictures, hot-pictures, tables
Provides a place to store image file name (background image for table). For tables, this value is also accessible as table.
BackgroundImageFileName.
See also: TRVTableCellData.BackgroundImageFileName
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.
See also the help on "TRVExtraItemStrProperty type":
rvespImageFileName
Applicable to: pictures, hot-pictures, tables
Provides a place to store image file name (background image for table). For tables, this value is also accessible as table.
BackgroundImageFileName.
See also: TRVTableCellData.BackgroundImageFileName
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.
Thanks for helping, but i dont understand anything.
In Demo-Application "Editor 1" i have added:
SetHTMLOption(cbHTMLUseItemImageFileNames.Checked, rvsoUseItemImageFileNames); an a checkbox similar to the option.
But inside the generated HTML-File Images still named img1, img2 ...
I dont need to save the Imagesfile. I only need, that the Filename and Path from the Image is stored in HTML-Code.
Please can you help me again ...!?
Thanks and Regards
Ralf
In Demo-Application "Editor 1" i have added:
SetHTMLOption(cbHTMLUseItemImageFileNames.Checked, rvsoUseItemImageFileNames); an a checkbox similar to the option.
But inside the generated HTML-File Images still named img1, img2 ...
I dont need to save the Imagesfile. I only need, that the Filename and Path from the Image is stored in HTML-Code.
Please can you help me again ...!?
Thanks and Regards
Ralf
-
- Site Admin
- Posts: 17566
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Great!
But HOW and WHERE have i to implement the property rvespImageFileName ????
How many things i have to do to effect a simple an normal thing!??!?
Is there any sample for this?
I'm wondering why it is so difficult to have Imagenames inside the HTML-Code. Normally this is a "must have" ...
Regards
Ralf
But HOW and WHERE have i to implement the property rvespImageFileName ????
How many things i have to do to effect a simple an normal thing!??!?
Is there any sample for this?
I'm wondering why it is so difficult to have Imagenames inside the HTML-Code. Normally this is a "must have" ...
Regards
Ralf
-
- Site Admin
- Posts: 17566
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Actually, it's simple.
Reading for the item (picture) at the position of caret:
rve.GetCurrentItemExtraStrProperty(rvespImageFileName, FileName).
Changing for the item (picture) at the position of caret
rve.SetCurrentItemExtraStrProperty(rvespImageFileName, FileName, True).
In the insert picture code, the following fragment should be changed
to
Reading for the item (picture) at the position of caret:
rve.GetCurrentItemExtraStrProperty(rvespImageFileName, FileName).
Changing for the item (picture) at the position of caret
rve.SetCurrentItemExtraStrProperty(rvespImageFileName, FileName, True).
In the insert picture code, the following fragment should be changed
Code: Select all
if gr<>nil then
RichViewEdit1.InsertPicture('',gr,rvvaBaseLine);
Code: Select all
if gr<>nil then begin
RichViewEdit1.TopLevelEditor.BeginUndoGroup(rvutInsert);
RichViewEdit1.TopLevelEditor.SetUndoGroupMode(True);
try
if RichViewEdit1.InsertPicture('', gr, rvvaBaseline) then
RichViewEdit1.SetCurrentItemExtraStrProperty(
rvespImageFileName, OpenDialog1.FileName, True);
finally
RichViewEdit1.TopLevelEditor.SetUndoGroupMode(False);
end;
end;