Difference between revisions of "Help:Editing"

From Documentation
 
(13 intermediate revisions by 5 users not shown)
Line 1: Line 1:
You can try in [[Sandbox | wiki sandbox]]
 
 
<!--
 
<!--
 
==To explain terms==
 
==To explain terms==
Line 52: Line 51:
 
==To force TOC(Table of content) appear==
 
==To force TOC(Table of content) appear==
 
You can write <nowiki>'''__TOC__'''</nowiki> in the top of page.
 
You can write <nowiki>'''__TOC__'''</nowiki> in the top of page.
 +
 +
[http://en.wikipedia.org/wiki/Help:Magic_words other magic words]
  
 
==To add a category==
 
==To add a category==
Line 76: Line 77:
 
*upload the swf file by including an image in your wiki page.
 
*upload the swf file by including an image in your wiki page.
 
*use '''<nowiki><gflash></nowiki>''' to include the swf file
 
*use '''<nowiki><gflash></nowiki>''' to include the swf file
::ex.<nowiki><gflash>1024 420 http://docs.zkoss.org/images/a/a2/Server_push.swf</gflash></nowiki>
+
::ex.<nowiki><gflash width="1024" height="420">Server_push.swf</gflash></nowiki>
  
**resolution: 1024 420
 
**url:<nowiki>http://docs.zkoss.org/images/a/a2/Server_push.swf</nowiki>
 
  
*'''<span style="color:red;">If you add any swf files, please add it to [[Flash collection]]</span>'''
+
This works where Server_push.swf is the name of the uploaded file!!
  
 
==To Add Code ==
 
==To Add Code ==
Line 103: Line 102:
 
</source>
 
</source>
  
====Line Number Disable====
+
====Line Number====
 
<pre style="background:#FFFFDD">
 
<pre style="background:#FFFFDD">
<source lang="javascript" line="true">
+
<source lang="javascript" line="false">
 
</pre>
 
</pre>
<source lang="javascript" line="ture">
+
<source lang="javascript" line="false">
 
zk.getTextSize = function (el, txt) {
 
zk.getTextSize = function (el, txt) {
 
var tsd = zk._txtSizDiv;
 
var tsd = zk._txtSizDiv;
Line 119: Line 118:
 
====First Line Number====
 
====First Line Number====
 
<pre style="background:#FFFFDD">
 
<pre style="background:#FFFFDD">
<source lang="javascript" start="10" line="ture">
+
<source lang="javascript" start="10" line="true">
 
</pre>
 
</pre>
<source lang="javascript" start="10"  line="ture">
+
<source lang="javascript" start="10"  line="true">
 
zk.getTextSize = function (el, txt) {
 
zk.getTextSize = function (el, txt) {
 
var tsd = zk._txtSizDiv;
 
var tsd = zk._txtSizDiv;
Line 134: Line 133:
 
====Line Highlight====
 
====Line Highlight====
 
<pre style="background:#FFFFDD">
 
<pre style="background:#FFFFDD">
<source lang="javascript" start="10" line="ture" hightlight="11">
+
<source lang="javascript" start="10" line="ture" highlight="11">
 +
or
 +
<source lang="javascript" start="10" line="ture" high="11">
 
</pre>
 
</pre>
<source lang="javascript" start="10"  line="ture" hightlight="11">
+
<source lang="javascript" start="10"  line="ture" high="11">
 
zk.getTextSize = function (el, txt) {
 
zk.getTextSize = function (el, txt) {
 
var tsd = zk._txtSizDiv;
 
var tsd = zk._txtSizDiv;
Line 148: Line 149:
 
====Multiple Line Highlight====
 
====Multiple Line Highlight====
 
<pre style="background:#FFFFDD">
 
<pre style="background:#FFFFDD">
<source lang="javascript" start="10" line="ture" hightlight="13,15">
+
<source lang="javascript" start="10" line="true" highlight="13,15">
 +
or
 +
<source lang="javascript" start="10" line="true" high="13,15">
 
</pre>
 
</pre>
<source lang="javascript" start="10"  line="ture" hightlight="13,15">
+
<source lang="javascript" start="10"  line="true" high="13,15">
 
zk.getTextSize = function (el, txt) {
 
zk.getTextSize = function (el, txt) {
 
var tsd = zk._txtSizDiv;
 
var tsd = zk._txtSizDiv;
Line 163: Line 166:
 
===Code Doc===
 
===Code Doc===
 
====Last Update ====
 
====Last Update ====
<pre>
+
<pre style="background:#FFFFDD">
 
  Last Update : {{REVISIONYEAR}}/{{REVISIONMONTH}}/{{REVISIONDAY}}
 
  Last Update : {{REVISIONYEAR}}/{{REVISIONMONTH}}/{{REVISIONDAY}}
 
</pre>
 
</pre>
<div style="background:#FFFFDD" >
+
<div >
 
Last Update : {{REVISIONYEAR}}/{{REVISIONMONTH}}/{{REVISIONDAY}}
 
Last Update : {{REVISIONYEAR}}/{{REVISIONMONTH}}/{{REVISIONDAY}}
 
</div>
 
</div>
  
 +
====Javadoc Link====
  
====Javadoc Link====
+
<pre style="background:#FFFFDD">
<pre>
 
 
Default:
 
Default:
 
<javadoc>org.zkoss.zk.ui.event.impl.EventQueueProvider</javadoc>
 
<javadoc>org.zkoss.zk.ui.event.impl.EventQueueProvider</javadoc>
Line 182: Line 185:
 
<javadoc class="true"  method="DESKTOP">org.zkoss.zk.ui.event.EventQueues</javadoc>
 
<javadoc class="true"  method="DESKTOP">org.zkoss.zk.ui.event.EventQueues</javadoc>
 
Method with Class:
 
Method with Class:
<javadoc class="true"  method="lookup(java.lang.String, java.lang.String)">org.zkoss.zk.ui.event.EventQueues</javadoc>
+
<javadoc class="true"  method="lookup(java.lang.String,java.lang.String)">org.zkoss.zk.ui.event.EventQueues</javadoc>
 
Method without Class:
 
Method without Class:
<javadoc class="false"  method="lookup(java.lang.String, java.lang.String)">org.zkoss.zk.ui.event.EventQueues</javadoc>
+
<javadoc class="false"  method="lookup(java.lang.String,java.lang.String)">org.zkoss.zk.ui.event.EventQueues</javadoc>
 
</pre>
 
</pre>
<div style="background:#FFFFDD" >
 
 
Default:
 
Default:
 
<javadoc>org.zkoss.zk.ui.event.impl.EventQueueProvider</javadoc>
 
<javadoc>org.zkoss.zk.ui.event.impl.EventQueueProvider</javadoc>
Line 200: Line 202:
  
 
Method with Class:
 
Method with Class:
<javadoc class="true"  method="lookup(java.lang.String, java.lang.String)">org.zkoss.zk.ui.event.EventQueues</javadoc>
+
<javadoc class="true"  method="lookup(java.lang.String,java.lang.String)">org.zkoss.zk.ui.event.EventQueues</javadoc>
  
 
Method without Class:
 
Method without Class:
<javadoc class="false"  method="lookup(java.lang.String, java.lang.String)">org.zkoss.zk.ui.event.EventQueues</javadoc>
+
<javadoc class="false"  method="lookup(java.lang.String,java.lang.String)">org.zkoss.zk.ui.event.EventQueues</javadoc>
</div>
 
  
 
====Javadoc like styling====
 
====Javadoc like styling====
<pre>
+
<pre style="background:#FFFFDD">
 
<span style="font-size:16px">'''lookup'''</span>
 
<span style="font-size:16px">'''lookup'''</span>
  

Latest revision as of 09:11, 1 November 2017

To add reference

Please enclose reference with <ref></ref>. And add

'''Notes'''
<references/>

at the bottom of section.

For example,

This is a simple example<ref>isn't it really simple?</ref>. ZK Rockes<ref>Please visit our [http://www.zkoss.org/ website]</ref>.

'''Notes'''

<references/>

will be:

This is a simple example[1]. ZK Rockes[2].

Notes

  1. isn't it really simple?
  2. Please visit our website

To force TOC(Table of content) appear

You can write '''__TOC__''' in the top of page.

other magic words

To add a category

A page in any namespace can be put in a category by adding a category tag to the page (by convention, at the end of the page), e.g.:

[[Category:Category name]]

To embed a video from youtube

  • Get the Youtube clip ID (like www.youtube.com/watch?v=Fno1zUQOETU)
  • Use ev function to embed it into you page.
{{#ev:youtube|Fno1zUQOETU}}
  • If you want to set the size, simply add the size add the end
{{#ev:youtube|Fno1zUQOETU|300}}
  • Notice: if your video is 720p (width) in Youtube, you can use.
{{#ev:youtubehd|Fno1zUQOETU}}

To add a swf file

  • upload the swf file by including an image in your wiki page.
  • use <gflash> to include the swf file
ex.<gflash width="1024" height="420">Server_push.swf</gflash>


This works where Server_push.swf is the name of the uploaded file!!

To Add Code

Syntax Highlight

language

<source lang="javascript" >
or
<source language="javascript" >
zk.getTextSize = function (el, txt) {
	var tsd = zk._txtSizDiv;
	if (!tsd) {
		tsd = zk._txtSizDiv = document.createElement("DIV");
		tsd.style.cssText = "top:-1000px;left:-1000px;position:absolute;visibility:hidden;border:none";
		document.body.appendChild(tsd);
	}
};

Line Number

<source lang="javascript" line="false">
1 zk.getTextSize = function (el, txt) {
2 	var tsd = zk._txtSizDiv;
3 	if (!tsd) {
4 		tsd = zk._txtSizDiv = document.createElement("DIV");
5 		tsd.style.cssText = "top:-1000px;left:-1000px;position:absolute;visibility:hidden;border:none";
6 		document.body.appendChild(tsd);
7 	}
8 };

First Line Number

<source lang="javascript" start="10" line="true">
10 zk.getTextSize = function (el, txt) {
11 	var tsd = zk._txtSizDiv;
12 	if (!tsd) {
13 		tsd = zk._txtSizDiv = document.createElement("DIV");
14 		tsd.style.cssText = "top:-1000px;left:-1000px;position:absolute;visibility:hidden;border:none";
15 		document.body.appendChild(tsd);
16 	}
17 };

Line Highlight

<source lang="javascript" start="10" line="ture" highlight="11">
or
<source lang="javascript" start="10" line="ture" high="11">
10 zk.getTextSize = function (el, txt) {
11 	var tsd = zk._txtSizDiv;
12 	if (!tsd) {
13 		tsd = zk._txtSizDiv = document.createElement("DIV");
14 		tsd.style.cssText = "top:-1000px;left:-1000px;position:absolute;visibility:hidden;border:none";
15 		document.body.appendChild(tsd);
16 	}
17 };

Multiple Line Highlight

<source lang="javascript" start="10" line="true" highlight="13,15">
or
<source lang="javascript" start="10" line="true" high="13,15">
10 zk.getTextSize = function (el, txt) {
11 	var tsd = zk._txtSizDiv;
12 	if (!tsd) {
13 		tsd = zk._txtSizDiv = document.createElement("DIV");
14 		tsd.style.cssText = "top:-1000px;left:-1000px;position:absolute;visibility:hidden;border:none";
15 		document.body.appendChild(tsd);
16 	}
17 };

Code Doc

Last Update

 Last Update : {{REVISIONYEAR}}/{{REVISIONMONTH}}/{{REVISIONDAY}}

Last Update : 2017/11/1

Javadoc Link

Default:
<javadoc>org.zkoss.zk.ui.event.impl.EventQueueProvider</javadoc>
Class:
<javadoc type="class">org.zkoss.zk.ui.event.impl.EventQueueProvider</javadoc>
Interface:
<javadoc type="interface">org.zkoss.zk.ui.event.impl.EventQueueProvider</javadoc>
Static final:
<javadoc class="true"  method="DESKTOP">org.zkoss.zk.ui.event.EventQueues</javadoc>
Method with Class:
<javadoc class="true"  method="lookup(java.lang.String,java.lang.String)">org.zkoss.zk.ui.event.EventQueues</javadoc>
Method without Class:
<javadoc class="false"  method="lookup(java.lang.String,java.lang.String)">org.zkoss.zk.ui.event.EventQueues</javadoc>

Default: EventQueueProvider

Class: EventQueueProvider

Interface: EventQueueProvider

Static final: EventQueues.DESKTOP

Method with Class: EventQueues.lookup(String, String)

Method without Class: lookup(String, String)

Javadoc like styling

<span style="font-size:16px">'''lookup'''</span>


<javadoc type="interface">org.zkoss.zk.ui.event.EventQueue</javadoc> lookup (<code>java.lang.String</code> name,<code> java.lang.String</code> scope, <code>boolean</code> autoCreate)
::Note:
::*This method can be called only in an activated execution, i.e., <javadoc class="true"  method="getCurrent()">org.zkoss.zk.ui.Executions</javadoc> not null.
::*By default, <javadoc>org.zkoss.zk.ui.event.impl.EventQueueProviderImpl</javadoc> is used. To customize it, refer to EventQueues.
::'''Parameter:'''
:::<mp>name</mp> - the name of the event queue.
:::<mp>scope</mp> - the scope of the event queue. It must support <javadoc class="true"  method="DESKTOP">org.zkoss.zk.ui.event.EventQueues</javadoc> and <javadoc class="true"  method="APPLICATION">org.zkoss.zk.ui.event.EventQueues</javadoc>. Developers might extend it to support other types of event queues.
:::<mp>autoCreate</mp> - whether to create the event queue if not found.
::'''Returns:'''
:::the event queue with the associated name, or null if not found and autoCreate is false
::'''Throws:'''
:::<code>java.lang.IllegalStateException</code> - if not in an activated execution
:::<code>java.lang.UnsupportedOperationException</code> - if the scope is not supported
::'''Example:'''
:::{{Srcfile|name=EventQueue.zul}}


<javadoc type="interface">org.zkoss.zk.ui.event.EventQueue</javadoc> lookup (<code>java.lang.String</code> name,<code> java.lang.String</code> scope, <code>boolean</code> autoCreate)
::Note:
::*This method can be called only in an activated execution, i.e., <javadoc class="true"  method="getCurrent()">org.zkoss.zk.ui.Executions</javadoc> not null.
::*By default, <javadoc>org.zkoss.zk.ui.event.impl.EventQueueProviderImpl</javadoc> is used. To customize it, refer to EventQueues.
::'''Parameter:'''
:::<mp>name</mp> - the name of the event queue.
:::<mp>scope</mp> - the scope of the event queue. It must support <javadoc class="true"  method="DESKTOP">org.zkoss.zk.ui.event.EventQueues</javadoc> and <javadoc class="true"  method="APPLICATION">org.zkoss.zk.ui.event.EventQueues</javadoc>. Developers might extend it to support other types of event queues.
:::<mp>autoCreate</mp> - whether to create the event queue if not found.
::'''Returns:'''
:::the event queue with the associated name, or null if not found and autoCreate is false
::'''Throws:'''
:::<code>java.lang.IllegalStateException</code> - if not in an activated execution
:::<code>java.lang.UnsupportedOperationException</code> - if the scope is not supported

lookup


EventQueue lookup (java.lang.String name, java.lang.String scope, boolean autoCreate)

Note:
Parameter:
name - the name of the event queue.
scope - the scope of the event queue. It must support EventQueues.DESKTOP and EventQueues.APPLICATION. Developers might extend it to support other types of event queues.
autoCreate - whether to create the event queue if not found.
Returns:
the event queue with the associated name, or null if not found and autoCreate is false
Throws:
java.lang.IllegalStateException - if not in an activated execution
java.lang.UnsupportedOperationException - if the scope is not supported