TadvRichEditor

I am attempting to use TadvRichEditor to allow updates to a web site via a combination of MySQL database and HTML.

I am using TadvRichEditor in combination with TadvRichEditorMiniHTMLIO and from a HTML text point of view it is working without a problem. In fact it is an excellent solution. My problem is any images inserted in the text need to be:
1. Uploading to the web site
2. The img reference changed to point to the location on the web site.
I can upload the images through FTP, but I cannot find a way to identify:
1. Which and how many images have been inserted in the text and
2. How to change the link in the text to reflect the web location of the images.

Any help would be appreciated.

Regards

Gregg Redford

At this time, the images are generated in the same folder as where the HTML is generated or in a subfolder specified. I'd suggest to choose a subfolder and then loop through all images generated in this subfolder to know what images to upload with FTP.

Thanks Bruno, your prompt reply is appreciated.

I assume I will have to amend the link in the HTML myself.

Regards

Gregg

When you export the images to a subfolder, the image refs should be relative to this subfolder, i.e.

<img src="subfolder\image1.png"> , <img src="subfolder\image2.png">  etc..

I've managed to resolve changing the image link and I can save the 'document' to a specified directory. However, any images are saved to the executable directory which is not what I need (and will not work on Windows 10 unless the program is run as Administrator). I've also tried saving the text and images specifying the image path in the TAdvRichEditMiniHTMLIO.save(filename,imgpath) method, but that makes no difference to where the images are saved (still to the executable directory).


I've examined PictureContainer and HTMLImageList to see if the image details are kept in one of those properties with no luck.

Are there any pointers you can give me for a workaround for this problem.

Regards

Gregg

I think I've resolved the problem.

I've called ContentAsHTML(directoryToSaveTo) from the RichEditor and the images are saved to the directory I need.