开发者

Fckeditor with Zend Framework

开发者 https://www.devze.com 2023-02-05 16:23 出处:网络
How do I implement Fckeditor with Zend. I have this on the view: src=\"/js/fckeditor.js\"></script>..etc..

How do I implement Fckeditor with Zend.

I have this on the view:

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() ;
        }
    };

I get this error: Application error

Exception information:

Message: Resource 'js' not found

Request Parameters:

array (
  'controller' => 'js',
  'action' => 'fckeditor.jseditor',
  'm开发者_开发问答odule' => 'default',
  'InstanceName' => 'ckeditor',
  'Toolbar' => 'Default',
)  


You may need to create the htaccess to read this kind of files!

This is my default htaccess to ZF projects:

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]

Maybe your htaccess is a little different like this part:

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

If this one is your format, just add JS to the () information inside.

Hope it works. Regards

0

精彩评论

暂无评论...
验证码 换一张
取 消