1. markdown-it-highlightjs-external
highlight.js plugin for markdown-it to use external link
markdown-it-highlightjs-external
Package: markdown-it-highlightjs-external
Created by: CHENXCHEN
Last modified: Sun, 08 May 2022 20:21:07 GMT
Version: 1.0.1
License: MIT
Downloads: 1,370
Repository: https://github.com/CHENXCHEN/markdown-it-highlightjs-external

Install

npm install markdown-it-highlightjs-external
yarn add markdown-it-highlightjs-external

markdown-it-highlightjs-external

Preset use highlight.js with markdown-it by external_link
You should add hljs external_link for use it.
example:

Usage

 var md = require('markdown-it')()
var mihe = require('markdown-it-highlightjs-external')
md.use(mihe, {
    hljs: 'auto', // If this set auto, plugin will use window.hljs for highlight.
    highlighted: true, // If this set false, plugin will disabled highlight.
    langCheck: function(lang) {}, // If hljs language parsing file missing, this function will callback.
})

Options

Name Description Default
hljs The hljs parsing object. Default to use window.hljs auto
highlighted Whether or not to enable the syntax highlighting true
langCheck This should be function for missing language callback function(lang){}

RELATED POST

Enhancing Vue.js Development: Harnessing the Potential of Vue-Loader

Enhancing Vue.js Development: Harnessing the Potential of Vue-Loader

Simplify Data Validation in Vue.js: A Step-by-Step Guide to Using Regex

Simplify Data Validation in Vue.js: A Step-by-Step Guide to Using Regex

Troubleshooting Made Easy: Common Issues and Solutions with vue-loader Without vue-cli

Troubleshooting Made Easy: Common Issues and Solutions with vue-loader Without vue-cli

Optimizing Webpack 4 with Vue CLI 3: Disabling the Cache-Loader

Optimizing Webpack 4 with Vue CLI 3: Disabling the Cache-Loader

Step-by-Step Guide: How to Add a Function to Your Vuex Plugin

Step-by-Step Guide: How to Add a Function to Your Vuex Plugin