Publish v6.2.0

This commit is contained in:
jos 2019-07-28 16:12:46 +02:00
parent 14cdd0e61b
commit ce7433fd46
12 changed files with 8062 additions and 5877 deletions

View File

@ -2,7 +2,7 @@
https://github.com/josdejong/jsoneditor https://github.com/josdejong/jsoneditor
## not yet published, version 6.2.0 ## 2019-07-28, version 6.2.0
- Implemented new mode `preview`, capable of working with large JSON documents - Implemented new mode `preview`, capable of working with large JSON documents
up to 500 MiB. up to 500 MiB.

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

67
dist/jsoneditor.css vendored
View File

@ -298,6 +298,50 @@ div.jsoneditor-outer.has-nav-bar.has-main-menu-bar {
padding-top: 61px; padding-top: 61px;
} }
div.jsoneditor.busy pre.jsoneditor-preview {
background: #f5f5f5;
color: #808080;
}
div.jsoneditor code.jsoneditor-preview {
background: none;
}
div.jsoneditor.jsoneditor-mode-preview pre.jsoneditor-preview {
width: 100%;
height: 100%;
box-sizing: border-box;
overflow: auto;
padding: 2px;
margin: 0;
white-space: pre-wrap;
word-break: break-all;
}
div.jsoneditor-busy {
position: absolute;
top: 15%;
left: 0;
box-sizing: border-box;
width: 100%;
text-align: center;
display: none;
}
div.jsoneditor-busy span {
background-color: #FFFFAB;
border: 1px solid yellow;
border-radius: 3px;
padding: 5px 15px;
box-shadow: 0 0 5px rgba(0,0,0,0.4);
}
div.jsoneditor.busy div.jsoneditor-busy {
display: inherit;
}
textarea.jsoneditor-text, textarea.jsoneditor-text,
.ace-jsoneditor { .ace-jsoneditor {
min-height: 150px; min-height: 150px;
@ -369,7 +413,8 @@ div.jsoneditor-value,
div.jsoneditor td, div.jsoneditor td,
div.jsoneditor th, div.jsoneditor th,
div.jsoneditor textarea, div.jsoneditor textarea,
.jsoneditor-schema-error { div.jsoneditor pre.jsoneditor-preview,
div.jsoneditor .jsoneditor-schema-error {
font-family: "dejavu sans mono", "droid sans mono", consolas, monaco, "lucida console", "courier new", courier, monospace, sans-serif; font-family: "dejavu sans mono", "droid sans mono", consolas, monaco, "lucida console", "courier new", courier, monospace, sans-serif;
font-size: 10pt; font-size: 10pt;
color: #1A1A1A; color: #1A1A1A;
@ -547,6 +592,11 @@ div.jsoneditor-tree .jsoneditor-button.jsoneditor-schema-error {
overflow-y: auto; overflow-y: auto;
} }
.jsoneditor .jsoneditor-validation-errors {
width: 100%;
overflow: hidden;
}
.jsoneditor .jsoneditor-additional-errors { .jsoneditor .jsoneditor-additional-errors {
position: absolute; position: absolute;
margin: auto; margin: auto;
@ -581,6 +631,11 @@ div.jsoneditor-tree .jsoneditor-button.jsoneditor-schema-error {
vertical-align: middle; vertical-align: middle;
} }
.jsoneditor .jsoneditor-text-errors td pre {
margin: 0;
white-space: normal;
}
.jsoneditor .jsoneditor-text-errors tr { .jsoneditor .jsoneditor-text-errors tr {
background-color: #ffef8b; background-color: #ffef8b;
} }
@ -1458,7 +1513,6 @@ div.jsoneditor-treepath span.jsoneditor-treepath-seperator:hover {
div.jsoneditor-statusbar { div.jsoneditor-statusbar {
line-height: 26px; line-height: 26px;
height: 26px; height: 26px;
margin-top: -1px;
color: #808080; color: #808080;
background-color: #ebebeb; background-color: #ebebeb;
border-top: 1px solid #d3d3d3; border-top: 1px solid #d3d3d3;
@ -1468,8 +1522,9 @@ div.jsoneditor-statusbar {
font-size: 10pt; font-size: 10pt;
} }
div.jsoneditor-statusbar > .jsoneditor-curserinfo-label { div.jsoneditor-statusbar > .jsoneditor-curserinfo-label,
margin: 0 2px 0 4px; div.jsoneditor-statusbar > .jsoneditor-size-info {
margin: 0 4px;
} }
div.jsoneditor-statusbar > .jsoneditor-curserinfo-val { div.jsoneditor-statusbar > .jsoneditor-curserinfo-val {
@ -1504,6 +1559,10 @@ div.jsoneditor-statusbar > .jsoneditor-parse-error-icon {
margin: 1px; margin: 1px;
background: url("img/jsoneditor-icons.svg") -25px 0px; background: url("img/jsoneditor-icons.svg") -25px 0px;
} }
div.jsoneditor-statusbar .jsoneditor-array-info a {
color: inherit;
}
div.jsoneditor-navigation-bar { div.jsoneditor-navigation-bar {
width: 100%; width: 100%;
height: 26px; height: 26px;

7219
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

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{ {
"name": "jsoneditor", "name": "jsoneditor",
"version": "6.1.0", "version": "6.2.0",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {

View File

@ -1,6 +1,6 @@
{ {
"name": "jsoneditor", "name": "jsoneditor",
"version": "6.1.0", "version": "6.2.0",
"main": "./index", "main": "./index",
"description": "A web-based tool to view, edit, format, and validate JSON", "description": "A web-based tool to view, edit, format, and validate JSON",
"tags": [ "tags": [

View File

@ -0,0 +1,75 @@
<!DOCTYPE HTML>
<html>
<head>
<title>JSONEditor | Load and save</title>
<link href="../dist/jsoneditor.css" rel="stylesheet" type="text/css">
<script src="../dist/jsoneditor.js"></script>
<script src="https://bgrins.github.io/filereader.js/filereader.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/FileSaver.js/2014-11-29/FileSaver.min.js"></script>
<style>
html, body {
font: 11pt sans-serif;
}
#jsoneditor {
width: 500px;
height: 500px;
}
</style>
</head>
<body>
<h1>Load and save JSON documents</h1>
<p>
This examples uses HTML5 to load/save local files.
Powered by <a href="http://bgrins.github.io/filereader.js/">FileReader.js</a> and
<a href="https://github.com/eligrey/FileSaver.js">FileSaver.js</a>.<br>
Only supported on modern browsers (Chrome, FireFox, IE10+, Safari 6.1+, Opera 15+).
</p>
<p>
Load a JSON document: <input type="file" id="loadDocument" value="Load"/>
</p>
<p>
Save a JSON document: <input type="button" id="saveDocument" value="Save" />
</p>
<div id="jsoneditor"></div>
<script>
// create the editor
var editor = new JSONEditor(document.getElementById('jsoneditor'));
// Load a JSON document
FileReaderJS.setupInput(document.getElementById('loadDocument'), {
readAsDefault: 'Text',
on: {
load: function (event, file) {
editor.setText(event.target.result);
}
}
});
// Save a JSON document
document.getElementById('saveDocument').onclick = function () {
// Save Dialog
fname = window.prompt("Save as...");
// Check json extension in file name
if(fname.indexOf(".")==-1){
fname = fname + ".json";
}else{
if(fname.split('.').pop().toLowerCase() == "json"){
// Nothing to do
}else{
fname = fname.split('.')[0] + ".json";
}
}
var blob = new Blob([editor.getText()], {type: 'application/json;charset=utf-8'});
saveAs(blob, fname);
};
</script>
</body>
</html>