Merge pull request #137 from natejlong/master
Fix ckeditor-init.js by giving it access to a valid jQuery instance, along with other minor changes to ckeditor-init.js
This commit is contained in:
commit
5ebc347a54
|
@ -1,14 +1,15 @@
|
|||
;(function() {
|
||||
var $ = $ || django.jQuery;
|
||||
$(function() {
|
||||
initialiseCKEditor();
|
||||
initialiseCKEditorInInlinedForms();
|
||||
|
||||
function initialiseCKEditorInInlinedForms() {
|
||||
$(".add-row a, .grp-add-handler").click(function () {
|
||||
$(document).on("click", ".add-row a, .grp-add-handler", function () {
|
||||
initialiseCKEditor();
|
||||
return true;
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
function initialiseCKEditor() {
|
||||
$('textarea[data-type=ckeditortype]').each(function(){
|
||||
|
@ -17,4 +18,6 @@ function initialiseCKEditor() {
|
|||
CKEDITOR.replace($(this).attr('id'), $(this).data('config'));
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
});
|
||||
}());
|
||||
|
|
Loading…
Reference in New Issue