News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Tim Koschuetzki's Blog:
How To Transform HTML To Textile Markup - The CakePHP TextileHelper Revisite
August 23, 2007 @ 08:34:00

Tim Koschuetzki has a new tutorial posted today for CakePHP users out there - it's a method for transforming HTML content into Textile markup via the TextileHelper CakePHP helper.

For a current project of mine I had to find a way to decode html into textile markup. Why? Because we are using tinyMCE to process our textareas as wyciwyg editors, which generate HTML. However, we want all output controlled via textile to allow only the textile tags. Yes, we could do it with strip_tags(), but textile is much more elegant. Plus, it was a requirement by the client. Come on and find out how to detextile html.

Code is included to work on the transformation: detextile, processTag, detextile_process_glyphs and detextile_process_lists. An example is included as well, showing how to input a block of HTML content to be "textile-ized". The full code is available for cutting and pasting at the bottom of the post.

1 comment voice your opinion now!
cakephp framework textile markup transform html tutorial helper cakephp framework textile markup transform html tutorial helper


blog comments powered by Disqus

Similar Posts

MaltBlue.com: \Zend\Db\Sql - Creating Joins and Unions with Ease

JSLabs Blog: Top 10 PHP frameworks (for 11.28.2006)

Zend Developer Zone: Creating Data Tables With PEAR Structures_DataGrid

Wenbert Del Rosario's Blog: Zend Framework: Making the Built-in Breadcrumb Helper Work

Reddit.com: Hack: How to open the black box of Hacklang as a PHP developer


Community Events

Don't see your event here?
Let us know!


development interview voicesoftheelephpant library introduction language unittest conference series laravel5 laravel api psr7 framework community extension opinion wordpress release podcast

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework