diff --git a/includes/ckeditor.utils.js b/includes/ckeditor.utils.js index 6433c3d..8a92c96 100644 --- a/includes/ckeditor.utils.js +++ b/includes/ckeditor.utils.js @@ -307,7 +307,7 @@ if (typeof window.CKEDITOR_BASEPATH === 'undefined') { $('.ckeditor_links').show(); } - var sel_format = $("#" + ta_id.substr(0, ta_id.lastIndexOf("-")) + "-format--2"); + var sel_format = $(this).closest('.comment-form').find('select[id^="edit-comment-body-und-0-format"]'); if (sel_format && sel_format.not('.ckeditor-processed')) { sel_format.addClass('ckeditor-processed').change(function() { Drupal.settings.ckeditor.elements[ta_id] = $(this).val();