sfHtml2TextPlugin - 0.0.2

sfHtml2TextPlugin

You are currently browsing
the website for symfony 1

Visit the Symfony2 website


« Back to the Plugins Home

Signin


Forgot your password?
Create an account

Tools

Stats

advanced search
Information Readme Releases Changelog Contribute
Show source | Show as Markdown

sfHtml2Text plugin

The sfHtml2Text is a symfony plugin that provides an abstaction of the html2text class (http://www.chuggnutt.com/html2text.php)

Installation

To install sfSwiftPlugin, type:

    symfony plugin-install http://plugins.symfony-project.com/sfHtml2TextPlugin

Html2Text libary in a global directory

Copy the autoload.yml.sample from %SF_PLUGINS_DIR%/sfHtml2TextPlugin/config/ to your symfony %SF_CONFIG_DIR% folder and set the path:

autoload:
  html2text_classes:
    ...
    path: /your/path/to/html2text/
    ...

Usage

Simply use it:

$htmlText ="

Hello World!

"; $h2t =new html2text($htmlText); echo $h2t->get_text();

Also be sure to review the docs at http://www.chuggnutt.com/html2text.php

Enjoy!