<< Click to display table of contents >>


Inserts HTML from the Clipboard at the position of the caret.

procedure PasteHTML;

(Introduced in version 21)

This method does nothing if the Clipboard does not contain HTML.

Parameters for loading are in TRichView.HTMLReadProperties.

Method type: editstyle editing-style method for insertion.

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. However, most browsers copy HTML using inline CSS attributes, so StyleTemplateInsertMode works not as good as for insertion of HTML files or streams where a style sheet is defined in a header.

The method calls OnStyleTemplatesChange event.

See the details about HTML style sheet in the topic about LoadHTML.

Platform notes: this method is implemented for Windows and macOS. For other platforms, it does nothing.

See also methods:




See also:

TRichView and Clipboard