Released v5.6.0

This commit is contained in:
jos 2017-04-15 12:28:46 +02:00
parent 09c1375c84
commit 56c450bf0f
13 changed files with 7405 additions and 7535 deletions

View File

@ -3,11 +3,18 @@
https://github.com/josdejong/jsoneditor
## not yet released, version 5.5.12
## 2017-04-15, version 5.6.0
- Fixed #309: already loaded version of Ace being overwritten by the embedded
version of JSONEditor.
- Implemented readonly option for modes `text` and `code.`
Thanks @walkerrandolphsmith.
- Upgraded dependencies (`brance` and `ajv`) to the latest versions.
- Fixed not being able to move focus to enum select box when clicking
a JSON Schema warning.
- Fixed #309: already loaded version of Ace being overwritten by the
embedded version of JSONEditor.
- Fixed #368: Mode selection drop down not fully visible on small screen.
- Fixed #253: Optimize the input experience of Chinese IME.
Thanks @chinesedfan.
## 2017-01-06, version 5.5.11

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1
dist/jsoneditor.css vendored
View File

@ -205,7 +205,6 @@ div.jsoneditor {
box-sizing: border-box;
width: 100%;
height: 100%;
overflow: hidden;
position: relative;
padding: 0;
line-height: 100%;

14420
dist/jsoneditor.js vendored

File diff suppressed because one or more lines are too long

2
dist/jsoneditor.map vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -54,7 +54,11 @@ Constructs a new JSONEditor.
- `{function} onEditable`
Set a callback function to determine whether individual nodes are editable or read-only. Only applicable when option `mode` is `tree`. The callback is invoked as `editable(node)`, where `node` is an object `{field: string, value: string, path: string[]}`. The function must either return a boolean value to set both the nodes field and value editable or read-only, or return an object `{field: boolean, value: boolean}`.
Set a callback function to determine whether individual nodes are editable or read-only. Only applicable when option `mode` is `tree`, `text`, or `code`.
In case of mode `tree`, the callback is invoked as `editable(node)`, where `node` is an object `{field: string, value: string, path: string[]}`. The function must either return a boolean value to set both the nodes field and value editable or read-only, or return an object `{field: boolean, value: boolean}` to set set the read-only attribute for field and value individually.
In modes `text` and `code`, the callback is invoked as `editable(node)` where `node` is an empty object (no field, value, or path). In that case the function can return false to make the text or code editor completely read-only.
- `{function} onError`

View File

@ -43,8 +43,12 @@
var options = {
mode: 'text',
modes: ['text', 'code'],
onEditable: function() { //absence of key makes the text area not readOnly
return false; // returning false makes the text area readOnly
onEditable: function (node) {
if (!node.path) {
// In modes code and text, node is empty: no path, field, or value
// returning false makes the text area read-only
return false;
}
},
onError: function (err) {
alert(err.toString());

View File

@ -70,7 +70,8 @@ function minify(name) {
var result = uglify.minify([DIST + '/' + name + '.js'], {
outSourceMap: name + '.map',
output: {
comments: /@license/
comments: /@license/,
max_line_len: 64000 // extra large because we have embedded code for workers
}
});

View File

@ -1,6 +1,6 @@
{
"name": "jsoneditor",
"version": "5.5.11",
"version": "5.6.0",
"main": "./index",
"description": "A web-based tool to view, edit, format, and validate JSON",
"tags": [
@ -23,20 +23,20 @@
"test": "mocha test"
},
"dependencies": {
"ajv": "3.8.8",
"ajv": "4.11.6",
"brace": "0.10.0",
"javascript-natural-sort": "0.7.1"
},
"devDependencies": {
"gulp": "3.9.1",
"gulp-clean-css": "2.0.5",
"gulp-concat-css": "2.2.0",
"gulp-shell": "0.5.2",
"gulp-util": "3.0.7",
"gulp-clean-css": "3.0.4",
"gulp-concat-css": "2.3.0",
"gulp-shell": "0.6.3",
"gulp-util": "3.0.8",
"json-loader": "0.5.4",
"mkdirp": "0.5.1",
"mocha": "2.4.5",
"uglify-js": "2.6.2",
"mocha": "3.2.0",
"uglify-js": "2.8.22",
"webpack": "1.12.14"
}
}