Contents

requestTextContextForAutocorrection(completionHandler:)

A method the text system calls to get extra information for autocorrection suggestions.

Declaration

func requestTextContextForAutocorrection(completionHandler: @escaping  @Sendable (BETextDocumentContext) -> Void)
func requestTextContextForAutocorrection() async -> BETextDocumentContext

Parameters

Mentioned in

Discussion

The system calls this method to retrieve extra context for the currently selected text.

Construct a BETextDocumentContext that contains complete sentences that also include the current selection. If the selection is at a sentence boundary, also include the preceding sentence.

See Also

Requesting context