misc: handle ckeditor jquery adapter failing to load

This commit is contained in:
Frédéric Péters 2015-10-06 16:28:15 +02:00
parent b707e9591e
commit 4c02e6861c
1 changed files with 4 additions and 0 deletions

View File

@ -8,6 +8,10 @@ $(document).ready( function() {
/* bail out if ckeditor advertised itself as not supported */
return;
}
if (typeof($.ckeditor) === 'undefined') {
/* the jquery adapter couldn't be loaded, don't bother failing further down */
return;
}
$('div.WysiwygTextWidget textarea').ckeditor({allowedContent: true});
if ($('.block-edit-custom-text').length > 0) {
$('.block-edit-custom-text a.edit-custom-text').hide();