@json-editor/json-editor 2.8.0 → 2.9.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +5 -1
- package/README.md +14 -2
- package/dist/jsoneditor.js +2 -2
- package/dist/nonmin/jsoneditor.js +267 -44
- package/dist/nonmin/jsoneditor.js.map +1 -1
- package/package.json +1 -1
- package/src/schemaloader.js +112 -19
- package/tests/codeceptjs/core_test.js +21 -0
- package/tests/pages/references.html +6 -0
- package/tests/unit/schemaloader.spec.js +108 -2
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -139,6 +139,16 @@ Here are all the available options:
|
|
|
139
139
|
<td>If <code>true</code>, JSON Editor will make ajax call with [credentials](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/withCredentials).</td>
|
|
140
140
|
<td><code>false</code></td>
|
|
141
141
|
</tr>
|
|
142
|
+
<tr>
|
|
143
|
+
<td>ajax_cache_responses</td>
|
|
144
|
+
<td>If <code>true</code>, JSON Editor will cache external URLs' schemas in <code>localStorage</code> to avoid subsequent ajax calls.</td>
|
|
145
|
+
<td><code>false</code></td>
|
|
146
|
+
</tr>
|
|
147
|
+
<tr>
|
|
148
|
+
<td>ajax_cache_buster</td>
|
|
149
|
+
<td>If <code>ajax_cache_responses</code> is enabled, use this string to invalidate stale caches. E.g., this value should be changed when schemas are updated.</td>
|
|
150
|
+
<td>Current date in simplied ISO-8601 format (e.g., "2011-10-05" for October 5, 2011).</td>
|
|
151
|
+
</tr>
|
|
142
152
|
<tr>
|
|
143
153
|
<td>compact</td>
|
|
144
154
|
<td>If <code>true</code>, the label will not be displayed/added.</td>
|
|
@@ -886,8 +896,10 @@ Creates a button whose click callback can be defined in `JSONEditor.defaults.cal
|
|
|
886
896
|
|
|
887
897
|
- `icon`: Renders an icon into the button. Must be supported by the iconLib used.
|
|
888
898
|
- `validated`: With `true` the button is disabled until the whole editor is valid.
|
|
889
|
-
- `action`: the name of the callback that will be invoked when the button is clicked.
|
|
890
|
-
|
|
899
|
+
- `action`: the name of the callback that will be invoked when the button is clicked.
|
|
900
|
+
|
|
901
|
+
> **Warning**
|
|
902
|
+
> For the form to render properly all callbacks used in `action`s must also be defined in `JSONEditor.defaults.callbacks`.
|
|
891
903
|
|
|
892
904
|
```js
|
|
893
905
|
JSONEditor.defaults.callbacks = {
|