Skip to content

Commit

Permalink
Merge pull request #26 from dmstr/feature/plugin-asset-option
Browse files Browse the repository at this point in the history
JsonEditorWidget: add registerPluginAsset option
  • Loading branch information
marc7000 authored Nov 18, 2021
2 parents bb108e8 + 345bb51 commit 94a0510
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/JsonEditorWidget.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,13 @@ class JsonEditorWidget extends BaseWidget
*/
public $language = null;

/**
* if true JsonEditorPluginsAsset will be registered
*
* @var bool
*/
public $registerPluginAsset = false;

/**
* If true, a hidden input will be rendered to contain the results
* @var boolean
Expand Down Expand Up @@ -110,6 +117,9 @@ public function init()
}

parent::init();
if ($this->registerPluginAsset) {
JsonEditorPluginsAsset::register($this->getView());
}
JsonEditorAsset::register($this->getView());
}

Expand Down

0 comments on commit 94a0510

Please sign in to comment.