CKEditor"

From Documentation
m (Created page with 'init')
 
Line 1: Line 1:
init
+
{{ZKComponentReferencePageHeader}}
 +
 
 +
= CKEditor =
 +
 
 +
*Demonstration:  [http://www.zkoss.org/zkdemo/userguide/#f4 WYSIWYG editor]
 +
*Java API: N/A
 +
*JavaScript API: N/A
 +
 
 +
= Employment/Purpose =
 +
The component used to represent [http://ckeditor.com/ CKEditor]
 +
 
 +
CKEditor  is a popular HTML on-line text editor developed by Frederico Caldeira Knabben.
 +
 
 +
 
 +
 
 +
= Example =
 +
[[Image:ZKCompRef_CKEditor.png]]
 +
 
 +
<source lang="xml" >
 +
<ckeditor>
 +
<attribute name="value">
 +
&lt;table width="200" cellspacing="1" cellpadding="1" border="1"&gt;
 +
    &lt;tbody&gt;
 +
        &lt;tr style="background: #B7B313; color:white;"&gt;
 +
            &lt;td&gt;First Name&lt;/td&gt;
 +
            &lt;td&gt;Last Name&lt;/td&gt;
 +
        &lt;/tr&gt;
 +
        &lt;tr&gt;
 +
            &lt;td&gt;Jone&lt;/td&gt;
 +
            &lt;td&gt;Hayes&lt;/td&gt;
 +
        &lt;/tr&gt;
 +
        &lt;tr&gt;
 +
            &lt;td&gt;Mary&lt;/td&gt;
 +
            &lt;td&gt;Bally&lt;/td&gt;
 +
        &lt;/tr&gt;
 +
    &lt;/tbody&gt;
 +
&lt;/table&gt;
 +
</attribute>
 +
</ckeditor>
 +
</source>
 +
 
 +
[[Image:ZKCompRef_CKEditor2.png]]
 +
 
 +
'''It will turn on the save button when inside a form'''
 +
 
 +
<source lang="xml" >
 +
<zk xmlns:n="http://www.zkoss.org/2005/zk/native">
 +
<n:form>
 +
<ckeditor onSave="alert(self.value);"/>
 +
</n:form>
 +
</zk>
 +
</source>
 +
 
 +
 
 +
 
 +
 
 +
=Supported events=
 +
 
 +
{| border="1" | width="100%"
 +
! <center>Name</center>
 +
! <center>Event Type</center>
 +
|-
 +
| <center><tt>onChange</tt></center>
 +
| <javadoc>org.zkoss.zk.ui.event.InputEvent</javadoc>
 +
 
 +
'''Description:'''
 +
 
 +
Denotes the content of an input component has been modified by the user.
 +
 
 +
|-
 +
| <center><tt>onChanging</tt></center>
 +
| <javadoc>org.zkoss.zk.ui.event.InputEvent</javadoc>
 +
 
 +
'''Description: '''
 +
 
 +
Denotes that user is changing the content of an input component. Notice that the component's content (at the server) won't be changed until <tt>onChange</tt> is received. Thus, you have to invoke the <tt>getValue </tt>method in the <tt>InputEvent </tt>class to retrieve the temporary value.
 +
 
 +
 
 +
|-
 +
| <center><tt>onSave</tt></center>
 +
| <javadoc>org.zkoss.zk.ui.event.InputEvent</javadoc>
 +
 
 +
'''Description:'''
 +
 
 +
Denotes the save button of the CKEditor component has been clicked by the user.
 +
 
 +
|}
 +
 
 +
=Supported Children=
 +
 
 +
*NONE
 +
 
 +
=Use cases=
 +
 
 +
{| border='1px' | width="100%"
 +
! Version !! Description !! Example Location
 +
|-
 +
| &nbsp;
 +
| &nbsp;
 +
| &nbsp;
 +
|}
 +
 
 +
=Version History=
 +
 
 +
{| border='1px' | width="100%"
 +
! Version !! Date !! Content
 +
|-
 +
| 5.0.2
 +
| 05/18/2010
 +
| Initialization
 +
|}
 +
 
 +
{{ZKComponentReferencePageFooter}}

Revision as of 04:48, 18 May 2010

CKEditor

Employment/Purpose

The component used to represent CKEditor

CKEditor is a popular HTML on-line text editor developed by Frederico Caldeira Knabben.


Example

ZKCompRef CKEditor.png

<ckeditor>
	<attribute name="value">
		&lt;table width="200" cellspacing="1" cellpadding="1" border="1"&gt;
		    &lt;tbody&gt;
		        &lt;tr style="background: #B7B313; color:white;"&gt;
		            &lt;td&gt;First Name&lt;/td&gt;
		            &lt;td&gt;Last Name&lt;/td&gt;
		        &lt;/tr&gt;
		        &lt;tr&gt;
		            &lt;td&gt;Jone&lt;/td&gt;
		            &lt;td&gt;Hayes&lt;/td&gt;
		        &lt;/tr&gt;
		        &lt;tr&gt;
		            &lt;td&gt;Mary&lt;/td&gt;
		            &lt;td&gt;Bally&lt;/td&gt;
		        &lt;/tr&gt;
		    &lt;/tbody&gt;
		&lt;/table&gt;
	</attribute>
</ckeditor>

ZKCompRef CKEditor2.png

It will turn on the save button when inside a form

<zk xmlns:n="http://www.zkoss.org/2005/zk/native">
	<n:form>
		<ckeditor onSave="alert(self.value);"/>
	</n:form>
</zk>



Supported events

Name
Event Type
onChange
InputEvent

Description:

Denotes the content of an input component has been modified by the user.

onChanging
InputEvent

Description:

Denotes that user is changing the content of an input component. Notice that the component's content (at the server) won't be changed until onChange is received. Thus, you have to invoke the getValue method in the InputEvent class to retrieve the temporary value.


onSave
InputEvent

Description:

Denotes the save button of the CKEditor component has been clicked by the user.

Supported Children

*NONE

Use cases

Version Description Example Location
     

Version History

Version Date Content
5.0.2 05/18/2010 Initialization



Last Update : 2010/05/18

Copyright © Potix Corporation. This article is licensed under GNU Free Documentation License.