Skip to content

Commit

Permalink
wmd is ready to work on multiple textareas
Browse files Browse the repository at this point in the history
  • Loading branch information
anandology committed Dec 9, 2009
1 parent 239b6d3 commit 78612cd
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 9 deletions.
28 changes: 23 additions & 5 deletions wmd-test.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,18 @@
</head>

<body>
<div id="wmd-editor" class="wmd-panel">
<div id="wmd-button-bar"></div>
<textarea id="wmd-input"></textarea>
<div id="xwmd-editor" class="wmd-panel">
<div id="xwmd-button-bar" class="wmd-button-bar"></div>
<textarea id="xwmd-input" class="wmd-input"></textarea>
</div>
<div id="xwmd-preview" class="wmd-panel wmd-preview"></div>

<div id="ywmd-editor" class="wmd-panel">
<div id="ywmd-button-bar" class="wmd-button-bar"></div>
<textarea id="ywmd-input" class="wmd-input"></textarea>
</div>
<div id="wmd-preview" class="wmd-panel"></div>
<div id="wmd-output" class="wmd-panel"></div>
<div id="ywmd-preview" class="wmd-panel wmd-preview"></div>


<p>To test that page up/down and arrow keys work, copy this above the WMD
control.</p>
Expand Down Expand Up @@ -149,5 +155,17 @@
</p>

<script type="text/javascript" src="wmd.js"></script>
<script type="text/javascript">
setup_wmd({
input: 'xwmd-input',
preview: 'xwmd-preview',
button_bar: 'xwmd-button-bar'
});
setup_wmd({
input: 'ywmd-input',
preview: 'ywmd-preview',
button_bar: 'ywmd-button-bar'
});
</script>
</body>
</html>
4 changes: 2 additions & 2 deletions wmd.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ body
background-color: Aquamarine;
}

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

#wmd-input
.wmd-input
{
height: 500px;
width: 100%;
Expand Down
2 changes: 0 additions & 2 deletions wmd.js
Original file line number Diff line number Diff line change
Expand Up @@ -2306,5 +2306,3 @@ if(!Attacklab.wmd)
};

}

setup_wmd();

0 comments on commit 78612cd

Please sign in to comment.