Commit 268e8999 authored by nikunjkotecha's avatar nikunjkotecha Committed by nikunj
Browse files

Issue #2906791 by Yannick Bloemen, aBrookland, Roman.UCLU, nikunjkotecha,...

Issue #2906791 by Yannick Bloemen, aBrookland, Roman.UCLU, nikunjkotecha, Spokje, Harshendra Baghel, aaron.ferris, DrColossos: clientside_validation.ckeditor.js is loaded on pages without CKEditor, triggering a JS error
parent d7bf1c5a
if (typeof CKEDITOR === 'undefined') {
var CKEDITOR = null;
}
(function (Drupal, $, CKEDITOR) {
Drupal.behaviors.cvCKEDITOR = {
attach: function () {
// Some custom or contrib module might trick the code by using ckeditor
// in file name or ckeditor js might not be loaded properly.
// Do nothing if that's the case.
if (typeof CKEDITOR === 'undefined' || CKEDITOR === null) {
return;
}
$(document).bind('clientsideValidationAlterOptions', function (e, options, form_id) {
if (!Drupal.settings.clientsideValidation.forms[form_id].includeHidden) {
// Do not validate hidden fields. Fix ckeditor instances.
......@@ -76,5 +87,3 @@
}
};
})(Drupal, jQuery, CKEDITOR);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment