ui-codemirror
ui-codemirror copied to clipboard
Made ui-codemirror work with updateOn: 'blur'
Adjusted slightly to respect "updateOn" ngModelOption attributes. Previously, if one specified {updateOn: 'blur'}
, the model would never update.
The specific changes are;
- A modification of `src/ui-codemirror.js' to add the necessary debounce and commit code (follows that in angular's ngmodel directive).
- An additional unit test for the
{updateOn: 'blur'}
case.
+1 this is really needed, has uiCodemirror development being abandoned?
Workaround here:
$scope.editorOptions = {
onLoad: function(editor) {
editor.on('blur', function() {
$scope.myModel = editor.getValue();
})
}
}