Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/FroalaEditorAsset.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use yii\base\Exception;
use yii\helpers\ArrayHelper;
use yii\helpers\Inflector;
use yii\web\AssetBundle;

/**
Expand Down Expand Up @@ -61,6 +62,10 @@ public function registerClientPlugins($clientPlugins, $excludedPlugins)
{
$pluginNames = [];
if (is_array($clientPlugins)) {
// documentation lists plugins in CamelCase, but this Asset code expects underscore, so convert to underscore
$clientPlugins = array_map(function ($plugin) {
return is_array($plugin) ? $plugin : Inflector::underscore($plugin);
}, $clientPlugins);
if (ArrayHelper::isIndexed($clientPlugins, true)) {
// sequential array = list of plugins to be included
// use default configurations for every plugin
Expand Down