public function run()
{
$view = $this->getView();
JsoneditorAsset::register($view);
$editorName = BaseInflector::camelize($this->id) . 'Editor';
$view->registerJs("var container = document.getElementById('" . $this->options['id'] . "');\n var options = " . Json::encode($this->editorOptions) . ";\n var json = " . $this->value . ";\n " . $editorName . " = new JSONEditor(container, options, json);\n jQuery('#" . $this->id . "').parents('form').eq(0).submit(function() {\n jQuery('#" . $this->id . "').val(" . $editorName . ".getText());\n return true;\n });");
echo Html::hiddenInput($this->name, $this->value, ['id' => $this->id]);
echo Html::tag('div', '', $this->options);
}