Textile Editor Helper for Cake
A port of TEH(Textile Editor Helper) to Cake. See Original here: http://slateinfo.blogs.wvu.edu/plugins/textile_editor_helper
Textile Editor Helper for CakePHP
The folks over at slate have put together a nice Javascript Textile editor and this is a slight modification and a helper to ease its integration with a Cake site.Original: http://slateinfo.blogs.wvu.edu/plugins/textile_editor_helper
Live demo (of original):
http://slateinfo.blogs.wvu.edu/plugins/textile_editor_helper/demo
Rossoft's HeadHelper is a dependancy for this helper:
http://rossoft.wordpress.com/2006/03/28/register-head-tags-from-helpers-2/
As I'm a jQuery user I've changed to it as the driver for intial attachment.
Helper Source is on next page or here:
http://www.divshare.com/download/542720-146 - Also Includes modified css and js, as well as image files.
Installation:
1. copy relevant teh folders to js, css and img2. copy teh.php to (app)/views/helpers
3. add to controller's helpers var
Usage:
View Template:
Download code
<?php $teh->add('your jQuery DOM query here', 'extended'); ?>
'simple' is an optional second parameter.Examples:
To make all textarea's with class 'teh' replaced with the simple style:
View Template:
Download code
<?php $teh->add('textarea.teh', 'simple'); ?>
A specific extended textarea (with id 'toTeh'):
View Template:
Download code
<?php $teh->add('textarea#toTeh', 'extended'); ?>
Latest Comments