Switched everything to 2-space indentation
This commit is contained in:
parent
8ddc6f3946
commit
8e07ebb711
|
@ -97,7 +97,7 @@
|
|||
|
||||
<!-- TODO: info, links, faq -->
|
||||
<!--
|
||||
<div class="info" style="display:none;">
|
||||
<div class="info" style="display:none;">
|
||||
JSON, or JavaScript Object Notation, is a lightweight text-based open standard
|
||||
designed for human-readable data interchange. It is derived from the JavaScript
|
||||
scripting language for representing simple data structures and associative arrays,
|
||||
|
@ -111,14 +111,14 @@
|
|||
and web application, serving as an alternative to XML.
|
||||
<br><br>
|
||||
From <a target="_blank" href="http://en.wikipedia.org/wiki/Json">Wikipedia</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="links" style="display:none;">
|
||||
<div class="links" style="display:none;">
|
||||
<a target="_blank" href="http://json.org/">http://json.org/</a><br>
|
||||
<a target="_blank" href="http://en.wikipedia.org/wiki/Json">http://en.wikipedia.org/wiki/Json</a><br>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="faq" style="display:none;"></div>
|
||||
<div class="faq" style="display:none;"></div>
|
||||
-->
|
||||
</div>
|
||||
|
||||
|
|
|
@ -130,7 +130,7 @@
|
|||
|
||||
<!-- TODO: info, links, faq -->
|
||||
<!--
|
||||
<div class="info" style="display:none;">
|
||||
<div class="info" style="display:none;">
|
||||
JSON, or JavaScript Object Notation, is a lightweight text-based open standard
|
||||
designed for human-readable data interchange. It is derived from the JavaScript
|
||||
scripting language for representing simple data structures and associative arrays,
|
||||
|
@ -144,14 +144,14 @@
|
|||
and web application, serving as an alternative to XML.
|
||||
<br><br>
|
||||
From <a target="_blank" href="http://en.wikipedia.org/wiki/Json">Wikipedia</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="links" style="display:none;">
|
||||
<div class="links" style="display:none;">
|
||||
<a target="_blank" href="http://json.org/">http://json.org/</a><br>
|
||||
<a target="_blank" href="http://en.wikipedia.org/wiki/Json">http://en.wikipedia.org/wiki/Json</a><br>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="faq" style="display:none;"></div>
|
||||
<div class="faq" style="display:none;"></div>
|
||||
-->
|
||||
</div>
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ Constructs a new JSONEditor.
|
|||
True by default.
|
||||
Only applicable when `mode` is 'tree', 'view', or 'form'.
|
||||
- `{Number} indentation`.
|
||||
Number of indentation spaces. 4 by default.
|
||||
Number of indentation spaces. 2 by default.
|
||||
Only applicable when `mode` is 'code' or 'text'.
|
||||
|
||||
- `{JSON} json`
|
||||
|
|
|
@ -11,13 +11,13 @@
|
|||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<p>
|
||||
<p>
|
||||
<button id="setJSON">Set JSON</button>
|
||||
<button id="getJSON">Get JSON</button>
|
||||
</p>
|
||||
<div id="jsoneditor"></div>
|
||||
</p>
|
||||
<div id="jsoneditor"></div>
|
||||
|
||||
<script type="text/javascript" >
|
||||
<script type="text/javascript" >
|
||||
// create the editor
|
||||
var container = document.getElementById('jsoneditor');
|
||||
var editor = new jsoneditor.JSONEditor(container);
|
||||
|
@ -40,6 +40,6 @@
|
|||
var json = editor.get();
|
||||
alert(JSON.stringify(json, null, 2));
|
||||
};
|
||||
</script>
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -13,12 +13,12 @@
|
|||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<p>
|
||||
<p>
|
||||
This editor is read-only (mode='viewer').
|
||||
</p>
|
||||
<div id="jsoneditor"></div>
|
||||
</p>
|
||||
<div id="jsoneditor"></div>
|
||||
|
||||
<script type="text/javascript" >
|
||||
<script type="text/javascript" >
|
||||
var container = document.getElementById('jsoneditor');
|
||||
|
||||
var options = {
|
||||
|
@ -35,6 +35,6 @@
|
|||
};
|
||||
|
||||
var editor = new jsoneditor.JSONEditor(container, options, json);
|
||||
</script>
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -10,10 +10,10 @@
|
|||
<script data-main="scripts/main" src="scripts/require.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<p>
|
||||
<p>
|
||||
<button id="setJSON">Set JSON</button>
|
||||
<button id="getJSON">Get JSON</button>
|
||||
</p>
|
||||
<div id="jsoneditor"></div>
|
||||
</p>
|
||||
<div id="jsoneditor"></div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1039,7 +1039,7 @@ TextEditor.prototype._create = function (container, options, json) {
|
|||
this.indentation = Number(options.indentation);
|
||||
}
|
||||
else {
|
||||
this.indentation = 4; // number of spaces
|
||||
this.indentation = 2; // number of spaces
|
||||
}
|
||||
this.mode = (options.mode == 'code') ? 'code' : 'text';
|
||||
if (this.mode == 'code') {
|
||||
|
|
|
@ -36,7 +36,7 @@ TextEditor.prototype._create = function (container, options, json) {
|
|||
this.indentation = Number(options.indentation);
|
||||
}
|
||||
else {
|
||||
this.indentation = 4; // number of spaces
|
||||
this.indentation = 2; // number of spaces
|
||||
}
|
||||
this.mode = (options.mode == 'code') ? 'code' : 'text';
|
||||
if (this.mode == 'code') {
|
||||
|
|
Loading…
Reference in New Issue