unihtmlmemo使用

unihtmlmemo使用

procedure TMainForm.UniButton1Click(Sender: TObject);
begin
  UniMemo1.Text := UniHTMLMemo1.Text;
end;

procedure TMainForm.UniFileUploadButton1Completed(Sender: TObject;
  AStream: TFileStream);
begin
  var filename: string:='files/yn'+ formatdatetime('yyyymmddhhnnsszzz', Now) + ExtractFileExt(UniFileUploadButton1.FileName);
  CopyFile(PChar(AStream.FileName), PChar(filename), False);
  UniHTMLMemo1.Lines.Add('<img src="'+ filename +'" alt="' + ExtractFileName(UniFileUploadButton1.FileName) + '" />');
end;

  

posted @ 2020-04-18 07:53  delphi中间件  阅读(849)  评论(0编辑  收藏  举报