thod(s) to add to your own controller to ForumCodify some text and return
the marked up HTML in a JSON response.
This is useful as part of a solution to provide in-page edit-preview toggling
(via YUI
et sw=4 sr sta
use strict;
use warnings;
use parent 'Catalyst::Controller';
use JSON::Any;
use HTML::ForumCode;
sub preview : Local {
my ($self, $c) = @_;
my
my $msg_source = $c->request->param('msg_source');
my $j = JSON::Any->new;
my $json = $j->to_json(
{
'formatted' =>
$tt_forum-
$msg_source
)
}
);
$c->response->body( $json );
return;
}
1;
=head1 DESCRIPTION
This recipe provides a L<Catalyst> controll