|
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
|
2 <html xmlns="http://www.w3.org/1999/xhtml"> |
|
3 <head> |
|
4 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> |
|
5 <title>markItUp! Universal markup editor</title> |
|
6 <link rel="stylesheet" type="text/css" href="images/style.css" /> |
|
7 <!-- jQuery --> |
|
8 <script type="text/javascript" src="jquery.pack.js"></script> |
|
9 <!-- markItUp! --> |
|
10 <script type="text/javascript" src="markitup/jquery.markitup.pack.js"></script> |
|
11 <!-- markItUp! toolbar settings --> |
|
12 <script type="text/javascript" src="markitup/sets/default/set.js"></script> |
|
13 <!-- markItUp! skin --> |
|
14 <link rel="stylesheet" type="text/css" href="markitup/skins/markitup/style.css" /> |
|
15 <!-- markItUp! toolbar skin --> |
|
16 <link rel="stylesheet" type="text/css" href="markitup/sets/default/style.css" /> |
|
17 </head> |
|
18 <body> |
|
19 <script type="text/javascript"> |
|
20 <!-- |
|
21 $(document).ready(function() { |
|
22 // Add markItUp! to your textarea in one line |
|
23 // $('textarea').markItUp( { Settings }, { OptionalExtraSettings } ); |
|
24 $('#markItUp').markItUp(mySettings); |
|
25 |
|
26 // You can add content from anywhere in your page |
|
27 // $.markItUp( { Settings } ); |
|
28 $('.add').click(function() { |
|
29 $.markItUp( { openWith:'<opening tag>', |
|
30 closeWith:'<\/closing tag>', |
|
31 placeHolder:"New content" |
|
32 } |
|
33 ); |
|
34 return false; |
|
35 }); |
|
36 |
|
37 // And you can add/remove markItUp! whenever you want |
|
38 // $(textarea).markItUpRemove(); |
|
39 $('.toggle').click(function() { |
|
40 if ($("#markItUp.markItUpEditor").length === 1) { |
|
41 $("#markItUp").markItUpRemove(); |
|
42 $("span", this).text("get markItUp! back"); |
|
43 } else { |
|
44 $('#markItUp').markItUp(mySettings); |
|
45 $("span", this).text("remove markItUp!"); |
|
46 } |
|
47 return false; |
|
48 }); |
|
49 }); |
|
50 --> |
|
51 </script> |
|
52 <h1><a href="http://markitup.jaysalvat.com/">markItUp!</a></h1> |
|
53 <p><em><a href="http://www.jaysalvat.com">By Jay Salvat</a></em></p> |
|
54 <p>Downloads, examples and documentation at <a href="http://markitup.jaysalvat.com">http://markitup.jaysalvat.com</a>.</p> |
|
55 <p>Click <a href="#" class="add">this link to insert content</a> from anywhere in the page or <a href="#" class="toggle">this one to <span>remove markItUp!</span></a></p> |
|
56 <p> |
|
57 <textarea id="markItUp" cols="80" rows="20"> |
|
58 <h1>Welcome on markItUp!</h1> |
|
59 |
|
60 <p><strong>markItUp!</strong> is a JavaScript plugin built on the jQuery library. It allows you to turn any textarea into a markup editor. Html, Textile, Wiki Syntax, Markdown, BBcode or even your own markup system can be easily implemented.</p> |
|
61 </textarea> |
|
62 </p> |
|
63 <p>Support the projet : <a href="http://markitup.jaysalvat.com/">Donate</a> | <a href="http://markitup.jaysalvat.com/">Contact</a></p> |
|
64 </body> |
|
65 </html> |