diff options
Diffstat (limited to 'js/vendor/angular-ui/modules/directives/tinymce/tinymce.js')
-rw-r--r-- | js/vendor/angular-ui/modules/directives/tinymce/tinymce.js | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/js/vendor/angular-ui/modules/directives/tinymce/tinymce.js b/js/vendor/angular-ui/modules/directives/tinymce/tinymce.js deleted file mode 100644 index a91f1ad34..000000000 --- a/js/vendor/angular-ui/modules/directives/tinymce/tinymce.js +++ /dev/null @@ -1,53 +0,0 @@ -/** - * Binds a TinyMCE widget to <textarea> elements. - */ -angular.module('ui.directives').directive('uiTinymce', ['ui.config', function (uiConfig) { - uiConfig.tinymce = uiConfig.tinymce || {}; - return { - require: 'ngModel', - link: function (scope, elm, attrs, ngModel) { - var expression, - options = { - // Update model on button click - onchange_callback: function (inst) { - if (inst.isDirty()) { - inst.save(); - ngModel.$setViewValue(elm.val()); - if (!scope.$$phase) - scope.$apply(); - } - }, - // Update model on keypress - handle_event_callback: function (e) { - if (this.isDirty()) { - this.save(); - ngModel.$setViewValue(elm.val()); - if (!scope.$$phase) - scope.$apply(); - } - return true; // Continue handling - }, - // Update model when calling setContent (such as from the source editor popup) - setup: function (ed) { - ed.onSetContent.add(function (ed, o) { - if (ed.isDirty()) { - ed.save(); - ngModel.$setViewValue(elm.val()); - if (!scope.$$phase) - scope.$apply(); - } - }); - } - }; - if (attrs.uiTinymce) { - expression = scope.$eval(attrs.uiTinymce); - } else { - expression = {}; - } - angular.extend(options, uiConfig.tinymce, expression); - setTimeout(function () { - elm.tinymce(options); - }); - } - }; -}]); |