NAME
Text::Textile::RTF - Generate RTF output from Textile mark-up
SYNOPSIS
use Text::Textile::RTF qw(textile);
my $textile = <<EOT;
h1. Heading
A _simple_ demonstration of Textile markup.
* One
* Two
* Three
"More information":http://www.textism.com/tools/textile is available.
EOT
# Procedural interface:
my $text = textile($textile);
print $text;
# Object-oriented interface
my $ttrtf = Text::Textile::RTF->new();
$rtf = $ttrtf->process($textile);
DESCRIPTION
Text::Textile::RTF is a sub-class of Text::Textile::Plaintext that produces RTF output instead of plain text. See Text::Textile::Plaintext for more detail.
METHODS
This class only defines the following two methods. It inherits everything else from Text::Textile::Plaintext.
- new([%args])
-
Create a new instance of this class. This constructor calls the super-class constructor after handling the
formatter
parameter and setting up an instance of HTML::FormatRTF to pass to the parent. This method only handles the following parameter:- formatter($obj|$hashref)
-
Specify either a pre-created instance of HTML::FormatRTF (or a suitable sub-class) or a hash-reference of parameters to pass to the constructor when creating one. If this parameter is not present, an object is created with the default parameters (as according to HTML::FormatRTF).
See documentation of the new() method in Text::Textile::Plaintext for additional recognized parameters.
- textile($textile)
-
This method is defined in this class so that it can be imported and used procedurally, as textile() is used in either Text::Textile::Plaintext or Text::Textile itself. It renders the Textile mark-up in
$textile
to HTML, then renders the resulting HTML tree into RTF. It returns the RTF content as a single string.
BUGS
Please report any bugs or feature requests to bug-text-textile-plaintext at rt.cpan.org
, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Text-Textile-Plaintext. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
SUPPORT
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Text-Textile-Plaintext
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
Search CPAN
Source code on GitHub
COPYRIGHT & LICENSE
This file and the code within are copyright (c) 2009 by Randy J. Ray.
Copying and distribution are permitted under the terms of the Artistic License 2.0 (http://www.opensource.org/licenses/artistic-license-2.0.php) or the GNU LGPL 2.1 (http://www.opensource.org/licenses/lgpl-2.1.php).
SEE ALSO
Text::Textile, Text::Textile::Plaintext, Text::Textile::PostScript, HTML::FormatRTF.
AUTHOR
Randy J. Ray <rjray@blackperl.com>