Page 1 of 1

OnSaveParaToHTML

Posted: Tue Mar 14, 2023 12:26 pm
by ravn
Where can I find this event in Richview "OnSaveParaToHTML"
It's not where I expected. how do I associate that event with Richview.
I am using RichViewEdit 21.0

Re: OnSaveParaToHTML

Posted: Tue Mar 14, 2023 7:26 pm
by Sergey Tkachenko
TRichView has OnSaveParaToHTML event, but this event is public, not published.
It is because this event was implemented on a request, but I do not think it is useful. It allows adding HTML code between paragraphs (before <p> and after </p>). There are few application of this feature. So I decided to hide this event from Object Inspector.

If you still need it, you can define a procedure that handles this event:

Code: Select all

procedure TMyForm.MyRichViewSaveParaToHTML(Sender: TCustomRichView; 
  RVData: TCustomRVData; ItemNo: Integer; ParaStart,
  CSSVersion: Boolean; var HTMLCode: TRVUnicodeString);
begin
 ...
end;
and assign it to the event:

Code: Select all

MyRichView.OnSaveParaToHTML := MyRichViewSaveParaToHTML;