? 614146_wysiwyg_api_3.patch
Index: editors/js/ckeditor-3.0.js
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/wysiwyg/editors/js/ckeditor-3.0.js,v
retrieving revision 1.2.4.4
diff -u -p -r1.2.4.4 ckeditor-3.0.js
--- editors/js/ckeditor-3.0.js	23 Oct 2009 02:11:02 -0000	1.2.4.4
+++ editors/js/ckeditor-3.0.js	14 Nov 2009 16:37:12 -0000
@@ -174,6 +174,13 @@ Drupal.wysiwyg.editor.instance.ckeditor 
   insert: function(content) {
     content = this.prepareContent(content);
     CKEDITOR.instances[this.field].insertHtml(content);
+  },
+  getContent: function() {
+    return CKEDITOR.instances[this.field].getData();
+  },
+  setContent: function(content) {
+    content = this.prepareContent(content);
+    CKEDITOR.instances[this.field].setData(content);
   }
 };
 
Index: editors/js/fckeditor-2.6.js
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/wysiwyg/editors/js/fckeditor-2.6.js,v
retrieving revision 1.16.2.1
diff -u -p -r1.16.2.1 fckeditor-2.6.js
--- editors/js/fckeditor-2.6.js	22 Jun 2009 03:00:15 -0000	1.16.2.1
+++ editors/js/fckeditor-2.6.js	14 Nov 2009 16:37:12 -0000
@@ -151,6 +151,16 @@ Drupal.wysiwyg.editor.instance.fckeditor
     var instance = FCKeditorAPI.GetInstance(this.field);
     // @see FCK.InsertHtml(), FCK.InsertElement()
     instance.InsertHtml(content);
+  },
+
+  getContent: function() {
+    var instance = FCKeditorAPI.GetInstance(this.field);
+    return instance.GetData();
+  },
+
+  setContent: function(content) {
+    var instance = FCKeditorAPI.GetInstance(this.field);
+    instance.SetHTML(content);
   }
 };
 
Index: editors/js/none.js
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/wysiwyg/editors/js/none.js,v
retrieving revision 1.6
diff -u -p -r1.6 none.js
--- editors/js/none.js	17 May 2009 00:13:21 -0000	1.6
+++ editors/js/none.js	14 Nov 2009 16:37:12 -0000
@@ -66,5 +66,13 @@ Drupal.wysiwyg.editor.instance.none = {
     else {
       editor.value += content;
     }
+  },
+  getContent: function() {
+    var editor = document.getElementById(this.field);
+    return editor.value;
+  },
+  setContent: function(content) {
+    var editor = document.getElementById(this.field);
+    editor.value = content;
   }
 };

Index: editors/js/tinymce-3.js
===================================================================
--- editors/js/tinymce-3.js	(revision 88)
+++ editors/js/tinymce-3.js	(working copy)
@@ -213,6 +213,16 @@
   insert: function(content) {
     content = this.prepareContent(content);
     tinyMCE.execInstanceCommand(this.field, 'mceInsertContent', false, content);
+  },
+
+  getContent: function() {
+    var editor = tinyMCE.get(this.field);
+    return editor.getContent();
+  },
+
+  setContent: function(content) {
+    content = this.prepareContent(content);
+    tinyMCE.execInstanceCommand(this.field, 'mceSetContent', false, content);
   }
 };
 

