在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):readmeio/markdown开源软件地址(OpenSource Url):https://github.com/readmeio/markdown开源编程语言(OpenSource Language):JavaScript 83.1%开源软件介绍(OpenSource Introduction):@readme/markdownReadMe's flavored Markdown parser and MDX rendering engine.
UsageBy default, the updated markdown package exports a function which takes a string of ReadMe-flavored markdown and returns a tree of React components: import React from 'react';
import rdmd from "@readme/markdown";
export default ({ body }) => (
<div className="markdown-body">
{rdmd(body)}
</div>
); Export MethodsIn addition to the default React processor, the package exports some other methods for transforming ReadMe-flavored markdown:
Settings & OptionsEach processor method takes an options object which you can use to adjust the output HTML or React tree. These options include:
Flavored SyntaxOur old editor rendered "Magic Block" components from a custom, JSON-based syntax. To provide seamless backwards-compatibility, our new processor ships with built in support for parsing this old format, and transpiles it straight in to our new, flavored Markdown. We've also sprinkled a bit of our own syntactic sugar on top to let you supercharge your docs. Learn more about ReadMe's flavored syntax! Local DevelopmentTo make changes to the RDMD engine locally is to run the local development server. Clone the repo, Credits
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论