Php CKEditor 4和Zend:是否更新到CKEditor 4?
我有一个使用Php CKEditor 4和Zend:是否更新到CKEditor 4?,php,zend-framework,ckeditor,wysiwyg,Php,Zend Framework,Ckeditor,Wysiwyg,我有一个使用CKEditor 3和Zend的现有应用程序。我一直在使用Zend\u Form\u Element\u Textarea创建Textarea,并将class属性设置为editor\u normal $content = new Zend_Form_Element_Textarea('editor_normal'); $content->setLabel('Edit:') ->setAttrib('cols', 50)
CKEditor 3
和Zend
的现有应用程序。我一直在使用Zend\u Form\u Element\u Textarea
创建Textarea,并将class属性设置为editor\u normal
$content = new Zend_Form_Element_Textarea('editor_normal');
$content->setLabel('Edit:')
->setAttrib('cols', 50)
->setAttrib('rows', 8)
->setAttrib('class','basic')
->setRequired(TRUE);
$this->addElement($content);
我已将ckeditor添加到页眉脚本的page controller init函数中:
$this->view->headScript()->appendFile($this->view->baseUrl('/library/ckeditor/ckeditor.js'));
我使用
$view->ckeditor();
在javascript标记中:
我设置了CKEditor的配置,然后使用:
jQuery('.editor_normal').ckeditor(tool);
//tool is a custom toolbar
However, I am led to believe that the class file: ckeditor.php is no longer included as of CKeditor 4 so I removed all of the view->ckeditor(); and jQuery('.editor_normal').ckeditor(compact); and have added:
window.onload = function() {
CKEDITOR.replace( 'editor_normal, {
toolbar: 'Basic',
uiColor: '#9AB8F3',
language: 'en',
disableNativeSpellChecker: false,
filebrowserWindowWidth: '600',
filebrowserWindowHeight: '300',
filebrowserBrowseUrl : '/mybrowse',
filebrowserImageBrowseUrl : '/myimages',
filebrowserLinkBrowseUrl : '/mylinks',
filebrowserUploadUrl : '/myupload'
});
在页面的javascript中
不幸的是,这不起作用,当与zend一起使用它时,是否有特定的最佳实践可供使用,以及我是否在工作流程中遗漏了某些内容
当我复制输出的zend页面的源代码并将其粘贴到一个普通的html文件中并将其托管在服务器上时,它就可以工作了。
多谢各位
Javascript控制台:
Uncaught SyntaxError: Unexpected token < loadck.js:1
Uncaught TypeError: Object [object Object] has no method 'addCss' css-refresh.js:39
Uncaught语法错误:意外标记
你能显示你的调试控制台(Javascript)吗?包括调试控制台,我重拨了我所做的更改,然后刷新了页面,它的工作让我惊讶。我又恢复了精神,它停止了,从那以后就不工作了……难以置信