基于 prismJS 简易版code美化、高亮展示。
请使用下面的语言简写
- 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
{
"plugins": [
["prismjs", {
"languages": ["javascript", "css", "markup"],
"plugins": ["line-numbers"],
"theme": "twilight",
"css": true
}]
]
}