Git Product home page Git Product logo

markdown-it-slack's Introduction

slack-markdown-it

๐Ÿš€ This plugin overrides default Github style to Slack style for syntax parser of the following:

  1. Bold (Using * bold * for strong emphasis instead of ** bold ** or __ bold __)

  2. Italic (Using _ italic _ for emphasis instead of * bold *)

  3. Strikethrough (Using ~ strikethrough ~ instead of ~~ strikethrough ~~)

Demo: https://codesandbox.io/embed/j2y24r3yq9

How to install ๐Ÿ› ๏ธ

  1. It's written as plugin for Markdown so it requires markdown-it to be installed.
npm install markdown-it --save
yarn add markdown-it
  1. Install using npm or yarn
npm install slack-markdown-it --save
yarn add slack-markdown-it

How to use ๐Ÿ‘จโ€๐Ÿ’ป

Using import

import Markdown from "markdown-it";
import MarkdownSlack from 'slack-markdown-it';

const md = Markdown();
md.use(MarkdownSlack);

md.renderInline(`*This is me in bold*, and he is in _italic_. Don't ~strikethrough~ me!`)

Using require

const md = require('markdown-it')();
md.use(require('slack-markdown-it'));

md.renderInline(`*This is me in bold*, and he is in _italic_. Don't ~strikethrough~ me!`)

Coming soon ๐Ÿน ๐Ÿ‘ฉโ€๐Ÿ”ฌ

  • Customize which syntax to override.

  • Optimization for tag rendering.

  • Test coverage.

License

MIT

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.