From 079965882381097321bb9982a2d86eec73f18df4 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Wed, 11 Feb 2015 16:30:06 -0800 Subject: [PATCH] crmUiRichtext - Add support for ngBlur. --- js/angular-crm-ui.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/js/angular-crm-ui.js b/js/angular-crm-ui.js index d9f590678a..0330bb565f 100644 --- a/js/angular-crm-ui.js +++ b/js/angular-crm-ui.js @@ -279,7 +279,6 @@ // Define a rich text editor. // example: - // WISHLIST: use ngModel .directive('crmUiRichtext', function ($timeout) { return { require: '?ngModel', @@ -290,6 +289,14 @@ return; } + if (attr.ngBlur) { + ck.on('blur', function(){ + $timeout(function(){ + scope.$eval(attr.ngBlur); + }) + }); + } + ck.on('pasteState', function () { scope.$apply(function () { ngModel.$setViewValue(ck.getData()); -- 2.25.1