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

[livejournal] r19414: LJSUP-9183: Bug on the update.bml page (...

Committer: vkurkin
LJSUP-9183: Bug on the update.bml page (Omega)
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-07-01 04:14:40 UTC (rev 19413)
+++ trunk/htdocs/js/ck/config.js	2011-07-01 06:53:01 UTC (rev 19414)
@@ -9,10 +9,11 @@
 	if(top.Site.media_embed_enabled){
 		ljItems.push('LJEmbedLink');
 	}
-	ljItems.push('LJPollLink', 'LJCutLink', 'LJCut', 'Table');
+	ljItems.push('LJPollLink', 'LJCutLink', 'LJCut', 'LJLike', 'Table');
 
 	config.language = 'ru';
 	config.autoParagraph = false;
+	config.autoUpdateElement = false;
 	config.customConfig = '';
 	config.docType = '<!DOCTYPE html>';
 	config.baseHref = '';

Modified: trunk/htdocs/js/rte.js
===================================================================
--- trunk/htdocs/js/rte.js	2011-07-01 04:14:40 UTC (rev 19413)
+++ trunk/htdocs/js/rte.js	2011-07-01 06:53:01 UTC (rev 19414)
@@ -139,7 +139,7 @@
 
 	window.useRichText = function (textArea, statPrefix){
 		if(!switchedRteOn){
-			switchedRteOn = true;
+			window.switchedRteOn = true;
 			$('switched_rte_on').value = '1';
 
 			if(!CKEditor && CKEDITOR && CKEDITOR.env.isCompatible){
@@ -152,6 +152,13 @@
 
 				editor.on('instanceReady', function(){
 					CKEditor = editor;
+
+					$('updateForm').onsubmit = function(){
+						if(switchedRteOn){
+							this['draft'].value = CKEditor.getData();
+						}
+					};
+
 					CKEditor.on('dataReady', LJToHtml);
 				});
 			} else {
@@ -173,7 +180,7 @@
 
 	window.usePlainText = function(textArea){
 		if(switchedRteOn){
-			switchedRteOn = false;
+			window.switchedRteOn = false;
 			$('switched_rte_on').value = '0';
 
 			if(CKEditor){

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