Vlad Kurkin (b_vladi) wrote in changelog,
Vlad Kurkin
b_vladi
changelog

[livejournal] r20083: LJSUP-9813: CKeditor eat my empty lines

Committer: vkurkin
LJSUP-9813: CKeditor eat my empty lines
U   trunk/htdocs/js/rte.js
Modified: trunk/htdocs/js/rte.js
===================================================================
--- trunk/htdocs/js/rte.js	2011-09-20 06:43:34 UTC (rev 20082)
+++ trunk/htdocs/js/rte.js	2011-09-20 06:49:46 UTC (rev 20083)
@@ -129,8 +129,8 @@
 					$('#updateForm')[0].onsubmit = function() {
 						if (window.switchedRteOn) {
 							var data = CKEditor.getData();
-							if($('#event_format')[0].checked){
-								data = data.replace(/(\r|\n)/g, '');
+							if(!$('#event_format')[0].checked){
+								data = data.replace(/(\r|\n)/g, '<br />');
 							}
 							draftData.textArea.val(data);
 						}

Tags: b_vladi, js, livejournal
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments