jdorn/json-editor — pull request #72 by jdorn (2014-03-25 02:30:31+00:00)
Title: New API methods 'disable' and 'enable'

Let's say you have a configuration form and you want an 'override default' button. The configuration form would start grayed out and clicking the button would make it editable.

This requires two new methods, `enable` and `disable`.

```js
// Disable the editor initially
editor.disable();

// When the override default button is clicked, enable the form
$("#override_button").on('click', function() {
editor.enable();
});
```

It may make sense to add an option during initialization to start the editor disabled.

Child editors should also have a `disable` and `enable` method to enable the following:

```js
var name = editor.getEditor('root.name');
name.disable();
name.enable();
```

This in combination with the `watch` method opens up a lot of cool possibilities, like having the override button within the schema itself.