Issue Type: Improvement Created: 2008-10-03T04:32:27.000+0000 Last Updated: 2009-10-16T10:54:11.000+0000 Status: Resolved Fix version(s): - 1.9.5 (27/Oct/09)
Reporter: Matthew Weier O'Phinney (matthew) Assignee: Matthew Weier O'Phinney (matthew) Tags: - Zend_Dojo
Related issues: Attachments: - zf-4461-2.patch
Currently, when adding Editor plugins via the addPlugin() method of Zend_Dojo_Form_Element_Editor, you have to manually do the dojo()->requireModule() statements that correspond to the plugin module. In most cases, the plugin will correspond to dijit._editor.plugins., and thus we can generate the dojo.require statement automatically.
Posted by Giorgio Sironi (giorgiosironi) on 2009-02-25T03:12:22.000+0000
However, most plugins are builtin in the editor (such as bold, italic, etc.), and does not require a dojo.require call; unfortunately the kick-ass buttons like LinkDialog are implemented as external plugins. I'll try to write a patch today.
Posted by Giorgio Sironi (giorgiosironi) on 2009-02-25T06:37:58.000+0000
This is a patch for Zend_Dojo as included in 1.7.5. Beautiful editor commands included: createLink, fontName, fontSize, formatBlock, foreColor, hiliteColor. Specify it in plugins to include in editor: $this->addElement('Editor', 'richtext', array( plugins => array('bold', 'italic', 'underline', 'createLink', 'foreColor', 'hiliteColor') )); Hope to see this in next minor version (1.7.6 I think).
Posted by Matthew Weier O'Phinney (matthew) on 2009-02-25T07:16:58.000+0000
Patch looks good -- but if you could also provide unit tests, it will make it that much easier for me to apply. :)
BTW, since it adds new functionality, it cannot be released until the next minor release, 1.8.0 (1.7.6 would be the next mini release, and is happening on Monday).
Posted by Giorgio Sironi (giorgiosironi) on 2009-02-26T02:55:53.000+0000
Patch for EditorTest.php that make it fail in 1.7.5 and not fail in 1.7.5 after applying zf-4461.patch. Good.. 1.8 will be fine.. :)
Posted by Giorgio Sironi (giorgiosironi) on 2009-05-15T00:02:04.000+0000
New patch against 1.8 that adds also insertImage plugin. I recommend the inclusion in this branch.
Posted by Matthew Weier O'Phinney (matthew) on 2009-10-16T10:54:09.000+0000
Patch applied against trunk and 1.9 release branch; I added a unit test to verify the behavior as well.
Have you found an issue?
See the Overview section for more details.