TCustomRichViewEdit.InsertHTMLFromFileEd

<< Click to display table of contents >>

TCustomRichViewEdit.InsertHTMLFromFileEd

Inserts HTML from file FileName at the position of caret.

function InsertHTMLFromFileEd(
  const FileName: TRVUnicodeString;
  CodePage: TRVCodePage = CP_ACP): Boolean;

(Introduced in version 21)

Parameters

FileName the name of the input HTML file.

CodePage defines encoding of HTML file. If it is equal to 0 (CP_ACP), encoding is detected by TRichView.

Method type: editstyle editing-style method for insertion.

Parameters for loading are in TRichView.HTMLReadProperties.

If style templates are used, and StyleTemplateInsertMode<>rvstimIgnoreSourceStyleTemplates, the method merges a HTML style sheet into Style.StyleTemplates, and reads text and paragraph styles according to StyleTemplateInsertMode. The method calls OnStyleTemplatesChange event.

See details about HTML style sheet and encoding detection in the topic about LoadHTML.

Return value:

"successful insertion?"

 

See also methods of TRichViewEdit:

InsertHTMLFromStreamEd;

PasteHTML.

See also methods of TRichView:

LoadHTML.

See also events of TRichView:

OnImportPicture;

OnImportFile;

OnReadHyperlink;

OnStyleTemplatesChange,

See also:

Saving and loading;

Inserting items at position of caret.