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

[livejournal] r19715: LJSUP-9159: Update and improve RTE by CK...

Committer: vkurkin
LJSUP-9159: Update and improve RTE by CKEditor 3.6.1
U   trunk/htdocs/js/ck/config.js
U   trunk/htdocs/js/rte.js
Modified: trunk/htdocs/js/ck/config.js
===================================================================
--- trunk/htdocs/js/ck/config.js	2011-08-15 03:23:13 UTC (rev 19714)
+++ trunk/htdocs/js/ck/config.js	2011-08-15 05:40:05 UTC (rev 19715)
@@ -107,6 +107,7 @@
 	if(top.Site.media_embed_enabled){
 		config.toolbar_Full[0].push('LJEmbedLink');
 	}
+
 	config.toolbar_Full[0].push('LJPollLink',
 		'LJCutLink',
 		'LJCut',
@@ -126,8 +127,8 @@
 
 	config.toolbar = 'Full';
 	config.enterMode = CKEDITOR.ENTER_BR;
-	config.forceEnterMode = false;
-	config.shiftEnterMode = CKEDITOR.ENTER_BR;
+	config.forceEnterMode = true;
+	config.shiftEnterMode = CKEDITOR.ENTER_P;
 
 	config.keystrokes = [
     [ CKEDITOR.ALT + 121 /*F10*/, 'toolbarFocus' ],

Modified: trunk/htdocs/js/rte.js
===================================================================
--- trunk/htdocs/js/rte.js	2011-08-15 03:23:13 UTC (rev 19714)
+++ trunk/htdocs/js/rte.js	2011-08-15 05:40:05 UTC (rev 19715)
@@ -20,7 +20,7 @@
 			data.statusNode.val('');
 		}
 
-		draftData.textArea.val(draftData.lastValue);
+		draftData.textArea.val(draftData.lastValue.replace(/<br\s?\/>\n?/g, '\n'));
 
 		$('#updateForm').delegate('#draft', 'keypress click', checkDraftTimer);
 	};

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