cmc-sales/views/helpers/fck.php

27 lines
669 B
PHP
Raw Normal View History

2009-04-23 21:26:48 -07:00
<?
App::import('Vendor', 'fckeditor');
class FckHelper extends AppHelper {
/**
* creates an fckeditor textarea
*
* @param array $namepair - used to build textarea name for views, array('Model', 'fieldname')
* @param string $content
*/
function fckeditor($namepair, $content){
$editor_name = 'data';
foreach ($namepair as $name){
$editor_name .= "[" . $name . "]";
}
$oFCKeditor = new FCKeditor($editor_name) ;
$oFCKeditor->BasePath = '/quotenik1.2/js/fckeditor/' ;
$oFCKeditor->Value = $content ;
$oFCKeditor->Create() ;
}
}
?>