Show/Hide Pagedown Editor

HTML

<script src="http://pagedown.googlecode.com/hg/Markdown.Converter.js"></script>
<script src="http://pagedown.googlecode.com/hg/Markdown.Sanitizer.js"></script>
<script src="http://pagedown.googlecode.com/hg/Markdown.Editor.js"></script>
<div id="wmd-panel" class="wmd-panel">
<div id="wmd-button-bar"></div>
<textarea class="wmd-input" id="wmd-input">
User Groups
    
1. non-users (these won't login but browse the data anonymously)
2. users (these will login and mostly browse/create/manipulate data)
3. moderators (these will login and mostly perform data purification)
4. administrators (administrator will have the utimate power)

> This is how a quote will appear.

To start ANT in the debug mode set a system enviroment variable as follows -
    
    export "ANT_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005"

This is a sample paragraph. See below for a sample code.

    <project>
        <property name="home.dir" value="/root" />
        
        <target name="dist">
            <jar file="app.jar">
                <fileset dir="${build.home}">
                    <include name="**/*.class" />
                </fileset>
            </jar>
        </target>
    </project>
</textarea>
</div>
<div id="wmd-preview" class="wmd-panel wmd-preview"></div>
<hr></hr>
<div id="control-panel">
    <button id="editBtn">Edit</button>
    <button id="saveBtn">Save</button>    
</div>

CSS

*:focus {
    outline: 0;
}

textarea {
    resize: none;
    overflow-y: scroll;
    overflow-x: auto;
    white-space: nowrap;
}

code {
    display: block;
    background-color: #F2F2F2;
}

body { 
	background-color: White;
    font-family: sans-serif;
}

blockquote {
    margin: 0;
	padding: 0;
	background: #eee;
}

.wmd-panel
{
	width: 500px;
	min-width: 500px;
}

.wmd-button-bar 
{
	width: 100%;
	background-color: Silver; 
}

.wmd-input 
{ 
	height: 300px;
	width: 100%;
	background-color: #fff;
	border: 1px solid DarkGray;
}

.wmd-preview 
{ 
	background-color: #fff; 
    border: 1px dotted black;
    min-height: 20px;
    font-size: 13px;
    padding: 7px;
    overflow: auto;
}

.wmd-button-row 
{
	position: relative; 
	margin-left: 5px;
	margin-right: 5px;
	margin-bottom: 5px;
	margin-top: 10px;
	padding: 0px;  
	height: 20px;
}

.wmd-spacer
{
	width: 1px; 
	height: 20px; 
	margin-left: 14px;
	
	position: absolute;
	background-color: Silver;
	display: inline-block; 
	list-style: none;
}

.wmd-button {
    width: 20px;
    height: 20px;
    padding-left: 2px;
    padding-right: 3px;
    position: absolute;
    display: inline-block;
    list-style: none;
    cursor: pointer;
}

.wmd-button > span {
    background-image: url('http://pagedown.googlecode.com/hg/wmd-buttons.png');
    background-repeat: no-repeat;
    background-position: 0px 0px;
    width: 20px;
    height: 20px;
    display: inline-block;
}

.wmd-spacer1
{
    left: 50px;
}
.wmd-spacer2
{
    left: 175px;
}
.wmd-spacer3
{
    left: 300px;
}




.wmd-prompt-background
{
	background-color: Black;
}

.wmd-prompt-dialog
{
	border: 1px solid #999999;
	background-color: #F5F5F5;
}

.wmd-prompt-dialog > div {
	font-size: 0.8em;
	font-family: arial, helvetica, sans-serif;
}


.wmd-prompt-dialog > form > input[type="text"] {
	border: 1px solid #999999;
	color: black;
}

.wmd-prompt-dialog > form > input[type="button"]{
	border: 1px solid #888888;
	font-family: trebuchet MS, helvetica,...

JavaScript

var converter = Markdown.getSanitizingConverter();
var editor = new Markdown.Editor(converter);
editor.run();
$("#wmd-panel").hide();
$("#editBtn").click(function() {
    $("#wmd-panel").show();
});
$("#saveBtn").click(function() {
    $("#wmd-panel").hide();
});