Hi,
I have a problem loading the page on Chrome 27.
Randomly, CKEditor generates a javascript error "Cannot call method 'getComputedStyle' of undefined" and it is grayed out.
My code below:
for(name in CKEDITOR.instances)
CKEDITOR.instances[name].destroy()
CKEDITOR.disableAutoInline = true;
$('textarea.input_cke').each(function(){
var classList = $(this).attr('class').split(/\s+/), tbCKE='Module', heightCKE=350, idCKE;
$.each( classList, function(index, item){
if (item.indexOf('ckeTB_', 0)>-1)
tbCKE = item.substr(6, index.length);
if (item.indexOf('ckeHeight', 0)>-1)
heightCKE = parseInt(item.substr(9, index.length));
});
$(this).data('tbCKE',tbCKE);
idCKE = $(this).attr('id');
$(this).data('idCKE',idCKE);
if ($(this).hasClass('input_ckeInline')){
CKEDITOR.inline($(this).data('idCKE'), {
toolbar :$(this).data('tbCKE'),
on: {
blur: function( event ) {
if ($('#hid_'+idCKE).length>0)
$('#hid_'+idCKE).val(event.editor.getData());
}
}
});
} else {
if (CKEDITOR.instances[$(this).data('idCKE')])
CKEDITOR.remove(CKEDITOR.instances[$(this).data('idCKE')]);
CKEDITOR.replace( $(this).data('idCKE'), {
toolbar: $(this).data('tbCKE'),
height : heightCKE
});
}
});
Maybe being in a loop?
Thank you in advance for your suggestions,