Zend Dojo Editor-Plugin by name editor not found

18 Nov

Few days back when I tried to use Dojo editor in my application, I was served with error “plugin by name editor not found”.
As it is my custom to work until and unless I find solution, so I tried hard and worked for few days. At the end hard work pay off and find the solution.
Nothing was wrong with my code, however I was using Zend Framework version 1.6, when I updated my version and dojo toolkit the following fancy dojo editor was displayed on my page.

Zend Dojo Editor

Zend Dojo Editor

class forms_SimpleForm extends Zend_Dojo_Form
public function __construct($options = null)

$editor=new Zend_Dojo_Form_Element_Editor(‘content’);

That’s it. Have fun.


12 Responses to “Zend Dojo Editor-Plugin by name editor not found”

  1. Ahsan Shahzad November 18, 2008 at 2:41 pm #

    realy awsome!
    thanks for posting this handy method to use Zend Dojo Editor,
    definately i’ll try it 🙂

  2. Thang January 15, 2009 at 7:26 pm #

    Yes, I have the same problem and it’s solved when upgrading to ZF 1.7. But I don’t know how to get value from this form (I tried $form->getvalue(‘editorName’); but it’s empty)

  3. Faheem Abbas January 16, 2009 at 9:03 am #

    Try this one
    $values = $this->getRequest()->getParams();
    However keep in mind that this will return more result than u expect. so better to write
    you will see the entire set of data returned.

  4. Thang January 19, 2009 at 7:45 am #

    I can get values from all other form elements except the editor (return empty).
    Here is debug values:
    ‘controller’ => string ‘admin’ (length=5)
    ‘action’ => string ‘post’ (length=4)
    ‘module’ => string ‘default’ (length=7)
    ‘title’ => string ‘testing fdsa’ (length=4)
    ‘header’ => string ‘tesing fwer’ (length=4)
    ‘main’ =>
    ‘Editor’ => string ” (length=0)
    ‘security’ => string ‘0’ (length=1)
    ‘submit’ => string ‘Submit’ (length=6)

  5. Faheem Abbas January 19, 2009 at 9:05 am #

    This shouldn’t happen, and never happen with me.
    Better if you post your code. I’ll be able to see what is causing this bug.

  6. Thang January 19, 2009 at 9:24 am #

    @Abbas: Here is my code:
    class NewarticleForm extends Zend_Dojo_Form
    public function init()
    $form = new Zend_Dojo_Form();

    ‘label’ => ‘Title:’,
    ‘required’ => true,

    ‘filters’ => array(‘StringTrim’),
    ‘validator’ => array(‘Alnum’)


    ‘label’ => ‘Textarea’,
    ‘required’ => true,
    ‘style’ => ‘width: 400px; height: 100px’,

    $this->addElement(‘editor’, ‘main’,
    ‘editActionInterval’ => 2,
    ‘focusOnLoad’ => true,
    ‘height’ => ‘250px’,
    ‘inheritWidth’ => true,
    ‘setName’ => ‘main’,
    // ‘value’ => ‘test’

    ‘label’ => ‘Option:’,
    ‘required’ => true,
    ‘filters’ => array(‘StringTrim’),
    ‘validator’ => array(‘Alnum’),
    ‘value’ => ‘0’


    // add the submit button
    $this->addElement(‘submit’, ‘submit’, array(
    ‘label’ => ‘Submit’,

    ->addDecorator(‘HtmlTag’, array(‘tag’ => ”))

  7. Faheem Abbas January 19, 2009 at 11:10 am #

    $form = new Zend_Dojo_Form();

    Remove first line. no need of that when you Extend your class from Zend_Dojo_Form or Zend_Form.
    and replace

  8. Thang January 20, 2009 at 2:34 am #

    Thanks Faheem.
    I found a valuable note in your entry: “when I updated my version and dojo toolkit”, so I updated the Dojo to version number 1.2.3. Now it works.

    Note for others: After doing above guideline from Faheem Abbas, the editor will return to an array, so to get editor’s value, add this line

    $values = $this->getRequest()->getParams();
    $editor = $values[‘your_own_name’][‘Editor’];

  9. Jean-Marc Rigade January 21, 2009 at 4:44 pm #

    Zend_Dojo_Form_Element_Editor dont work with Internet Explorer 7.
    Its impossible to type some characters in it…

  10. Godfrie February 25, 2009 at 11:00 pm #

    Zend_Dojo_Form_Element_Editor wont work for people who disable javascript either 😦

  11. Godfrie February 25, 2009 at 11:31 pm #

    Ive just tried this but it doesn’t work – the content is still blank.

    $formData = $this->getRequest()->getParams();



    array(7) {
    ["controller"] => string(8) "comments"
    ["action"] => string(7) "comment"
    ["module"] => string(7) "default"
    ["id"] => string(2) "95"
    ["title"] => string(9) "Fancy editor"
    ["comment"] => string(0) "" string(6) "Submit"

    The form class:

    class CommentForm extends Zend_Dojo_Form
    public function __construct($options = null)

    $id = new Zend_Form_Element_Hidden('id');

    $title = $this->addElement('TextBox', 'title', array(
    'filters' => array('StringTrim', 'StripTags'),
    'validators' => array(
    array('StringLength', false, array(1, 128)),
    'required' => true,
    'label' => 'Title',

    $content = new Zend_Dojo_Form_Element_Editor('comment');
    ->addPlugins(array('undo', '|', 'bold', 'italic'))

    $content = new Zend_Form_Element_Textarea('comment');

    $submit = $this->addElement('SubmitButton', 'submit', array(
    'required' => false,
    'ignore' => true,
    'label' => 'Submit',

    array('HtmlTag', array('tag' => 'dl', 'class' => 'bbcform')),
    array('Description', array('placement' => 'prepend')),

    Anyone got any ideas?


  12. nitin March 27, 2009 at 6:31 am #

    i use this code but in my form content is look like just ordinary text area why?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: