Difference between revisions of "Help:Editing"
m (Created page with 'You can try in wiki sandbox <!-- ==To explain terms== where * addon-name: an unique name for this addon. * language-name: the language nam…') |
|||
Line 83: | Line 83: | ||
*'''<span style="color:red;">If you add any swf files, please add it to [[Flash collection]]</span>''' | *'''<span style="color:red;">If you add any swf files, please add it to [[Flash collection]]</span>''' | ||
− | ==To | + | ==To Add Code == |
− | === | + | ===Syntax Highlight=== |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | ====language==== | |
− | + | <pre style="background:#FFFFDD"> | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | === | ||
<source lang="javascript" > | <source lang="javascript" > | ||
+ | or | ||
+ | <source language="javascript" > | ||
+ | </pre> | ||
+ | <source language="javascript"> | ||
zk.getTextSize = function (el, txt) { | zk.getTextSize = function (el, txt) { | ||
var tsd = zk._txtSizDiv; | var tsd = zk._txtSizDiv; | ||
Line 109: | Line 100: | ||
document.body.appendChild(tsd); | document.body.appendChild(tsd); | ||
} | } | ||
+ | }; | ||
+ | </source> | ||
− | + | ====Line Number Disable==== | |
− | tsd.style | + | <pre style="background:#FFFFDD"> |
+ | <source lang="javascript" line="true"> | ||
+ | </pre> | ||
+ | <source lang="javascript" line="ture"> | ||
+ | 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); | ||
+ | } | ||
+ | }; | ||
+ | </source> | ||
+ | ====First Line Number==== | ||
+ | <pre style="background:#FFFFDD"> | ||
+ | <source lang="javascript" start="10" line="ture"> | ||
+ | </pre> | ||
+ | <source lang="javascript" start="10" line="ture"> | ||
+ | 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); | ||
+ | } | ||
+ | }; | ||
+ | </source> | ||
− | tsd. | + | ====Line Highlight==== |
− | + | <pre style="background:#FFFFDD"> | |
+ | <source lang="javascript" start="10" line="ture" hightlight="11"> | ||
+ | </pre> | ||
+ | <source lang="javascript" start="10" line="ture" hightlight="11"> | ||
+ | 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); | ||
+ | } | ||
}; | }; | ||
</source> | </source> | ||
− | === | + | ====Multiple Line Highlight==== |
− | <source lang="javascript" | + | <pre style="background:#FFFFDD"> |
+ | <source lang="javascript" start="10" line="ture" hightlight="13,15"> | ||
+ | </pre> | ||
+ | <source lang="javascript" start="10" line="ture" hightlight="13,15"> | ||
zk.getTextSize = function (el, txt) { | zk.getTextSize = function (el, txt) { | ||
var tsd = zk._txtSizDiv; | var tsd = zk._txtSizDiv; | ||
Line 126: | Line 158: | ||
document.body.appendChild(tsd); | document.body.appendChild(tsd); | ||
} | } | ||
+ | }; | ||
+ | </source> | ||
+ | |||
+ | ===Code Doc=== | ||
+ | ====Last Update ==== | ||
+ | <pre> | ||
+ | Last Update : {{REVISIONYEAR}}/{{REVISIONMONTH}}/{{REVISIONDAY}} | ||
+ | </pre> | ||
+ | <div style="background:#FFFFDD" > | ||
+ | Last Update : {{REVISIONYEAR}}/{{REVISIONMONTH}}/{{REVISIONDAY}} | ||
+ | </div> | ||
+ | |||
+ | |||
+ | ====Javadoc Link==== | ||
+ | <pre> | ||
+ | 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> | ||
+ | </pre> | ||
+ | <div style="background:#FFFFDD" > | ||
+ | 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> | ||
+ | </div> | ||
− | + | ====Javadoc like styling==== | |
− | + | <pre> | |
+ | <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 | ||
+ | </pre> | ||
+ | <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 |
Revision as of 08:51, 23 September 2010
You can try in wiki sandbox
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
To force TOC(Table of content) appear
You can write '''__TOC__''' in the top of page.
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>1024 420 http://docs.zkoss.org/images/a/a2/Server_push.swf</gflash>
- resolution: 1024 420
- url:http://docs.zkoss.org/images/a/a2/Server_push.swf
- If you add any swf files, please add it to Flash collection
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 Disable
<source lang="javascript" line="true">
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="ture">
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" hightlight="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="ture" hightlight="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 : 2010/09/23
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:
- This method can be called only in an activated execution, i.e., Executions.getCurrent() not null.
- By default, EventQueueProviderImpl is used. To customize it, refer to EventQueues.
- 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 executionjava.lang.UnsupportedOperationException
- if the scope is not supported
- Note: