-
Notifications
You must be signed in to change notification settings - Fork 0
/
form_markdown.html
225 lines (173 loc) · 9.6 KB
/
form_markdown.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
<link href="css/plugins/bootstrap-markdown/bootstrap-markdown.min.css" rel="stylesheet">
<div class="wrapper wrapper-content">
<div class="row">
<div class="col-lg-12">
<div class="ibox ">
<div class="ibox-title">
<h5>Bootstrap markdown <small>http://www.codingdrama.com/bootstrap-markdown/</small></h5>
<div class="ibox-tools">
<a class="collapse-link">
<i class="fa fa-chevron-up"></i>
</a>
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
<i class="fa fa-wrench"></i>
</a>
<ul class="dropdown-menu dropdown-user">
<li><a href="#" class="dropdown-item">Config option 1</a>
</li>
<li><a href="#" class="dropdown-item">Config option 2</a>
</li>
</ul>
<a class="close-link">
<i class="fa fa-times"></i>
</a>
</div>
</div>
<div class="ibox-content">
<p>
Bootstrap-Markdown designed to be easily integrated with your bootstrap project. It exposes useful API that allow you to fully hook-in into the plugin
</p>
<p>
Switch regular textarea within your form into Bootstrap-Markdown editor seamlessly by adding <code>data-provide="markdown"</code> attribute
</p>
<textarea name="content" data-provide="markdown" rows="10">
h1 header
============
Paragraphs are separated by a blank line.
2nd paragraph. *Italic*, **bold**, and `monospace`. Itemized lists
look like:
* this one
* that one
* the other one
</textarea>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<div class="ibox ">
<div class="ibox-content">
<h2>
Usage
</h2>
<p>
Beside using above data-attributes, you could call it via code
</p>
<pre>
$("#some-textarea").markdown({autofocus:false,savable:false}) </pre>
<h4>
Available options are:
</h4>
<table class="table table-striped">
<thead>
<tr>
<th>Option Name</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<code>autofocus</code>
</td>
<td><code>boolean</code></td>
<td>Indicates that editor will focused after instantiated. Default to <code>false</code></td>
</tr>
<tr>
<td>
<code>savable</code>
</td>
<td><code>boolean</code></td>
<td>Indicates that editor will have save button and action. Default to <code>false</code></td>
</tr>
<tr>
<td>
<code>hideable</code>
</td>
<td><code>boolean</code></td>
<td>If set to <code>true</code> then the editor will be hidden on <code>blur</code> event. Default to <code>false</code></td>
</tr>
<tr>
<td>
<code>width</code>
</td>
<td><code>mixed</code></td>
<td>The editor width. Default to <code>inherit</code>. You could supply any numerical value (that will be set as css), or supply valid Bootstrap class (something like <code>span2</code>)</td>
</tr>
<tr>
<td>
<code>height</code>
</td>
<td><code>mixed</code></td>
<td>The editor height. Default to <code>inherit</code></td>
</tr>
<tr>
<td>
<code>resize</code>
</td>
<td><code>string</code></td>
<td>Option to disable or change the resize property, possible values <code>none</code>,<code>both</code>,<code>horizontal</code>,<code>vertical</code>. Default <code>none</code><br>
If this option is enabled, the user will be able to resize the editor and preview screen.<br><br>
<div class="alert alert-warning">
<strong>Browser support</strong>
<p>This is currently only supported on limited browsers. See <a href="http://caniuse.com/css-resize" target="_blank">Can you run it: Resize</a> for all supported browsers</p>
</div>
</td>
</tr>
<tr>
<td>
<code>iconlibrary</code>
</td>
<td><code>string</code></td>
<td>The icon library to use. Glyphicons (<code>glyph</code>) and Font Awesome (<code>fa</code>) are supported. In order to use Font Awesome properly, you'll need to <a href="http://fontawesome.io/get-started/">include Font Awesome stylesheet</a> yourself. Default to <code>glyph</code></td>
</tr>
<tr>
<td>
<code>language</code>
</td>
<td><code>string</code></td>
<td>Localization setting. Default to <code>en</code></td>
</tr>
<tr>
<td>
<code>footer</code>
</td>
<td><code>mixed</code></td>
<td>Footer dom. Can be string or callback. Default is empty string</td>
</tr>
<tr>
<td>
<code>fullscreen</code>
</td>
<td><code>object</code></td>
<td>Contains <code>enable</code> (<code>bool</code>) and <code>icons</code> (<code>object</code>) keys.</td>
</tr>
<tr>
<td>
<code>hiddenButtons</code>
</td>
<td><code>mixed</code></td>
<td>Array or string of button names to be hidden. Default is empty string</td>
</tr>
<tr>
<td>
<code>disabledButtons</code>
</td>
<td><code>mixed</code></td>
<td>Array or string of button names to be disabled. Default is empty string</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<!-- Mainly scripts -->
<!-- Custom and plugin javascript -->
<script src="js/common.js"></script>
<!-- Bootstrap markdown -->
<script src="js/plugins/bootstrap-markdown/bootstrap-markdown.js"></script>
<script src="js/plugins/bootstrap-markdown/markdown.js"></script>