I want to
1. upload image to server and get url of this link ( know how to do)
2. paste this url as the picture to rve (don't know how to do)
one idea that i can see upload pic
insert file from the local storage
upload to server
handle OnSaveItemToFile like this
Code: Select all
procedure TMyForm.MyRichViewSaveItemToFile(
Sender: TCustomRichView; const Path: String;
RVData: TCustomRVData; ItemNo: Integer;
SaveFormat: TRVSaveFormat; Unicode: Boolean;
var OutStr: TRVRawByteString; var DoDefault: Boolean);
begin
if (RVData.GetItemStyle(ItemNo)=rvsPicture) then
begin
if SaveFormat=rvsfHTML then
OutStr := '<PIC>'
else
OutStr := '<PIC>'; // << insert URL here - but how can I know which url for which pic?
if Unicode then
OutStr := RVU_GetRawUnicode(OutStr);
DoDefault := False;
end;
end;
Which way would be better? Could you give a simple example?
Thank you in advance for support.
P.S. using delphi seattle and TRichView 16+