Skip to content

Commit

Permalink
Merge branch 'master' of github.com:froala/yii2-froala-editor
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanneculai committed Jul 21, 2016
2 parents ec861a5 + 3e53626 commit 3ec795f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 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 Expand Up @@ -154,6 +160,7 @@ protected function initClientOptions()
'htmlSimpleAmpersand',
'iframe',
'iframeStyle',
'iframeStyleFiles',
'imageAllowedTypes',
'imageAltButtons',
'imageDefaultAlign',
Expand Down

0 comments on commit 3ec795f

Please sign in to comment.