Author: msorokin
Date: 2008-12-12 12:38:13 -0500 (Fri, 12 Dec 2008)
New Revision: 11749
Modified:
trunk/docs/userguide/en/src/main/docbook/included/editor.xml
Log:
https://jira.jboss.org/jira/browse/RF-5042
added some info about events handling to the guide
Modified: trunk/docs/userguide/en/src/main/docbook/included/editor.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/editor.xml 2008-12-12 17:37:15 UTC
(rev 11748)
+++ trunk/docs/userguide/en/src/main/docbook/included/editor.xml 2008-12-12 17:38:13 UTC
(rev 11749)
@@ -125,12 +125,7 @@
</h:selectOneRadio>
...
...]]></programlisting>
- <para>
- Apart from the attributes that define the editor's
properties there are some attributes that help handle events(custom event handlers).
- </para>
- <para>
- All custom event handlers are listed in the table of
attributes and you can use them the same way as standard HTML event handlers.
- </para>
+
<para>Most configuration options that TinyMCE provides can be
applied using <f:param> JSF tag.
@@ -283,6 +278,40 @@
</itemizedlist>
+ <para>
+ The implementation of the <emphasis
role="bold">
<property><rich:editor></property></emphasis> component
has two methods for handling
+ events.
+ </para>
+ <para>The attributes take some function name as a value with is
triggered on the appropriate event. You need to use standard JavaScript function calling
syntax. </para>
+
+ <itemizedlist>
+ <listitem>
+ <para>Using attributes
(<property>"onchange"</property>,
<property>"oninit"</property>,<property>"onsave"</property>,<property>"onsetup"</property>)
</para>
+ <para>
+ <emphasis
role="bold">Example:</emphasis>
+ </para>
+
+ <programlisting role="XML"><![CDATA[...
+<rich:editor
value="#{bean.editorValue}"onchange="myCustomOnChangeHandler()" ...
/>
+...]]></programlisting>
+
+ </listitem>
+
+ <listitem>
+ <para>Using <f:param> as a
child element defining the <property>"name"</property>
attribute with one of the TinyMCE's callbacks and the
<property>"value"</property> attribute takes the function
name you want to be called on the corresponding event as the value. Note, that the syntax
in this case is a bit different: parentheses are not required. </para>
+ </listitem>
+
+
+ <programlisting role="XML"><![CDATA[...
+<rich:editor value="#{bean.editorValue}" ...>
+<f:param name="onchange" value="myCustomOnChangeHandler">
+</rich:editor>
+...]]></programlisting>
+
+
+ </itemizedlist>
+
+
<para>The <emphasis role="bold">
<property><rich:editor></property></emphasis>
component has a build-in converter that renders HTML code
generated by the editor
to Seam text (you can read more Seam text <ulink
url="http://docs.jboss.org/seam/1.1.5.GA/reference/en/html/text.html...>.),
it also interprets Seam text