// Define a rich text editor.
// example: <textarea crm-ui-id="myForm.body_html" crm-ui-richtext name="body_html" ng-model="mailing.body_html"></textarea>
- // WISHLIST: use ngModel
.directive('crmUiRichtext', function ($timeout) {
return {
require: '?ngModel',
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());