开源软件名称(OpenSource Name):threepointone/markdown-in-js开源软件地址(OpenSource Url):https://github.com/threepointone/markdown-in-js开源编程语言(OpenSource Language):JavaScript 100.0%开源软件介绍(OpenSource Introduction):markdown-in-jszero-overhead markdown in your react components usageadd import markdown from 'markdown-in-js'
const App = () => markdown`
## This is some content.
You can write _markdown_ as you'd like.
${ <span> interpolate more <Content/> </span> }
you can <i>inline *html*</i> or even <OtherComponents/>, wow
<div style=${{ fontWeight: 'bold' }}
className=${'some more styles'}
onClick=${handler}>
interpolate attributes as expected
</div>
`
custom componentsYou can use custom components for markdown primitives like so - import md from 'markdown-in-js'
import { MyHeading, MyLink } from './path/to/components'
const App = () => md({ h1: MyHeading, a: MyLink })`
# this will be a custom header
[custom link component](/url/to/link)
` todo
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论