Index: includes/ckeditor.utils.js
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/ckeditor/includes/ckeditor.utils.js,v
retrieving revision 1.1.2.16
diff -u -p -r1.1.2.16 ckeditor.utils.js
--- includes/ckeditor.utils.js	17 Jan 2011 07:02:10 -0000	1.1.2.16
+++ includes/ckeditor.utils.js	9 Feb 2011 17:46:48 -0000
@@ -1,6 +1,9 @@
 // $Id: ckeditor.utils.js,v 1.1.2.16 2011/01/17 07:02:10 dczepierga Exp $
 Drupal.ckeditor = (typeof(CKEDITOR) != 'undefined');
 
+// State of textareas
+Drupal.ckeditorInitialized = {};
+
 // this object will store teaser information
 Drupal.ckeditorTeaser = {
   lookup: {},
@@ -17,6 +20,10 @@ Drupal.ckeditorToggle = function(textare
     $('#switch_' + textarea_id).text(TextRTE);
   }
   else {
+    if (typeof(Drupal.ckeditorInitialized[textarea_id]) == 'undefined') {
+      Drupal.ckeditorInitialized[textarea_id] = true;
+      $("#" + textarea_id).val(Drupal.ckeditorLinebreakConvert($("#" + textarea_id).val()));
+    }
     Drupal.ckeditorOn(textarea_id);
     $('#switch_' + textarea_id).text(TextTextarea);
   }
@@ -267,6 +274,17 @@ Drupal.ckeditorInsertHtml = function(htm
 };
 
 /**
+ * Converts \n to <br />
+ * It in no way tries to compete with Line break converter filter
+ */
+Drupal.ckeditorLinebreakConvert = function(text) {
+  if (!text.match(/<(p|br)\s*\/?>/) && text) {
+    text = '<p>' + text.replace(/\r\n|\n\r/g, '\n').replace(/\n\n/g, '</p><p>').replace(/\n/g, '<br />') + '</p>';
+  }
+  return text;
+}
+
+/**
  * Ajax support [#741572]
  */
 if (typeof(Drupal.Ajax) != 'undefined' && typeof(Drupal.Ajax.plugins) != 'undefined') {
@@ -344,5 +362,12 @@ Drupal.behaviors.ckeditor = function (co
     if ((typeof(Drupal.settings.ckeditor.autostart) != 'undefined') && (typeof(Drupal.settings.ckeditor.autostart[ta_id]) != 'undefined')) {
       Drupal.ckeditorOn(ta_id);
     }
+    else {
+      $(this).parents('form').bind('submit', function() {
+        $(this).find('textarea').each(function() {
+          $(this).val(Drupal.ckeditorLinebreakConvert($(this).val()));
+        });
+      });
+    }
   });
 };
\ No newline at end of file
