Spellchecking a text selection is merely a matter of defining the appropriate text source
implementation.
In this example we define the TextSource's get_text() method to obtain the text from the currently selected text in the textarea.
set_text() replaces the selection with the corrected text.