NAME
Template::Plugin::HTML::BBCode - Template Toolkit plugin which implements wrapper around HTML::BBCode module.
SYNOPSIS
[%- USE HTML::BBCode -%]
[% FILTER bbcode %]
[b]BBCode[/b] - is simple [i]markup language[/i] used in
[url=http://www.phpbb.com/]phpBB[/url].
[% END %]
[%- USE HTML::BBCode( 'bbcode_limited'
allowed_tags = [ 'b', 'i', 'u' ]
) -%]
[% FILTER bbcode_limited %]
[b]BBCode[/b] - is simple [i]markup language[/i] used in
[url=http://www.phpbb.com/]phpBB[/url].
[% END %]
DESCRIPTION
Template::Plugin::HTML::BBCode - Template Toolkit plugin which implements wrapper around HTML::BBCode module and provides filter for converting BBCode to HTML.
OPTIONS
You can pass positional and named parameters to plugin constructor
Positional parameters
The first and only positional parameter which can be passed to constructor is new name of plugin. For example,
[%- USE HTML::BBCode( 'bbcode_unlimited' ) -%]
This call would create BBCode-filter with name bbcode_unlimited.
[% FILTER bbcode_unlimited %] ... BBcoded text ... [% END %]
If this parameter is skipped filter name would be bbcode.
Named parameters
Constructor supports named parameters allowed_tags, html_tags, no_html, linebreaks. These parameters are passed directly to HTML::BBCode constructor.
[%- USE HTML::BBCode( 'bbcode_limited'
# allow only italic, underline and bold tags
allowed_tags = ['i','u','b']
) -%]
See HTML::BBCode for more details.
SEE ALSO
AUTHOR
Igor Lobanov, <liol@cpan.org>
http://www.template-toolkit.ru/
COPYRIGHT AND LICENSE
Copyright (C) 2005 Igor Lobanov. All Rights Reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.