cmc-sales/views/helpers/fck.php

31 lines
801 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
* @param int $width
* @param int $height
*/
function fckeditor($namepair, $content, $width=600, $height=600){
2009-04-23 21:26:48 -07:00
$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->Width = $width;
$oFCKeditor->Height = $height;
$oFCKeditor->Create() ;
2009-04-23 21:26:48 -07:00
}
}
?>