Skip to content
This repository has been archived by the owner. It is now read-only.

Made ui-codemirror work with updateOn: 'blur' #104

Open
wants to merge 1 commit into
base: master
from

Conversation

@jasonreich
Copy link

jasonreich commented Aug 11, 2015

Adjusted slightly to respect "updateOn" ngModelOption attributes. Previously, if one specified {updateOn: 'blur'}, the model would never update.

The specific changes are;

  1. A modification of `src/ui-codemirror.js' to add the necessary debounce and commit code (follows that in angular's ngmodel directive).
  2. An additional unit test for the {updateOn: 'blur'} case.
@floribon
Copy link

floribon commented Aug 4, 2016

+1 this is really needed, has uiCodemirror development being abandoned?

@boutils
Copy link

boutils commented Oct 25, 2016

Workaround here:

$scope.editorOptions = {
    onLoad: function(editor) {
        editor.on('blur', function() {
            $scope.myModel = editor.getValue();
        })
    }
}
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.