Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

importing the fix for ZF-5711 #309

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion library/Zend/Dojo/View/Helper/Editor.php
Expand Up @@ -62,7 +62,7 @@ class Editor extends Dijit
* JSON-encoded parameters
* @var array
*/
protected $_jsonParams = array('captureEvents', 'events', 'plugins');
protected $_jsonParams = array('captureEvents', 'events', 'plugins', 'extraPlugins');

/**
* dijit.Editor
Expand Down
10 changes: 10 additions & 0 deletions tests/Zend/Dojo/View/Helper/EditorTest.php
Expand Up @@ -179,4 +179,14 @@ public function testHelperShouldOnlyUseTextareaInNoscriptTag()
$html = $this->helper->direct('foo');
$this->assertRegexp('#<noscript><textarea[^>]*>#', $html, $html);
}

/** @group ZF-5711 */
public function testHelperShouldJsonifyExtraPlugins()
{
$extraPlugins = array('copy', 'cut', 'paste');
$html = $this->helper->direct('foo', '', array('extraPlugins' => $extraPlugins));
$pluginsString = Json::encode($extraPlugins);
$pluginsString = str_replace('"', "'", $pluginsString);
$this->assertContains('extraPlugins="' . $pluginsString . '"', $html);
}
}