Have the preview test file actually load `preview` mode

This commit is contained in:
jos 2019-12-27 22:31:01 +01:00
parent 4937337147
commit c059fdb543
1 changed files with 5 additions and 3 deletions

View File

@ -1,7 +1,7 @@
<!DOCTYPE HTML> <!DOCTYPE HTML>
<html> <html>
<head> <head>
<title>JSONEditor | Load and save</title> <title>JSONEditor | Preview mode load and save</title>
<link href="../dist/jsoneditor.css" rel="stylesheet" type="text/css"> <link href="../dist/jsoneditor.css" rel="stylesheet" type="text/css">
<script src="../dist/jsoneditor.js"></script> <script src="../dist/jsoneditor.js"></script>
@ -20,7 +20,7 @@
</style> </style>
</head> </head>
<body> <body>
<h1>Load and save JSON documents</h1> <h1>Load and save JSON documents in Preview mode</h1>
<p> <p>
This examples uses HTML5 to load/save local files. This examples uses HTML5 to load/save local files.
Powered by <a href="http://bgrins.github.io/filereader.js/">FileReader.js</a> and Powered by <a href="http://bgrins.github.io/filereader.js/">FileReader.js</a> and
@ -38,7 +38,9 @@
<script> <script>
// create the editor // create the editor
var editor = new JSONEditor(document.getElementById('jsoneditor')); var editor = new JSONEditor(document.getElementById('jsoneditor'), {
mode: 'preview'
});
// Load a JSON document // Load a JSON document
FileReaderJS.setupInput(document.getElementById('loadDocument'), { FileReaderJS.setupInput(document.getElementById('loadDocument'), {