2011-01-21 71 views
0

如何用Zend实现Fckeditor。带Zend Framework的Fckeditor

我有这样的观点:

src="/js/fckeditor.js"></script>..etc.. 

<textarea name="profileDescription" id="ckeditor"..etc.. 

window.onload = function() 
    { 
     if(document.getElementById('ckeditor')) { 
      var oFCKeditor = new FCKeditor('ckeditor') ; 
      oFCKeditor.BasePath = "<?php echo BASE_URL; ?>js/fckeditor.js"; 
      oFCKeditor.Height = 500; 
      oFCKeditor.Width = 700; 
      oFCKeditor.ReplaceTextarea() ; 
     } 
    }; 

我得到这个错误: 应用程序错误

异常信息:

消息:资源 'JS' 未找到

请求参数:

array (
    'controller' => 'js', 
    'action' => 'fckeditor.jseditor', 
    'module' => 'default', 
    'InstanceName' => 'ckeditor', 
    'Toolbar' => 'Default', 
) 
+0

你能提供更多信息吗?你打算在哪里添加ckeditor? – 2011-01-21 10:22:30

回答

0

您可能需要创建htaccess才能阅读这类文件!

这是我的默认htaccess的采埃孚项目:

AddDefaultCharset utf-8 

ServerSignature off 

SetEnv APPLICATION_ENV development 

<IfModule mod_headers.c> 
    Header unset Server 
    Header unset X-Powered-By 
</IfModule> 

<IfModule mod_php5.c> 
    php_flag register_globals off 
    php_flag magic_quotes_gpc off 
</IfModule> 


RewriteEngine On 

RewriteBase /proj_rodrigo/public/ 

RewriteCond %{REQUEST_FILENAME} -s [OR] 
RewriteCond %{REQUEST_FILENAME} -l [OR] 
RewriteCond %{REQUEST_FILENAME} -d 
RewriteRule ^.*$ - [NC,L] 
RewriteRule ^.*$ index.php [NC,L] 

也许你的htaccess是这样的部分稍有不同:

RewriteRule !\.(phtml|swf|jar|js)index.php 

如果这个人是你的格式,只需添加JS到()信息里面。

希望它有效。 Regards