Skip to content
This repository was archived by the owner on Sep 8, 2020. It is now read-only.

Commit 03db243

Browse files
author
Dean Sofer
committed
v0.0.1 unstable
1 parent 5c2670d commit 03db243

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/tinymce.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/**
22
* Binds a TinyMCE widget to <textarea> elements.
33
*/
4-
angular.module('ui.directives').directive('uiTinymce', ['ui.config', function (uiConfig) {
5-
uiConfig.tinymce = uiConfig.tinymce || {};
4+
angular.module('ui.tinymce', []).directive('uiTinymce', ['uiTinymceConfig', function (uiTinymceConfig) {
5+
uiTinymceConfig = uiTinymceConfig || {};
66
return {
77
require: 'ngModel',
88
link: function (scope, elm, attrs, ngModel) {
@@ -44,7 +44,7 @@ angular.module('ui.directives').directive('uiTinymce', ['ui.config', function (u
4444
} else {
4545
expression = {};
4646
}
47-
angular.extend(options, uiConfig.tinymce, expression);
47+
angular.extend(options, uiTinymceConfig, expression);
4848
setTimeout(function () {
4949
elm.tinymce(options);
5050
});

test/tinymceSpec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ describe('uiTinymce', function () {
66
beforeEach(module('ui'));
77
beforeEach(function () {
88
// throw some garbage in the tinymce cfg to be sure it's getting thru to the directive
9-
angular.module('ui.config').value('ui.config', {tinymce: {bar: 'baz'}});
9+
angular.module('ui.tinymce').value('uiTinymceConfig', {tinymce: {bar: 'baz'}});
1010
});
1111
beforeEach(inject(function (_$rootScope_, _$compile_) {
1212
scope = _$rootScope_.$new();
1313
$compile = _$compile_;
1414
}));
1515

1616
afterEach(function () {
17-
angular.module('ui.config').value('ui.config', {}); // cleanup
17+
angular.module('ui.tinymce').value('uiTinymceConfig', {}); // cleanup
1818
});
1919

2020
/**

0 commit comments

Comments
 (0)