Table of Contents

Method AfterParagraph

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

AfterParagraph(WordDocument, Paragraph, DocumentPosition, TypingCorrectionOptions?)

The correction when Enter ends a paragraph: the word it ends is corrected as a space would, and a paragraph of only --- or === becomes an empty one with a single or double bottom border.

public static DocumentEdit AfterParagraph(this WordDocument document, Paragraph paragraph, DocumentPosition caret, TypingCorrectionOptions? options = null)

Parameters

document WordDocument

The document.

paragraph Paragraph

The paragraph Enter ended (the one before the caret's).

caret DocumentPosition

Where the caret is (the start of the new paragraph): the edit's ends.

options TypingCorrectionOptions

The corrections to make; null for all.

Returns

DocumentEdit

The edit, empty when nothing is corrected.

Exceptions

ArgumentNullException

An argument is null.

ArgumentException

The paragraph or the caret is not in the document.

AfterParagraph(WordDocument, Paragraph, DocumentPosition, TypingCorrectionOptions?, IList<TypingCorrection>?)

The correction when Enter ends a paragraph, as AfterParagraph(WordDocument, Paragraph, DocumentPosition, TypingCorrectionOptions?), adding what each correction did to made.

public static DocumentEdit AfterParagraph(this WordDocument document, Paragraph paragraph, DocumentPosition caret, TypingCorrectionOptions? options, IList<TypingCorrection>? made)

Parameters

document WordDocument

The document.

paragraph Paragraph

The paragraph Enter ended.

caret DocumentPosition

Where the caret is: the edit's ends.

options TypingCorrectionOptions

The corrections to make; null for all.

made IList<TypingCorrection>

Where the corrections made are added; null for none.

Returns

DocumentEdit

The edit, empty when nothing is corrected.

Exceptions

ArgumentNullException

An argument is null.

ArgumentException

The paragraph or the caret is not in the document.