feat: json rich text editor, blocks, asides, general structure

This commit is contained in:
Simon Emanuelsson
2024-02-07 11:57:36 +01:00
parent 2bd4e25403
commit 66faa41e98
53 changed files with 966 additions and 211 deletions

View File

@@ -0,0 +1,10 @@
import { nodesToHtml } from "./utils"
import type { JsonToHtmlProps } from "@/types/components/jsontohtml"
export default function JsonToHtml({ embeds, nodes, renderOptions = {} }: JsonToHtmlProps) {
if (!Array.isArray(nodes) || !nodes.length) {
return null
}
return <>{nodesToHtml(nodes, embeds, renderOptions).filter(Boolean)}</>
}