Skip to content

Commit 1ab0dde

Browse files
committed
Added help bar
1 parent 7b07305 commit 1ab0dde

12 files changed

+407
-55
lines changed

dist/codeparl-bootstrap-markdown-editor.min.js

Lines changed: 24 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/css/codeparl-bootstrap-markdown-editor.min.css

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/css/codeparl-bootstrap-markdown-editor.min.css.map

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

edit-screenshot.png

29.4 KB
Loading

preview-screenshot.png

34.5 KB
Loading

readme.md

Lines changed: 73 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,18 @@ This is a jQuery plugin written by H. Mugabo @codeparl.com.
1515

1616
* Preview support
1717
* Shortcuts
18+
* Automatic URL detection
1819
* Multiple instances on the same page
1920
* Fullscreen
2021
* Themes
22+
* help bar
2123
* i18n
2224

23-
## Screenshot
25+
## Screenshots
2426

25-
![Screenshot 1](screenshot.png)
27+
![Editor Screenshot](edit-screenshot.png)
28+
29+
![Preview Screenshot](preview-screenshot.png)
2630

2731
## Setup Example
2832

@@ -98,10 +102,76 @@ The following options can be passed as an object at the initialization of the pl
98102

99103
```javascript
100104
$('.mardown-editor').codeparlMarkdown({
101-
// Options
105+
fullscreen: true,
106+
content: {
107+
allowScript: false,
108+
},
109+
help: {
110+
show: true,
111+
link: {
112+
url: "#",
113+
text: "Advanced help"
114+
}
115+
},
116+
editor: {
117+
softTabs: true,
118+
theme: 'tomorrow',
119+
editorHeight: '500px',
120+
editorWidth: '100%',
121+
fontSize: 16,
122+
showGutter: false
123+
},
124+
toolbar: {
125+
bg: '#F7F7F4',
126+
buttonGroups: [{
127+
btnHeader1: 'H1',
128+
btnHeader2: 'H2',
129+
},
130+
{
131+
btnBold: 'fa-bold',
132+
btnItalic: 'fa-italic',
133+
},
134+
{
135+
btnList: 'fa-list-ul',
136+
btnOrderedList: 'fa-list-ol',
137+
btnRule: 'line',
138+
},
139+
{
140+
btnBlock: 'fa-quote-left',
141+
btnCode: '{ }',
142+
143+
},
144+
{
145+
btnLink: 'fa-link',
146+
btnImage: 'fa-image',
147+
},
148+
{
149+
btnHelp: 'fa-question-circle',
150+
151+
},
152+
{
153+
btnEdit: 'fa-edit',
154+
btnbrowse: 'fa-folder-open',
155+
btnPreview: 'fa-eye',
156+
btnFullscreen: 'fa-expand',
157+
},
158+
159+
],
160+
},
161+
onFileBrowse: function($input, aceEditor) {
162+
// you can access the file object
163+
//of this input here. you may also validate the file type
164+
// with your backend script
165+
166+
},
167+
onPreview: function(html, markdown) {
168+
169+
//do something with this html
170+
}
102171
});
103172
```
104173

174+
105175
Also, you can override the plugin default options. Example:
106176

107177
```javascript

screenshot.png

-10 KB
Binary file not shown.

0 commit comments

Comments
 (0)