Author: alevkovsky
Date: 2008-12-02 11:29:39 -0500 (Tue, 02 Dec 2008)
New Revision: 11493
Modified:
trunk/ui/editor/src/main/java/org/richfaces/renderkit/EditorRendererBase.java
Log:
https://jira.jboss.org/jira/browse/RF-5195
Modified: trunk/ui/editor/src/main/java/org/richfaces/renderkit/EditorRendererBase.java
===================================================================
---
trunk/ui/editor/src/main/java/org/richfaces/renderkit/EditorRendererBase.java 2008-12-02
16:20:19 UTC (rev 11492)
+++
trunk/ui/editor/src/main/java/org/richfaces/renderkit/EditorRendererBase.java 2008-12-02
16:29:39 UTC (rev 11493)
@@ -326,22 +326,25 @@
+ ";\n", null);
}
if (component.getOninit() != null && component.getOninit().length() > 0) {
- writer.writeText("tinyMceParams.oninit = " + component.getOninit()
- + ";\n", null);
+ writer.writeText("tinyMceParams.oninit = function () {\n"
+ + component.getOninit() + "\n" + "};\n", null);
}
if (component.getOnsave() != null && component.getOnsave().length() > 0) {
- writer.writeText("tinyMceParams.save_callback = "
- + component.getOnsave() + ";\n", null);
+ writer.writeText(
+ "tinyMceParams.save_callback = function (element_id, html, body) {\n"
+ + component.getOnsave() + "\n" + "};\n", null);
}
if (component.getOnchange() != null
&& component.getOnchange().length() > 0) {
- writer.writeText("tinyMceParams.onchange_callback = "
- + component.getOnchange() + ";\n", null);
+ writer.writeText(
+ "tinyMceParams.onchange_callback = function (inst) {\n"
+ + component.getOnchange() + "\n" + "};\n", null);
}
if (component.getOnsetup() != null
&& component.getOnsetup().length() > 0) {
- writer.writeText("tinyMceParams.setup = " + component.getOnsetup()
- + ";\n", null);
+ writer.writeText("tinyMceParams.setup = function (ed) {\n"
+ + component.getOnsetup() + "\n" + "};\n", null);
+
}
if (component.getDialogType() != null
&& component.getDialogType().length() > 0) {