|
|||
|
Hi,
I was trying to install the fckeditor with ZF. But I got an exception , looks like ZF is looking for a controller for that... Unexpected Exception: XXXController::editorAction() does not exist and was not trapped in __call() Thanks for any help! Last edited by iroy2000 : 03-21-2008 at 10:33 PM. |
|
|||
|
LOL. I replied my own post.
The problem was solved, you need to turn off the rewrite engine in your fckeditor directory, and then specify your basepath when creating the fckeditor object. And it should work like a champ!! So I leave the answer here just in case someone need it in the future ~~ |
|
|||
|
Don't turn off the rewrite engine.
use this. Step 1. PHP Code:
step .2 copy fckeditor to /js/fckeditor the str. will be webroot/js/fckeditor/editor where webroot (or public_html or htdocs or www) is root directory for external files step. 3 in view.phtml (view file) PHP Code:
In layout.phtml you need to echo the headscript because we have added a headscript prepend file method. PHP Code:
document.getElementById('content_text') in the view, the textarea has name='content_text' and id='content_text' look for the name of text area which is to be replaced. You will know this as you give the name for textarea in zend_form. The javascript will search of this id, if found it will replace the textarea with fckeditor. I find this useful because fckeditor.js is loaded only when required. Step.5 for uploading images be sure to change the directory path in fckeditor/editor/filemanager/connectors/php/config.php PHP Code:
I have tried to be as explanatory as possible. If you encounter any problem, do ask. Also, there are many different ways to do this. Don't get confused if you see any other method. Last edited by zeus : 06-15-2008 at 01:53 AM. Reason: typo error |
|
|||
|
hi Zeus
I have followed ur steps. but, still i am having doubts and getting errors. 1)as like step 1. i used ur code in .htacess file. 2)i have put the fckeditor inside js folder (C:\xampp\htdocs\js\fckeditor)Note i am using "xamp" 3)In step 5. i am getting doubts. In config.php file i have given like this: $Config['Enabled'] = true ; $Config['UserFilesPath'] = '/images/uploads/' ; (Is it ok) what is the use of "uploads" folder. there is no folder like "uploads". before, in image folder. I have created and given the path in config.php note: nothing inside the folder "uploads" ( what should come inside) Please reply me. Advance Thanks... |
|
|||
|
hi Zeus
I have followed ur steps. but, still i am having doubts and getting errors. 1)as like step 1. i used ur code in .htacess file. 2)i have put the fckeditor inside js folder (C:\xampp\htdocs\js\fckeditor)Note i am using "xamp" 3)In step 5. i am getting doubts. In config.php file i have given like this: $Config['Enabled'] = true ; $Config['UserFilesPath'] = '/images/uploads/' ; (Is it ok) what is the use of "uploads" folder. there is no folder like "uploads". before, in image folder. I have created and given the path in config.php note: nothing inside the folder "uploads" ( what should come inside) Please reply me. Advance Thanks... |
|
|||
|
Hello,
thank you very much for the information about how to use the Javascript version of FCKeditor within Zend Form. I would prefer to use the php connector of FCKeditor, mainly to get rid of the Javascript code in the view files and to get more comfortable control over the settings. To start with I wrote a View Helper which is wrapping the editor. PHP Code:
<?php echo $this->fckEditor('page_content'); ?> (replace ‘page_content’ with your field name of the element) and the editor will appear. Now to my problem: How can I use my Helper within a Zend Form Textarea element? In the JavaScript version this is achieved by replacing the element onload. How do I get the editor in my Zend Form element textarea? Do I have to extend the Zend_View_Helper_FormElement or do I even have to understand the ‘Marsian’ explanations about the decorators? Which would be the best approach to get a tighter integration with Zend Form? TIA Thomas p.s. excuse my english. I'm a german living in Holland |
![]() |
| Thread Tools | |
| Display Modes | |
|
|