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

Commit 7fa0a49

Browse files
committed
Move function up for jshint
1 parent f25bf79 commit 7fa0a49

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

src/tinymce.js

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,22 @@ angular.module('ui.tinymce', [])
3232
}
3333
};
3434

35+
function toggleDisable(disabled) {
36+
if (disabled) {
37+
ensureInstance();
38+
39+
if (tinyInstance) {
40+
tinyInstance.getBody().setAttribute('contenteditable', false);
41+
}
42+
} else {
43+
ensureInstance();
44+
45+
if (tinyInstance) {
46+
tinyInstance.getBody().setAttribute('contenteditable', true);
47+
}
48+
}
49+
}
50+
3551
// generate an ID
3652
attrs.$set('id', ID_ATTR + '-' + generatedIds++);
3753

@@ -155,22 +171,6 @@ angular.module('ui.tinymce', [])
155171
tinyInstance = tinymce.get(attrs.id);
156172
}
157173
}
158-
159-
function toggleDisable(disabled) {
160-
if (disabled) {
161-
ensureInstance();
162-
163-
if (tinyInstance) {
164-
tinyInstance.getBody().setAttribute('contenteditable', false);
165-
}
166-
} else {
167-
ensureInstance();
168-
169-
if (tinyInstance) {
170-
tinyInstance.getBody().setAttribute('contenteditable', true);
171-
}
172-
}
173-
}
174174
}
175175
};
176176
}]);

0 commit comments

Comments
 (0)