Skip to content

FireLeafone/code-highlight

Repository files navigation

code-prism-highlight

基于 prismJS 简易版code美化、高亮展示。

AXHR AXHR version npm download

支持语言

请使用下面的语言简写

  • markup (例HTML, XML)
  • css
  • js
  • jsx

使用

@import "~code-prism-highlight/lib/theme/theme-dark.css"
import codeHighlight from "code-prism-highlight";

var highCode = codeHighlight(`code`, "js", {theme: "dark"})

prismJS

更多语言支持,可以使用 prismJS

按需加载

babel-plugin-prismjs

{
  "plugins": [
    ["prismjs", {
        "languages": ["javascript", "css", "markup"],
        "plugins": ["line-numbers"],
        "theme": "twilight",
        "css": true
    }]
  ]
}

About

highlight and beautify code

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published