PlatformEditorSpellChecker

class PlatformEditorSpellChecker(checker: PlatformSpellChecker) : EditorSpellChecker(source)

An EditorSpellChecker backed by the OS/platform spell checker.

Delegates word, suggestion, and sentence checks to the underlying PlatformSpellChecker, translating its results into the editor's platform-agnostic Suggestion and Correction types.

Parameters

checker

The platform spell checker to delegate to.

Constructors

Link copied to clipboard
constructor(checker: PlatformSpellChecker)

Functions

Link copied to clipboard
open suspend override fun checkSentence(sentence: String, sentenceRange: TextEditorRange): List<Correction>

Implements EditorSpellChecker.checkSentence using the platform spell checker.

Link copied to clipboard
open suspend override fun isCorrectWord(word: String): Boolean

Implements EditorSpellChecker.isCorrectWord using the platform spell checker.

Link copied to clipboard
open suspend override fun suggestions(input: String, scope: EditorSpellChecker.Scope = Scope.Word, closestOnly: Boolean = true): List<Suggestion>

Implements EditorSpellChecker.suggestions using the platform spell checker.