TCustomRichViewEdit.InsertHTMLFromStreamEd

<< Click to display table of contents >>

TCustomRichViewEdit.InsertHTMLFromStreamEd

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

Stream stream containing HTML

Path defines a base path for images. If HTMLReadProperties.BasePathLinks = True, this path is also used for hyperlinks.

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:

InsertHTMLFromFileEd;

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.