[pLog-svn] r7074 - plog/branches/lifetype-1.2/js/ui

jondaley at devel.lifetype.net jondaley at devel.lifetype.net
Fri Oct 22 12:32:12 EDT 2010


Author: jondaley
Date: 2010-10-22 12:32:12 -0400 (Fri, 22 Oct 2010)
New Revision: 7074

Modified:
   plog/branches/lifetype-1.2/js/ui/common.js
   plog/branches/lifetype-1.2/js/ui/plogui.js
Log:
fixed saveDraft for tinymce3

Modified: plog/branches/lifetype-1.2/js/ui/common.js
===================================================================
--- plog/branches/lifetype-1.2/js/ui/common.js	2010-10-22 16:25:06 UTC (rev 7073)
+++ plog/branches/lifetype-1.2/js/ui/common.js	2010-10-22 16:32:12 UTC (rev 7074)
@@ -333,16 +333,25 @@
 			}
 			else if( itemName == "postText" && htmlAreaEnabled ) {
 			    if ( blogLocale == "UTF-8" ) {
-				    formData = formData + itemName + "=" + encodeURIComponent(tinyMCE.getContent('postText')) + "&";
+				    formData = formData + itemName + "=" + 
+                        encodeURIComponent(
+                            tinyMCE.getInstanceById('postText').getBody().innerHTML) + "&";
 				} else {
-				    formData = formData + itemName + "=" + escape(tinyMCE.getContent('postText')) + "&";
+				    formData = formData + itemName + "=" + 
+                        escape(tinyMCE.getInstanceById('postText').getBody().innerHTML) + "&";
 				}
 			}
 			else if( itemName == "postExtendedText" && htmlAreaEnabled ) {
 				if ( blogLocale == "UTF-8" ) {
-				    formData = formData + itemName + "=" + encodeURIComponent(tinyMCE.getContent('postExtendedText')) + "&";
+				    formData = formData + itemName + "=" + 
+                        encodeURIComponent(
+                            tinyMCE.getInstanceById('postExtendedText').getBody().innerHTML)
+                        + "&";
 			    } else {
-				    formData = formData + itemName + "=" + escape(tinyMCE.getContent('postExtendedText')) + "&";
+				    formData = formData + itemName + "=" + 
+                        escape(
+                            tinyMCE.getInstanceById('postExtendedText').getBody().innerHTML)
+                        + "&";
                 }
 			}
 			else {

Modified: plog/branches/lifetype-1.2/js/ui/plogui.js
===================================================================
--- plog/branches/lifetype-1.2/js/ui/plogui.js	2010-10-22 16:25:06 UTC (rev 7073)
+++ plog/branches/lifetype-1.2/js/ui/plogui.js	2010-10-22 16:32:12 UTC (rev 7074)
@@ -27,7 +27,7 @@
 	
     // Can't use form.postText.value, becasue the form.postText.value still "null"
     if( htmlAreaEnabled ) {
-		postText = tinyMCE.getContent('postText');
+		postText = tinyMCE.getInstanceById('postText').getBody().innerHTML;
 	} else {
 		postText = form.postText.value;
     }



More information about the pLog-svn mailing list