Author: alevkovsky
Date: 2008-10-20 09:56:19 -0400 (Mon, 20 Oct 2008)
New Revision: 10828
Modified:
trunk/sandbox/ui/editor/src/main/resources/org/richfaces/renderkit/html/scripts/editor.js
Log:
Adjust Editor work with ajax
Modified:
trunk/sandbox/ui/editor/src/main/resources/org/richfaces/renderkit/html/scripts/editor.js
===================================================================
---
trunk/sandbox/ui/editor/src/main/resources/org/richfaces/renderkit/html/scripts/editor.js 2008-10-20
13:46:49 UTC (rev 10827)
+++
trunk/sandbox/ui/editor/src/main/resources/org/richfaces/renderkit/html/scripts/editor.js 2008-10-20
13:56:19 UTC (rev 10828)
@@ -14,32 +14,32 @@
this.editorTextAreaId = this.id +'TextArea';
this.params = parameters;
+ var obj = $(this.id);
+ obj.component = this;
+ obj.richfacesComponent="richfaces:editor";
this["rich:destructor"] = "destruct";
tinyMCE.init({
mode: this.params.mode,
theme: this.params.theme,
- init_instance_callback : this.onInitInstanceCallback.bind(this),
+ init_instance_callback : this.onInitInstanceCallback.bind(this)
});
- this.onbeforeajaxListener = new A4J.AJAX.AjaxListener("onbeforeajax",
this.onBeforeAjax.bind(this));
- A4J.AJAX.AddListener(this.onbeforeajaxListener);
+ this.onBeforeAjaxListener = new A4J.AJAX.AjaxListener("onbeforeajax",
this.onBeforeAjax.bind(this));
+ A4J.AJAX.AddListener(this.onBeforeAjaxListener);
},
destruct: function() {
-
- alert('destructor');
- A4J.AJAX.removeListener(this.onbeforeajaxListener);
- this.onbeforeajaxListener = null;
+ A4J.AJAX.removeListener(this.onBeforeAjaxListener);
+ this.onBeforeAjaxListener = null;
this.tinyMCE_editor.remove();
this.tinyMCE_editor = null;
- alert('destructor done');
},
onBeforeAjax: function() {
- alert('before ajax ');
+ //var content = this.tinyMCE_editor.getContent();
+ //$(this.editorTextAreaId).value = content;
this.tinyMCE_editor.save();
- alert('before ajax done');
},
onInitInstanceCallback: function() {
Show replies by date