http://ckeditor.com/
--
Hector
--
Hector
On Wed, Feb 10, 2010 at 4:26 PM, Roozbeh Matloobi <roozbeh.matloobi@globalphotobooks.com> wrote:
Hi All,
I have a view help in library\Base\View\Helper direcetpry to render FCKeditor. all is sorted out the only problem is when i have multiple fckeditors on one page, it takes time to dispaly the editor. bellow is what i have done, much appriciate for any help.
class View_Helper_FormFCKEditor extends Zend_View_Helper_FormElement {
/**
* Add description here...
*/
public function formFCKEditor($name, $content, $toolbar = null, $width = null, $hight = null, $disabled = null) {
$basePath = '/affiliate/js/fckeditor/';
$xhtml = '<script type="text/javascript" src="/affiliate/js/fckeditor/fckeditor.js"></script>'
. '<script type="text/javascript">'
. 'var oFCKeditor = new FCKeditor("' . $name . '");'
. 'oFCKeditor.SkinPath = "/gp/";'
. 'oFCKeditor.InstanceName = "' . $this->view->escape($name) .'";'
. 'oFCKeditor.BasePath = "' . $this->view->escape($basePath) .'";'
. 'oFCKeditor.ToolbarSet = "' . $this->view->escape($toolbar) .'";'
. 'oFCKeditor.Width = "' . $this->view->escape($width) .'";'
. 'oFCKeditor.Height = "' . $this->view->escape($hight) .'";'
. 'oFCKeditor.Value = ' . Zend_Json::encode($content) .';'
. 'oFCKeditor.Create();'
. $disabled
. '</script>';
return $xhtml;
}
}
Thanks,
R
没有评论:
发表评论