We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a93d87f + f73b21f commit 30d40cdCopy full SHA for 30d40cd
src/JsonEditorWidget.php
@@ -139,6 +139,8 @@ public function run()
139
140
// Add the "JSONEditor" instance to the global window object, otherwise the instance is only available in "ready()" function scope
141
$widgetJs = "window.{$widgetId} = new JSONEditor(document.getElementById('{$containerId}'), {$clientOptions});\n";
142
+ // Add the "JSONEditor" instance to the global window.jsonEditors array.
143
+ $widgetJs .= "if (!window.jsonEditors) { window.jsonEditors = []; } window.jsonEditors.push({$widgetId});";
144
145
$readyFunction = '';
146
try {
0 commit comments