Giter VIP home page Giter VIP logo

markdown-it-fontawesome's Introduction

markdown-it-fontawesome

Markdown-it plugin that adds Font Awesome icons support.

Turn this:

Hello World! :fa-flag:

Into this:

<p>Hello World! <i class="fa fa-flag"></i></p>

Install

$ npm install markdown-it-fontawesome --save

Usage

Enable plugin

var md = require('markdown-it');
var fa = require('markdown-it-fontawesome');

md().use(fa);

Font Awesome version 4 example

Hello World! :fa-flag:

- [:fa-google: Google](https://www.google.com/)
- [:fa-github: GitHub](https://github.com/)

Gets converted to:

<p>Hello World! <i class="fa fa-flag"></i></p>
<ul>
<li><a href="https://www.google.com/"><i class="fa fa-google"></i> Google</a></li>
<li><a href="https://github.com/"><i class="fa fa-github"></i> GitHub</a></li>
</ul>

Font Awesome 5+ example

Hello World! :fal-flag:

- [:fab-google: Google](https://www.google.com/)
- [:fab-github: GitHub](https://github.com/)

gets converted to:

<p>Hello World! <i class="fal fa-flag"></i></p>
<ul>
<li><a href="https://www.google.com/"><i class="fab fa-google"></i> Google</a></li>
<li><a href="https://github.com/"><i class="fab fa-github"></i> GitHub</a></li>
</ul>

Credits

Original: https://github.com/nunof07

Font awesome 5 support and tests: https://github.com/rjjakes

License

MIT

markdown-it-fontawesome's People

Contributors

dependabot[bot] avatar nunof07 avatar rjjakes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

markdown-it-fontawesome's Issues

Loads plugins directly into the page without using a package system.

This is a great plugin, is it possible to use it directly like other markdown-it plugins?

Usage with package:

var md = require('markdown-it');
var fa = require('markdown-it-fontawesome');
 
md().use(fa);

Direct use I mean:
var md = window.markdownit().use(window.markdownitFontAwesome);

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.