Version

InsertParagraph Method

Inserts a new paragraph at the specified offset in the document.
Syntax
'Declaration
 
Public Function InsertParagraph( _
   ByVal offset As Integer, _
   ByRef error As String, _
   Optional ByVal emulateUI As Boolean _
) As ParagraphNode
public ParagraphNode InsertParagraph( 
   int offset,
   out string error,
   bool emulateUI
)

Parameters

offset
Location in the document where to insert a new paragraph. If the offset is part of an existing paragraph then the existing paragraph will be split into two and no additional paragraph will be created.
error
If the paragraph cannot be inserted at the specified location then this will be set to an error message.
emulateUI
Indicates whether to emulate user interface behavior inside an editor when the enter key is pressed to insert a new paragraph. For example, when the offset corresponds to end of a table row (row mark) then a new row is added to the table instead of a new paragraph.
Remarks

InsertParagraph method inserts a new paragraph at the specified document offset. It emulates the behavior of hitting Enter key inside a paragraph in the document. If the offset is inside an existing paragraph then the paragraph is split into two where the content inside the existing paragraph after the offset ends up being part of the new paragraph.

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also