2011-01-21 69 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