Skip to content

Commit

Permalink
Update documentation and version bump to 0.7.11
Browse files Browse the repository at this point in the history
  • Loading branch information
jdorn committed Sep 28, 2014
1 parent 80a4d4e commit a4c17cf
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 16 deletions.
17 changes: 12 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ Instead of getting/setting the value of the entire editor, you can also work on
// Get a reference to a node within the editor
var name = editor.getEditor('root.name');

// name will be null if the path is invalid
// `getEditor` will return null if the path is invalid
if(name) {
name.setValue("John Smith");

Expand All @@ -199,7 +199,9 @@ if(name) {

### Validate

When feasible, JSON Editor won't let users enter invalid data.
When feasible, JSON Editor won't let users enter invalid data. This is done by
using input masks and intelligently enabling/disabling controls.

However, in some cases it is still possible to enter data that doesn't validate against the schema.

You can use the `validate` method to check if the data is valid or not.
Expand Down Expand Up @@ -277,7 +279,7 @@ if(editor.isEnabled()) alert("It's editable!");

### Destroy

This removes the editor HTML from the DOM and frees up memory.
This removes the editor HTML from the DOM and frees up resources.

```javascript
editor.destroy();
Expand Down Expand Up @@ -423,7 +425,7 @@ Show a video preview (using HTML5 video)
}
```

The `href` property is a template that gets re-evaluated everytime the value changes.
The `href` property is a template that gets re-evaluated every time the value changes.
The variable `self` is always available. Look at the __Dependencies__ section below for how to include other fields or use a custom template engine.

### Property Ordering
Expand Down Expand Up @@ -495,7 +497,6 @@ JSON Editor uses HTML5 input types, so some of these may render as basic text in
* datetime
* datetime-local
* email
* hidden
* month
* number
* range
Expand Down Expand Up @@ -536,6 +537,12 @@ __SCEditor__ provides WYSIWYG editing of HTML and BBCode. To use it, set the fo
}
```

You can configure SCEditor by setting configuration options in `JSONEditor.plugins.sceditor`. Here's an example:

```js
JSONEditor.plugins.sceditor.emoticonsEnabled = false;
```

__EpicEditor__ is a simple Markdown editor with live preview. To use it, set the format to `markdown`:

```json
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "json-editor",
"version": "0.7.10",
"version": "0.7.11",
"authors": [
"Jeremy Dorn <[email protected]>"
],
Expand Down
9 changes: 5 additions & 4 deletions dist/jsoneditor.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*! JSON Editor v0.7.10 - JSON Schema -> HTML Editor
/*! JSON Editor v0.7.11 - JSON Schema -> HTML Editor
* By Jeremy Dorn - https://github.com/jdorn/json-editor/
* Released under the MIT license
*
* Date: 2014-09-15
* Date: 2014-09-28
*/

/**
Expand Down Expand Up @@ -153,8 +153,9 @@ var $extend = function(destination) {
for(i=1; i<arguments.length; i++) {
source = arguments[i];
for (property in source) {
if(!source.hasOwnProperty(property)) continue;
if(source[property] && $isplainobject(source[property])) {
destination[property] = destination[property] || {};
if(!destination.hasOwnProperty(property)) destination[property] = {};
$extend(destination[property], source[property]);
}
else {
Expand Down Expand Up @@ -1366,7 +1367,7 @@ JSONEditor.AbstractEditor = Class.extend({
};

this.register();
if(this.schema.watch) {
if(this.schema.hasOwnProperty('watch')) {
var path,path_parts,first,root,adjusted_path;

for(var name in this.schema.watch) {
Expand Down
6 changes: 3 additions & 3 deletions dist/jsoneditor.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "json-editor",
"title": "JSONEditor",
"description": "JSON Schema based editor",
"version": "0.7.10",
"version": "0.7.11",
"main": "dist/jsoneditor.js",
"author": {
"name": "Jeremy Dorn",
Expand Down
4 changes: 2 additions & 2 deletions src/intro.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*! JSON Editor v0.7.10 - JSON Schema -> HTML Editor
/*! JSON Editor v0.7.11 - JSON Schema -> HTML Editor
* By Jeremy Dorn - https://github.com/jdorn/json-editor/
* Released under the MIT license
*
* Date: 2014-09-15
* Date: 2014-09-28
*/

/**
Expand Down

0 comments on commit a4c17cf

Please sign in to comment.