Function TParagraph.InsertEx(Index:Integer; text:WideString; CharAttrIndex:Cardinal) : TParagraph

Unit: WPRTEDefs
Class: WPRTEDefs.TParagraph

Parameters

  • Index:Integer
  • text:WideString
  • CharAttrIndex:Cardinal

Returns

The type of the result value is TParagraph.

Description

This function works like but is able to handle \r\n sequences. Such sequences will split the current and create new paragraphs. The variable 'index' will be updated with the next index after the last inserted character and the function will return a reference to the paragraph which was last. So it is quite simple to call InsertEx in a loop.
Please note that if you are inserting into a table cell \r\n will create children paragraphs of the main cell paragraph!