Template::Plugin::HTML::BBCode - Template Toolkit plugin which implements wrapper around HTML::BBCode module.
[%- 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 %]
Template::Plugin::HTML::BBCode - Template Toolkit plugin which implements wrapper around HTML::BBCode module and provides filter for converting BBCode to HTML.
You can pass positional and named parameters to plugin constructor
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.
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.
Template, HTML::BBCode
Igor Lobanov, <liol@cpan.org>
http://www.template-toolkit.ru/
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.
To install Template::Plugin::HTML::BBCode, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Template::Plugin::HTML::BBCode
CPAN shell
perl -MCPAN -e shell install Template::Plugin::HTML::BBCode
For more information on module installation, please visit the detailed CPAN module installation guide.