From 4826a88c3dc4b76a57179a6edea52d6b592a676b Mon Sep 17 00:00:00 2001 From: Romeo Disca Date: Thu, 22 Oct 2015 23:15:45 +0200 Subject: [PATCH] bugfix: upgrade for version 1.0.1 of redactor --- angular-redactor.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/angular-redactor.js b/angular-redactor.js index 5a106ae..c0144c3 100644 --- a/angular-redactor.js +++ b/angular-redactor.js @@ -31,7 +31,13 @@ }); }, options = { - changeCallback: updateModel + callbacks: { + change: function() { + if (scope.redactorLoaded) { + updateModel(this.code.get()); + } + } + } }, additionalOptions = attrs.redactor ? scope.$eval(attrs.redactor) : {}, @@ -45,7 +51,7 @@ options.changeCallback = function(value) { updateModel.call(this, value); changeCallback.call(this, value); - } + }; } // put in timeout to avoid $digest collision. call render() to