Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wang125309/zjsmarkdowneditor
ZjsMarkdownEditor
https://github.com/wang125309/zjsmarkdowneditor
jquery markdown markdown-editor
Last synced: 27 days ago
JSON representation
ZjsMarkdownEditor
- Host: GitHub
- URL: https://github.com/wang125309/zjsmarkdowneditor
- Owner: wang125309
- Created: 2017-11-24T07:07:19.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2022-12-04T16:02:58.000Z (about 2 years ago)
- Last Synced: 2024-04-25T08:20:48.866Z (9 months ago)
- Topics: jquery, markdown, markdown-editor
- Language: JavaScript
- Size: 501 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Usages
===var editor = new MarkdownEditor({
'width': '100%',
'height': '100%',
'selector': 'body',
'callback': function() {
alert('Markdown editor')
}
}).init();You can install this module use npm
npm install zjs_markdown_editor
Selector may be jQuery selectors
Texts would auto save in your localStorage
You can get markdown text from localStorage or call the function
editor.getMarkDownText()clear localStorage
editor.clearStorage()Image Upload
You can upload your own image to your service.
Init your options like
var editor = new MarkdownEditor({
'width': '100%',
'height': '100%',
'selector': 'body',
'upload_url': '/upload/' //upload url
'upload_result_data': 'url', //result data like {url:xxxx}
'upload_name': 'pic', // Form input name
'callback': function() {
}
}).init();Depends on jQuery, jquery.caret.js, showdown
Live Demo : [https://wang125309.github.io/zjsmarkdowneditor.github.io/][1]
[1]: https://wang125309.github.io/zjsmarkdowneditor.github.io/