Skip to content

JavaScript function to preserve bullets, numbering, code blocks and blockquote syntax and indentation upon new line in textareas

License

Notifications You must be signed in to change notification settings

jamiebicknell/Markdown-Helper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Markdown Helper

A JavaScript based Markdown helper which when you hit the return key, it checks to see if the line is a bullet, numbered list, code block or blockquote and automatically indents and adds the Markdown syntax. If you hit return again on an empty line, it will remove that item and return to regular paragraph text.

View the working example

Example Usage

<script type='text/javascript' src='./markdown-helper.js'></script>
<textarea name='input' onkeypress='return MarkdownHelper(this,event);'></textarea>

License

Markdown Helper is licensed under the MIT license, see LICENSE.md for details.

About

JavaScript function to preserve bullets, numbering, code blocks and blockquote syntax and indentation upon new line in textareas

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published