From 947d5553409291938e786f5bc812770da02b957a Mon Sep 17 00:00:00 2001 From: Trevor Dixon Date: Fri, 23 May 2014 13:16:07 -0600 Subject: [PATCH] Emit ckeditor.ready event instead of broadcasting and send instance --- ng-ckeditor.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ng-ckeditor.js b/ng-ckeditor.js index 8198495..b0e8d76 100644 --- a/ng-ckeditor.js +++ b/ng-ckeditor.js @@ -107,7 +107,7 @@ app.directive('ckeditor', ['$timeout', '$q', function ($timeout, $q) { //instance.on('key', setModelData); // for source view instance.on('instanceReady', function() { - scope.$broadcast("ckeditor.ready"); + scope.$emit("ckeditor.ready", instance); scope.$apply(function() { onUpdateModelData(true); }); @@ -139,4 +139,4 @@ app.directive('ckeditor', ['$timeout', '$q', function ($timeout, $q) { }]); return app; -})); \ No newline at end of file +}));