[Jaws-commits] r13241 - trunk/jaws/html/include/Jaws/Ajax

afz at jaws-project.com afz at jaws-project.com
Fri Aug 3 19:48:00 UTC 2012


Author: afz
Date: 2012-08-03 19:47:59 +0000 (Fri, 03 Aug 2012)
New Revision: 13241

Modified:
   trunk/jaws/html/include/Jaws/Ajax/Ajax.js
Log:
Updated Ajax stuff for using CKEditor instead of FCKEditor

Modified: trunk/jaws/html/include/Jaws/Ajax/Ajax.js
===================================================================
--- trunk/jaws/html/include/Jaws/Ajax/Ajax.js	2012-08-03 19:47:04 UTC (rev 13240)
+++ trunk/jaws/html/include/Jaws/Ajax/Ajax.js	2012-08-03 19:47:59 UTC (rev 13241)
@@ -30,8 +30,8 @@
  */
 function changeEditorValue(name, value)
 {
-    var usingMCE = typeof tinyMCE == 'undefined' ? false : true;
-    var usingFCK = typeof FCKeditorAPI == 'undefined' ? false : true;
+    var usingMCE = typeof tinyMCE  == 'undefined' ? false : true;
+    var usingCKE = typeof CKEDITOR == 'undefined' ? false : true;
     if (usingMCE) {
         var editor = tinyMCE.get(name);
         if (editor) {
@@ -39,9 +39,9 @@
          } else {
             $(name).value = value;
          }
-    } else if (usingFCK) {
-        var editor = FCKeditorAPI.GetInstance(name);
-        if (editor.Status == FCK_STATUS_NOTLOADED) {
+    } else if (usingCKE) {
+        var editor = CKEDITOR.instances[name];
+        if (editor.status == 'unloaded') {
             $(name).value = value;
         } else {
             editor.SetData(value);
@@ -56,15 +56,15 @@
  */
 function getEditorValue(name)
 {
-    var usingMCE = typeof tinyMCE == 'undefined' ? false : true;
-    var usingFCK = typeof FCKeditorAPI == 'undefined' ? false : true;
+    var usingMCE = typeof tinyMCE  == 'undefined' ? false : true;
+    var usingCKE = typeof CKEDITOR == 'undefined' ? false : true;
     if (usingMCE) {
         var editor = tinyMCE.get(name);
         return editor.getContent();
-    } else if (usingFCK) {
-        var editor = FCKeditorAPI.GetInstance(name);
-        if (editor.Status != FCK_STATUS_NOTLOADED) {
-            return editor.GetXHTML(true);   // "true" means you want it formatted.
+    } else if (usingCKE) {
+        var editor = CKEDITOR.instances[name];
+        if (editor.status != 'unloaded') {
+            return editor.getData();
         }
     }
 



More information about the Jaws-commits mailing list