@44north/blog-utilities 中文文档教程
@44north/blog-utilities
一个包含许多小型实用程序的模块,可在使用博客时使用。
Install
npm install @44north/blog-utilities
或者
yarn add @44north/blog-utilities
generateHtmlFromJson
import { generateHtmlFromJson } from "@44north/blog-utilities";
const testJson = {
type: "doc",
content: [
{
type: "paragraph",
content: [
{
type: "text",
text: "Example "
},
{
type: "text",
marks: [
{
type: "bold"
}
],
text: "Text"
}
]
}
]
};
console.log(generateHtmlFromJson(testJson)); // -> <p>Example <strong>Text</strong></p>
@44north/blog-utilities
A Module containing a number of small utilities to use when working with blogs.
Install
npm install @44north/blog-utilities
or
yarn add @44north/blog-utilities
generateHtmlFromJson
import { generateHtmlFromJson } from "@44north/blog-utilities";
const testJson = {
type: "doc",
content: [
{
type: "paragraph",
content: [
{
type: "text",
text: "Example "
},
{
type: "text",
marks: [
{
type: "bold"
}
],
text: "Text"
}
]
}
]
};
console.log(generateHtmlFromJson(testJson)); // -> <p>Example <strong>Text</strong></p>
更多
你可能也喜欢
- 3base-ui 中文文档教程
- @21epub/epub-ruler 中文文档教程
- @30shine/react-native-video-cache30-s 中文文档教程
- @36node/query-normalizr 中文文档教程
- @3rdvision/epir-papyrus-api 中文文档教程
- @8bitago/hello-world 中文文档教程
- @abcpros/xaddress 中文文档教程
- @acentswap/aceswap-uikit 中文文档教程
- @acoustic-content-sdk/app 中文文档教程
- @acoustic-content-sdk/react-api 中文文档教程