Table of Contents

Method DeleteContent

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

DeleteContent(BookmarkReference)

Deletes the content the bookmark spans, leaving both markers in place so the bookmark survives as an insertion point.

When the markers sit in different paragraphs the paragraphs are joined, which is what deleting a range that crosses a paragraph mark means: the mark is part of the deleted range. The surviving paragraph keeps the start paragraph's own formatting.

public static int DeleteContent(this BookmarkReference bookmark)

Parameters

bookmark BookmarkReference

The bookmark.

Returns

int

The number of inlines removed.

Exceptions

ArgumentNullException

bookmark is null.

InvalidOperationException

The markers sit in paragraphs with different parents, so the span cannot be joined.