Help:Editing

From Documentation

Jump to: navigation, search

You can try in wiki sandbox

Contents

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.

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

To Highlight Syntax

Use Syntax

/* Issue #4 (http://code.google.com/p/syntaxhighlighter/issues/detail?id=4) */
a.button:active {  
	background-position: bottom right;
	background-position: top left;
}
/* end */

/* Issue #23 (http://code.google.com/p/syntaxhighlighter/issues/detail?id=23) */
a.button:active {  
	_background-position: bottom right;
	font-size: 23px;
}

Use Source

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);
	}
 
	for (var ss = zk.TEXT_STYLES, j = ss.length; --j >= 0;)
		tsd.style[ss[j]] = Element.getStyle(el, ss[j]);
 
	tsd.innerHTML = txt;
	return [tsd.offsetWidth, tsd.offsetHeight];
};

Use Source + Line

  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.  
  9. 	for (var ss = zk.TEXT_STYLES, j = ss.length; --j >= 0;)
  10. 		tsd.style[ss[j]] = Element.getStyle(el, ss[j]);
  11.  
  12. 	tsd.innerHTML = txt;
  13. 	return [tsd.offsetWidth, tsd.offsetHeight];
  14. };