Index: tests/Zend/Dojo/Form/Element/EditorTest.php =================================================================== --- tests/Zend/Dojo/Form/Element/EditorTest.php (revision 18678) +++ tests/Zend/Dojo/Form/Element/EditorTest.php (working copy) @@ -111,6 +111,13 @@ return $element; } + public function testShouldNotBeUsedWithTextarea() + { + $html = $this->element->render(); + $this->assertNotContains('textarea', $html, $html); + $this->assertContains('div', $html, $html); + } + public function testShouldRenderEditorDijit() { $html = $this->element->render(); Index: library/Zend/Dojo/View/Helper/Editor.php =================================================================== --- library/Zend/Dojo/View/Helper/Editor.php (revision 18678) +++ library/Zend/Dojo/View/Helper/Editor.php (working copy) @@ -21,7 +21,7 @@ */ /** Zend_Dojo_View_Helper_Textarea */ -require_once 'Zend/Dojo/View/Helper/Textarea.php'; +require_once 'Zend/Dojo/View/Helper/DijitContainer.php'; /** Zend_Json */ require_once 'Zend/Json.php'; @@ -35,7 +35,7 @@ * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ -class Zend_Dojo_View_Helper_Editor extends Zend_Dojo_View_Helper_Textarea +class Zend_Dojo_View_Helper_Editor extends Zend_Dojo_View_Helper_DijitContainer { /** * @param string Dijit type @@ -91,8 +91,8 @@ } $hiddenId = $this->_normalizeId($hiddenId); - $textareaName = $this->_normalizeEditorName($hiddenName); - $textareaId = $hiddenId . '-Editor'; + $divName = $this->_normalizeEditorName($hiddenName); + $divId = $hiddenId . '-Editor'; $hiddenAttribs = array( 'id' => $hiddenId, @@ -100,13 +100,13 @@ 'value' => $value, 'type' => 'hidden', ); - $attribs['id'] = $textareaId; + $attribs['id'] = $divId; $this->_createGetParentFormFunction(); - $this->_createEditorOnSubmit($hiddenId, $textareaId); + $this->_createEditorOnSubmit($hiddenId, $divId); $html = '_htmlAttribs($hiddenAttribs) . $this->getClosingBracket() - . $this->textarea($textareaName, $value, $params, $attribs); + . $this->_createLayoutContainer($divName, $value, $params, $attribs); return $html; }