SpellCheck(3)

NAME
LJ::SpellCheck - let users check spelling on web pages

SYNOPSIS
  use LJ::SpellCheck;
  my $s = new LJ::SpellCheck { 'spellcommand' => 'ispell -a -h',
                               'color' => '#ff0000',
                           };
  my $text = "Lets mispell thigns!";
  my $correction = $s->check_html(\$text);
  if ($correction) {
      print $correction;  # contains a ton of HTML
  } else {
      print "No spelling problems.";
  }

DESCRIPTION
The object constructor takes a 'spellcommand' argument. This has to be some ispell compatible program, like aspell. Optionally, it also takes a color to highlight mispelled words.

The only method on the object is check_html, which takes a reference to the text to check and returns a bunch of HTML highlighting misspellings and showing suggestions. If it returns nothing, then there no misspellings found.

BUGS
Sometimes the opened spell process hangs and eats up tons of CPU. Fixed now, though... I think.

check_html returns HTML we like. You may not. :)

AUTHORS
Evan Martin, evan@livejournal.com Brad Fitzpatrick, bradfitz@livejournal.com