Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

markdown-toolset

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

markdown-toolset

Tiny module for markdown editing.

  • 0.4.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

Markdown Toolset

Build Status Dependencies status Code Climate

js-standard-style

What?

Tiny module for markdown editing

Why?

There are plenty of markdown editors out there but no simple small tool that provides just basic markdown editing capabilities without binding you to specific editor implementation.

Where?

npm install markdown-toolset --save

or

bower install markdown-toolset --save

or just git clone and include dist/markdown-toolset.js on your page.

In browser it will try to find angular and register itself as markdown-toolset module. You then can include it in your module dependencies and inject markdownToolset service. Without angular it will just pollute global scope with markdownToolset object.

How?

var mt = require('markdown-toolset')

mt.italic('text')                                //*text*
mt.bold('text')                                  //**text**
mt.h1('text')                                    //# text
mt.h2('text')                                    //## text
mt.h3('text')                                    //### text
mt.h4('text')                                    //#### text
mt.h5('text')                                    //##### text
mt.h6('text')                                    //###### text
mt.header('### text')                            //#### text - returns next header or cycles back to text
mt.link('http://example.com', 'text')            //[text](http://example.com)
mt.image('http://example.com/image.png', 'text') //![text](http://example.com/image.png)



mt.ul('line1\nline2\nline3')                     //* line1
                                                 //* line2
                                                 //* line3

mt.ol('line1\nline2\nline3')                     //1. line1
                                                 //2. line2
                                                 //3. line3

mt.code('line1\nline2\nline3')                   //    line1
                                                 //    line2
                                                 //    line3

mt.hr()                                          //***
                                                 //

More?

Need to include support for .link() and .image(). Might be a good idea to make it configurable.

License?

MIT

Keywords

FAQs

Package last updated on 05 Jul 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc