tinymce/editor_hook.js
changeset 0 c78d206bf01c
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tinymce/editor_hook.js	Thu Jun 02 06:24:03 2011 -0400
@@ -0,0 +1,36 @@
+editor_formats.tinymce = {
+	name: 'TinyMCE',
+	transform: false,
+	convert_to: function(text)
+		{
+			this.transform = true;
+			// by not returning a string here, we're being allowed to simply set a flag for the UI transformation
+			return null;
+		},
+	convert_from: function(text)
+		{
+			this.transform = true;
+			// by not returning a string here, we're being allowed to simply set a flag for the UI transformation
+			return null;
+		},
+	ui_construct: function()
+		{
+			console.debug('this.transform = ', this.transform);
+			$dynano('ajaxEditArea').switchToMCE(this.transform);
+			this.transform = false;
+		},
+	ui_destroy: function()
+		{
+			console.debug('this.transform = ', this.transform);
+			$dynano('ajaxEditArea').destroyMCE(this.transform);
+			this.transform = false;
+		},
+	get_text: function()
+		{
+			return $dynano('ajaxEditArea').getContent();
+		},
+	set_text: function(t)
+		{
+			return $dynano('ajaxEditArea').setContent(t);
+		},
+};