I have simple Zend_Dojo_Form with Editor element, when I add aditional plugins I got notice from firebug
Cannot find plugin linkdialog
the code
class Some_Form extends Zend_Dojo_Form
{
public function init() {
$this->addElement('Editor', 'content', array(
'label'=> 'Some editor title',
'dijitParams' => array(
'extraPlugins'=>array('linkdialog')
),
);
}
}
How I can enable aditional plugins for Zend_Dojo_Form_Element_Editor? I tried to include manualy, but same results.
dojo.require("dijit._editor.plugins.LinkDialog");
any suggestions?
Thanks @Alan Kay, you got me on the right track, but to elaborate a little more.
There seems to be two categories of Dojo editor plugins, ‘(built-in) plugins‘ and ‘extraPlugins‘.
Here’s a list of built-in plugins (unsure if it’s up-to-date). You can add built-in plugins on Dojo enabled Zend Forms Elements fine:
Alternatively, there are two main libraries of extraPlugins, Dijit (http://dojotoolkit.org/reference-guide/dijit/_editor/plugins.html#dijit-editor-plugins) and Dojox (http://dojotoolkit.org/reference-guide/dojox/editor/plugins.html#dojox-editor-plugins). Unfortunately, ‘extraPlugins’ are unavailable in Zend Framework until the next minor release (1.12) ZF-11511. You could use the patch to create your own library to extend Zend_Dojo_Form_Element_Editor in the meantime.
Note, when specifying ‘extraPlugins’, you want to use the ‘short name’ (e.g. ‘createLink’), not the ‘resource’ (e.g. ‘linkdialog’):
However, note in the above example, it’s possible to include the ‘short names’ for some Dijit extraPlugin ‘resources’, but not Dojox to my knowledge. Unsure why this is (haven’t looked into dojo src – anyone?). Try your luck.