markdown-it-fa-bullet-list
A markdown-it plugin to use font awesome icons in a list.
What it does
Adds appropriate classes and font awesome icons to bulleted lists as per the font awesome recommended documentation:
- Adds
.fa-ul
to any bulleted list - Prepends necessary html to any list item
<span class="fa-li"><i class="fas fa-check-square"></i></span>
Note: This package does not load the necessary font awesome dependencies for styling or SVG conversion. Learn more about add Font Awesome to you project at https://fontawesome.com/start.
Installation
npm install --save-dev markdown-it-fa-bullet-list
Usage
Use it the same as a normal markdown-it plugin:
const md = ;const faBulletedLists = ; const parser = ; let result = parser; // markdown string containing task list items
The default icon is the solid style check-square: fas fa-check-square
; to change this, pass the desired icon class to the class
option:
const parser = ;
Tests
npm installnpm test
Credits
Built on concepts from markdown-it-task-lists, Copyright (c) 2016, Revin Guillen.
License
ISC