Skip to content

Commit

Permalink
fix issues #8
Browse files Browse the repository at this point in the history
  • Loading branch information
dungphanxuan committed Jun 25, 2016
1 parent 50638a0 commit b185e58
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions FroalaEditorWidget.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,12 @@ public function registerClientScript()
} else {
$pluginsEnabled = array_diff($this->clientPlugins, $this->excludedPlugins ?: []);
}
if(!empty($pluginsEnabled)){
foreach($pluginsEnabled as $key =>$item){
$pluginsEnabled[$key] = lcfirst (yii\helpers\Inflector::camelize($item));
}
}

$jsOptions = array_merge($this->clientOptions, $pluginsEnabled ? ['pluginsEnabled' => $pluginsEnabled] : []);
$jsOptions = Json::encode($jsOptions);

Expand Down

0 comments on commit b185e58

Please sign in to comment.