'LinkDialog', 'insertImage' => 'LinkDialog', 'fontName' => 'FontChoice', 'fontSize' => 'FontChoice', 'formatBlock' => 'FontChoice', 'foreColor' => 'TextColor', 'hiliteColor' => 'TextColor', 'enterKeyHandling' => 'EnterKeyHandling', 'fullScreen' => 'FullScreen', 'newPage' => 'NewPage', 'print' => 'Print', 'tabIndent' => 'TabIndent', 'toggleDir' => 'ToggleDir', 'viewSource' => 'ViewSource' ); /** * JSON-encoded parameters * @var array */ protected $_jsonParams = array('captureEvents', 'events', 'plugins', 'extraPlugins'); /** * dijit.Editor * * @param string $id * @param string $value * @param array $params * @param array $attribs * @return string */ public function editor($id, $value = null, $params = array(), $attribs = array()) { if (isset($params['plugins'])) { foreach ($this->_getRequiredModules($params['plugins']) as $module) { $this->dojo->requireModule($module); } } // Previous versions allowed specifying "degrade" to allow using a // textarea instead of a div -- but this is insecure. Removing the // parameter if set to prevent its injection in the dijit. if (isset($params['degrade'])) { unset($params['degrade']); } $hiddenName = $id; if (array_key_exists('id', $attribs)) { $hiddenId = $attribs['id']; } else { $hiddenId = $hiddenName; } $hiddenId = $this->_normalizeId($hiddenId); $textareaName = $this->_normalizeEditorName($hiddenName); $textareaId = $hiddenId . '-Editor'; $hiddenAttribs = array( 'id' => $hiddenId, 'name' => $hiddenName, 'value' => $value, 'type' => 'hidden', ); $attribs['id'] = $textareaId; $this->_createGetParentFormFunction(); $this->_createEditorOnSubmit($hiddenId, $textareaId); $attribs = $this->_prepareDijit($attribs, $params, 'textarea'); $html = '_htmlAttribs($attribs) . '>' . $value . "\n"; // Embed a textarea in a