Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0
Description

Excerpt

Creates and returns a CharacterRun at the point represented by this Position. The text to be inserted is specified as well as whether this should be a new character run or part of the previous one.

Signature
C#C#
Wiki Markup
{description}
{excerpt}Creates and returns a [CharacterRun|CharacterRun] at the point represented by this Position. The text to be inserted is specified as well as whether this should be a new character run or part of the previous one.{excerpt}
{signature:C#}
 public CharacterRun InsertText(System.String text, boolean newRun)
Signature
{signature}{signature:vb.net
vb.net
}
Public Function InsertText(ByVal text As String, ByVal newRun As Boolean) As CharacterRun
Parameters

...

A String representing the text to insert.

...

A boolean representing if this should have default formatting and become its own character run (true) or if it should assume the formatting of the first character in this element, becoming a part of that first character run.

Returns

The CharacterRun containing the inserted text.

{signature}
{parameters}
{param:text}A {{String}} representing the text to insert.{param}
{param:newRun}A {{boolean}} representing if this should have default formatting and become its own character run \(true\) or if it should assume the formatting of the first character in this element, becoming a part of that first character run.{param}
{returns}The {{CharacterRun}} containing the inserted text.{returns}
{example}{code:csharp|title=C#}
CharacterRun charRun = pos.InsertText("Here is some text.", true);
{code}
{code:vb.net
|title=vb.net
}
Dim charRun As CharacterRun = pos.InsertText("Here is some text.", True){code}

{example}
Example
Code Block
csharpcsharp
titleC#
Code Block
vb.nettitle