Last updated November 07, 2012 19:13, by nvause
Feedicon  
[[Home|&raquo; Project Kenai Documentation and Training]] &nbsp;&nbsp; [[Howdoi|&raquo; How Do I ...]] <h1> MediaWiki Sampler </h1> This page provides some examples of Mediawiki markup that aren't found on [[Wikis| About Wikis]]. That page does provide a comprehensive list of wiki markup tags, but doesn't attempt to provide all the possible combinations and examples. '''Note:''' To see the wiki markup for these examples, choose Show Page as Text from the Wiki Controls menu on the left. __TOC__ == Inline Formatting == Text can be made '''bold''' or ''italics'' or '''''both''''' by using simple wiki markup. You can also use XHTML elements for things like <tt>in-line code</tt> or <sub>subscripts</sub> or <sup>superscripts</sup>. A note about XHTML markup characters: You can use characters like '<' and '>' freely in your text, without worrying about having to escape them. Only if what you type looks like an XHTML start tag or end tag will it be interpreted as such. There are two ways to escape start and end tags: Use <nowiki>&lt;tag&gt;</nowiki> &mdash; &lt;tag&gt; Surround the tag with &lt;nowiki&gt;&lt;tag&gt;&lt;/nowiki&gt; tags &mdash; <nowiki><tag></nowiki> == Links == === Links to other wiki pages=== An internal link to <nowiki>[[Home]]</nowiki> &mdash; [[Home]] An internal link with different text <nowiki>[[Home|The Home Page]]</nowiki> &mdash; [[Home|The Home Page]] . === Links to external web pages === An external link to <nowiki>[http://oracle.com]</nowiki> &mdash; [http://oracle.com]. An external link with different link text <nowiki>[http://oracle.com Oracle's Home Page]</nowiki> &mdash; [http://oracle.com Oracle's Home Page] === Parameterized links to other projects and project features === A link to <nowiki><a href="{{project}}">this project's home page</a></nowiki> &mdash; <a href="{{project}}">this project's home page</a> A link to <nowiki><a href="{{forums}}">this project's forums</a></nowiki> &mdash; <a href="{{forums}}">this project's forums</a> A link to <nowiki><a href="{{projects}}">the list of all projects</a></nowiki> &mdash; <a href="{{projects}}">the list of all projects</a> A link to <nowiki><a href="{{project help}}">Project Help</a></nowiki> &mdash; <a href="{{project help}}">Project Help</a> A link to <nowiki><a href="{{project help page WebHooks}}">the Project Help page about Web Hooks</a></nowiki> &mdash; <a href="{{project help page WebHooks}}">the Project Help page about Web Hooks</a> == Lists == An unordered list: * AAA ** 111 ** 222 * BBB An ordered list: # AAA ## 111 ## 222 # BBB A mix of ordered and unordered lists: # AAA #* 111 #* 222 # BBB A definition list: ; wiki : a page that is quick to edit == Tables == A simple table: {|- border="1" !heading 1 !heading 2 |- |first cell |second cell |} Lists inside table cells: {|- border="1" !heading 1 !heading 2 |- | * a * b | * 1 * 2 |} A table within a table cell that uses simple bolding and regular cell markers for the heading: {|- border="1" |'''heading 1''' |'''heading 2''' |- | Data | {|- | x | y |- | p | q |} |} A table that uses HTML format, style tags, and attributes like <tt>valign="top"</tt>. <table> <tr style="background-color:#d1d1d1;"> <td colspan="7" style="text-align:center"> '''Message Forums''' </td> </tr> <tr> <td> '''Activity''' </td> <td> '''Administrator''' </td> <td> '''Software Developer''' </td> <td> '''Content Developer''' </td> <td> '''Observer''' </td> <td> '''Unauthenticated''' </td> <td> '''Unregistered''' </td> </tr> <tr style="background-color:#e1e1e1;"> <td>Read</td> <td style="text-align:center">[[image:box-checked.png]]</td> <td style="text-align:center">[[image:box-checked.png]]</td> <td style="text-align:center">[[image:box-checked.png]]</td> <td style="text-align:center">[[image:box-checked.png]]</td> <td style="text-align:center">[[image:box-checked.png]]</td> <td style="text-align:center">[[image:box-checked.png]]</td> </tr> <tr > <td>Create Post</td> <td style="text-align:center">[[image:box-checked.png]]</td> <td style="text-align:center">[[image:box-checked.png]]</td> <td style="text-align:center">[[image:box-checked.png]]</td> <td style="text-align:center">[[image:box-checked.png]]</td> <td style="text-align:center">[[image:box-empty.png]]</td> <td style="text-align:center">[[image:box-checked.png]]</td> </tr> <tr style="background-color:#e1e1e1;"> <td>Edit Post</td> <td style="text-align:center">[[image:box-checked.png]]</td> <td style="text-align:center">[[image:box-checked.png]]</td> <td style="text-align:center">[[image:box-checked.png]]</td> <td style="text-align:center">[[image:box-checked.png]]</td> <td style="text-align:center">[[image:box-empty.png]]</td> <td style="text-align:center">[[image:box-checked.png]]</td> </tr> <tr> <td>Delete Post</td> <td style="text-align:center">[[image:box-checked.png]]</td> <td style="text-align:center">[[image:box-checked.png]]</td> <td style="text-align:center">[[image:box-checked.png]]</td> <td style="text-align:center">[[image:box-checked.png]]</td> <td style="text-align:center">[[image:box-empty.png]]</td> <td style="text-align:center">[[image:box-checked.png]]</td> </tr> <tr style="background-color:#e1e1e1;"> <td>Edit or Delete Any Post</td> <td style="text-align:center">[[image:box-checked.png]]</td> <td style="text-align:center">[[image:box-empty.png]]</td> <td style="text-align:center">[[image:box-empty.png]]</td> <td style="text-align:center">[[image:box-empty.png]]</td> <td style="text-align:center">[[image:box-empty.png]]</td> <td style="text-align:center">[[image:box-empty.png]]</td> </tr> <tr> <td colspan="7"> </td> </tr> <tr style="background-color:#d1d1d1;"> <td colspan="7" style="text-align:center"> '''Mailing Lists''' </td> </tr> <tr> <td> '''Activity''' </td> <td> '''Administrator''' </td> <td> '''Software Developer''' </td> <td> '''Content Developer''' </td> <td> '''Observer''' </td> <td> '''Unauthenticated''' </td> <td> '''Unregistered''' </td> </tr> <tr style="background-color:#e1e1e1;"> <td>View List</td> <td style="text-align:center">[[image:box-checked.png]]</td> <td style="text-align:center">[[image:box-checked.png]]</td> <td style="text-align:center">[[image:box-checked.png]]</td> <td style="text-align:center">[[image:box-checked.png]]</td> <td style="text-align:center">[[image:box-checked.png]]</td> <td style="text-align:center">[[image:box-checked.png]]</td> </tr> <tr > <td>Administer List</td> <td style="text-align:center">[[image:box-checked.png]]</td> <td style="text-align:center">[[image:box-empty.png]]</td> <td style="text-align:center">[[image:box-empty.png]]</td> <td style="text-align:center">[[image:box-empty.png]]</td> <td style="text-align:center">[[image:box-empty.png]]</td> <td style="text-align:center">[[image:box-empty.png]]</td> </tr> <tr style="background-color:#e1e1e1;"> <td>View Archive</td> <td style="text-align:center">[[image:box-checked.png]]</td> <td style="text-align:center">[[image:box-checked.png]]</td> <td style="text-align:center">[[image:box-checked.png]]</td> <td style="text-align:center">[[image:box-checked.png]]</td> <td style="text-align:center">[[image:box-checked.png]]</td> <td style="text-align:center">[[image:box-checked.png]]</td> </tr> <tr > <td>Close List</td> <td style="text-align:center">[[image:box-checked.png]]</td> <td style="text-align:center">[[image:box-empty.png]]</td> <td style="text-align:center">[[image:box-empty.png]]</td> <td style="text-align:center">[[image:box-empty.png]]</td> <td style="text-align:center">[[image:box-empty.png]]</td> <td style="text-align:center">[[image:box-empty.png]]</td> </tr> <tr style="background-color:#e1e1e1;"> <td>Moderate Posts</td> <td style="text-align:center">[[image:box-checked.png]]</td> <td style="text-align:center">[[image:box-empty.png]]</td> <td style="text-align:center">[[image:box-empty.png]]</td> <td style="text-align:center">[[image:box-empty.png]]</td> <td style="text-align:center">[[image:box-empty.png]]</td> <td style="text-align:center">[[image:box-empty.png]]</td> </tr> <tr> <td>Compose on Web</td> <td style="text-align:center">[[image:box-checked.png]]</td> <td style="text-align:center">[[image:box-checked.png]]</td> <td style="text-align:center">[[image:box-checked.png]]</td> <td style="text-align:center">[[image:box-checked.png]]</td> <td style="text-align:center">[[image:box-empty.png]]</td> <td style="text-align:center">[[image:box-checked.png]]</td> </tr> <tr style="background-color:#e1e1e1;"> <td>Subscribe to List</td> <td style="text-align:center">[[image:box-checked.png]]</td> <td style="text-align:center">[[image:box-checked.png]]</td> <td style="text-align:center">[[image:box-checked.png]]</td> <td style="text-align:center">[[image:box-checked.png]]</td> <td style="text-align:center">[[image:box-empty.png]]</td> <td style="text-align:center">[[image:box-checked.png]]</td> </tr> </table> == Blocks == The golden ratio may be expressed as: x x + 1 - == ----- 1 x == Images == ====A big image==== <tt><nowiki>[[image: gregory.jpg]]</nowiki></tt><br/><br/> [[image: gregory.jpg]]<br/><br/> ====Thumbnail image==== <tt><nowiki>[[image: gregory.jpg|thumb]]</nowiki></tt><br/><br/> [[image: gregory.jpg|thumb]]<br/><br/> ====Image with strange size and a title==== <tt><nowiki>[[image: gregory.jpg|80x20px|A picture of Gregory]]</nowiki></tt><br/><br/> [[image: gregory.jpg|80x20px|A picture of Gregory]]<br/><br/> ====Thumbnail floated to the right==== <nowiki>[[image:gregory.jpg|thumb|right]]</nowiki></tt><br/><br/> [[image:gregory.jpg|thumb|right]] <br/><br/> xxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxx xxxxxxx xxxxxxxx xxxxxx xxxxxxx xxxxxxxxxx xxxxxxxxxx xxxxxxxxx xxxxxxxxxx xxxxxxxxxx xxxxxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxxxxxxxxx. xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxx xxxxxxxx xxxxxx xxxxxxx xxxxxxxxxx xxxxxxxxxx xxxxxxxxx xxxxxxxxxx xxxxxxxxxx xxxxxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxxxxxxxxx.xxxxxxxxxxx xxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxx xxxxxxx xxxxxxxx xxxxxx xxxxxxx xxxxxxxxxx xxxxxxxxxx xxxxxxxxx xxxxxxxxxx xxxxxxxxxx xxxxxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxxxxxxxxx.xxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxx xxxxxxx xxxxxxxx xxxxxx xxxxxxx xxxxxxxxxx xxxxxxxxxx xxxxxxxxx xxxxxxxxxx ====Image too wide for page==== Uses <tt>block</tt> parameter to add horizontal scrollbar to page: <tt><nowiki>[[image:testimage-toowide.png|block]]</nowiki></tt><br/><br/> [[image:testimage-toowide.png|block]] == Source Code Formatting == Mediawiki enables simple formatting of code if you add a space before each line of code. However, something you can't do easily is show HTML markup as code. For that, it's easiest to use the <tt><nowiki><pre></nowiki></tt> tag. Also, you can get some nice formatting of multiple lines of source code by using the language name with the <tt><nowiki><pre></nowiki></tt> tag. For example, * [[#Formatting_Ruby_Source_Code|Ruby code]]: <tt><nowiki><pre name="ruby"></nowiki></tt> * [[#Formatting_PhP_Source_Code|PhP code]]: <tt><nowiki><pre name="php"></nowiki></tt> * [[#Formatting_Java_Source_Code|Java code]]: <tt><nowiki><pre name="java"></nowiki></tt> * [[#Formatting_CSS_Source_Code|CSS]]: <tt><nowiki><pre name="css"></nowiki></tt> ===Formatting HTML Source Code=== Use the <tt><nowiki><pre></nowiki></tt> tag to show more than one line of HTML code in a monospaced font. <pre> <!-- New HTML code based on FlickrSlideShow sample. --> <div id="FlickrSlideShowWidget"> Enter a Flickr tag to search for photos: <br/> <input id="flickrTag" type="text" value="Yosemite" /> <br/> Enter a page number to see more photos.<br /> <input id="pagenum" type="text" value="1" /> <br/> <button id="searchButton">Search</button><br/><hr/><br/> <div id="FlickrSearchResults"></div> </div> </pre> ===Formatting Ruby Source Code=== Use <tt><nowiki><pre name="ruby"></nowiki></tt> with your ruby code to get the formatting below. <pre name="ruby"> # POST /albums # POST /albums.xml def create @album = Album.new(params[:album]) respond_to do |format| if @album.save flash[:notice] = 'Album was successfully created.' format.html { redirect_to(@album) } format.xml { render :xml => @album, :status => :created, :location => @album } else format.html { render :action => "new" } format.xml { render :xml => @album.errors, :status => :unprocessable_entity } end end end </pre> ===Formatting PhP Source Code=== Use <tt><nowiki><pre name="php"></nowiki></tt> with your php code to get the formatting below. <pre name="php"> <?php // db connection info $db_name= 'hook_data'; $dbh = mysqli_connect('127.0.0.1', 'root', ''); $db_exists = $dbh->select_db($db_name); // db/table setup if (!$db_exists) { $res = $dbh->query("CREATE DATABASE $db_name"); if (!$res) die("could not create database"); $dbh->select_db($db_name); } ... </pre> ===Formatting Java Source Code=== Use <tt><nowiki><pre name="java"></nowiki></tt> with your Java code to get the formatting below. <pre name="java"> public static String acrostic(String[] args) { StringBuffer b = new StringBuffer(); for (int i = 0; i < args.length; i++) { if (args[i].length() > i) { b.append(args[i].charAt(i)); } else { b.append('?'); } } return b.toString(); </pre> ===Formatting CSS Source Code=== Use <tt><nowiki><pre name="css"></nowiki></tt> with your css code to get the formatting below. <pre name="css"> .banner { margin: 0px 40px 0px 0px; display:table-cell; vertical-align:middle; font-size:35px; } </pre>

Project Features

Wiki Controls

About this Project

Help for netbeans.org Site Tools was started in November 2009, is owned by kenaiadmin, and has 17 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20131025.e7cbc9d). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close