TCustomRichViewEdit.InsertMarkdownFromStreamEd

<< Click to display table of contents >>

TCustomRichViewEdit.InsertMarkdownFromStreamEd

Inserts Markdown from stream Stream at the position of caret.

function InsertMarkdownFromStreamEd(Stream: TStream;
  const Path: TRVUnicodeString = ''

  CodePage: TRVCodePage = CP_UTF8): Boolean;

(Introduced in version 20)

By default, the method assumes that the stream has UTF-8 encoding; but you can specify another CodePage in the parameter.

Path defines a base path for images. If rvmdloBasePathLinks is included MarkdownProperties.LoadOptions, this path is also used for hyperlinks.

Parameters for loading are in MarkdownProperties. See the topic about the class of this property for the detailed explanation of Markdown import and export.

Unlike other stream insertion methods, Markdown loading does not have an option to restrict formatting to existing text, paragraphs and list styles: it may add new styles.

By default, hyperlink targets are loaded in items tags. You can customize loading using OnReadHyperlink event.

Method type: editstyle editing-style method for insertion.

Return value:

"successful insertion?"

 

See also methods of TRichViewEdit:

InsertMarkdownFromFileEd.

See also methods of TRichView:

LoadMarkdownFromStream.

See also events of TRichView:

OnImportPicture;

OnReadHyperlink.

See also:

Saving and loading;

Inserting items at position of caret.