From b185e581e82e8d8406abab6ad93d8f7176e1555b Mon Sep 17 00:00:00 2001 From: dungpx Date: Sat, 25 Jun 2016 11:09:26 +0700 Subject: [PATCH 1/2] fix issues #8 --- FroalaEditorWidget.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/FroalaEditorWidget.php b/FroalaEditorWidget.php index d72e4e7..b6f6998 100644 --- a/FroalaEditorWidget.php +++ b/FroalaEditorWidget.php @@ -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); From 4651ff2ebe19cf20138cbc4300af014df6e140e1 Mon Sep 17 00:00:00 2001 From: cshehadi Date: Tue, 12 Jul 2016 11:20:31 -0400 Subject: [PATCH 2/2] Add iframeStyleFiles to initClientOptions --- FroalaEditorWidget.php | 1 + 1 file changed, 1 insertion(+) diff --git a/FroalaEditorWidget.php b/FroalaEditorWidget.php index b6f6998..21cba70 100644 --- a/FroalaEditorWidget.php +++ b/FroalaEditorWidget.php @@ -160,6 +160,7 @@ protected function initClientOptions() 'htmlSimpleAmpersand', 'iframe', 'iframeStyle', + 'iframeStyleFiles', 'imageAllowedTypes', 'imageAltButtons', 'imageDefaultAlign',