version 1.2, 2004/07/22 19:43:46
|
version 1.3, 2004/07/22 20:19:20
|
Line 58 sub markeduptext {
|
Line 58 sub markeduptext {
|
return $output; |
return $output; |
} |
} |
|
|
|
sub initspeller { |
|
unless (defined($speller)) { |
|
$speller = Text::Aspell->new; |
|
$speller->set_option('lang','en_US'); |
|
$speller->set_option('sug-mode','fast'); |
|
} |
|
} |
|
|
|
sub handler { |
|
my $r = shift; |
|
&Apache::loncommon::content_type($r,'text/html'); |
|
$r->send_http_header; |
|
return OK if $r->header_only; |
|
|
|
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}); |
|
|
|
&initspeller(); |
|
$r->print('<html><head><title>'. |
|
&mt('Spell Checker'). |
|
'</title></head><body bgcolor="#DDDDDD">'. |
|
&markeduptext($ENV{'form.text'}). |
|
'</body></html>'); |
|
return OK; |
|
} |
|
|
BEGIN { |
BEGIN { |
$speller = Text::Aspell->new; |
&initspeller(); |
$speller->set_option('lang','en_US'); |
|
$speller->set_option('sug-mode','fast'); |
|
# $speller->set_option('mode','sgml'); |
|
} |
} |
|
|
1; |
1; |