npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

wizmarkdown

v1.3.0

Published

1. `bower install wiz-markdown` 2. wizMarkdown requires `ngSanitize` so go ahead and add a script reference to `angular-sanitize.js` 3. Add `'wiz.markdown'` as a required module

Downloads

153

Readme

#wizMarkdown

##Install it

  1. bower install wiz-markdown
  2. wizMarkdown requires ngSanitize so go ahead and add a script reference to angular-sanitize.js
  3. Add 'wiz.markdown' as a required module

Example:

angular.module('myApp', [
  'wiz.markdown'
]);

##Use it

There are 4 options available to you with this plugin. In each example mdText is a scope variable that contains a markdown string.

###Display output using a directive

<wiz-markdown content="mdText"></wiz-markdown>

Q. Why can't you put content inside the directive?

A. It's best to bind to the element so you don't get any pre-compile flashes of the page

###..or a filter

<div ng-bind-html="mdText | wizMarkdownFltr"></div>

###..or a service

<div ng-bind-html="mdText"></div>

$scope.mdText = wizMarkdownSvc.Transform('#H1 heading');

##Editor

<wiz-markdown-editor content="mdText"></wiz-markdown-editor>

The editor is essentially a textbox but it now has the ability to automatically format the markdown text via toolbar buttons.

###Toolbar

<wiz-markdown-editor content="mdText">
    <wiz-toolbar-button command="bold">Bold</wiz-toolbar-button>
    <wiz-toolbar-button command="italic">Italic</wiz-toolbar-button>
</wiz-markdown-editor>

The editor has a toolbar that you place buttons on by adding them inside the editor.

You can specify your own styling and content for each button.

The toolbar is positioned above the editor by default but if you specify toolbar="bottom" to the editor e.g. <wiz-markdown-editor content="mdText" toolbar="bottom"> it will appear below.

###Available button commands

undo, redo, bold, italic, heading, code, ullist, ollist, indent, outdent, link, img, hr, h0, h1, h2, h3, h4, h5, h6, tab, untab

##Textarea only If you simply want a textarea without the toolbars then use:

<wiz-markdown-input content="mdTextarea"></wiz-markdown-input>

##Syntax highlighting

highlight.js is built in so all you need to do is pick a theme and drop the css link in the head of your webpage e.g.

<link href="http://yandex.st/highlightjs/8.0/styles/github.min.css" rel="stylesheet" type="text/css">

Highlight.js website has a good theme test page that you should find useful.

##Play

Now have a play by downloading the zip and running the code ;-)

##Licence

wizMarkdown is covered by the MIT Licence

Copyright (c) 2014 Grumpy Wizards

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.