Table of Contents

Method ReplaceContent

Namespace
DocWright.Dom.Editing
Assembly
DocWright.Dom.dll

ReplaceContent(BookmarkReference, string, CharacterFormat?)

Replaces the content the bookmark spans with a single text run.

public static TextRun ReplaceContent(this BookmarkReference bookmark, string text, CharacterFormat? format = null)

Parameters

bookmark BookmarkReference

The bookmark.

text string

The replacement text.

format CharacterFormat

The replacement formatting, or null to inherit from the first run the bookmark spanned — the same default find and replace uses.

Returns

TextRun

The inserted run.

Exceptions

ArgumentNullException

An argument is null.