Refactor to support custom Markdoc components (#52)
* Refactor to support custom Markdoc components Introduced a new file for custom Markdoc components and updated the client to render Markdoc content using React components. Modified content renderer to handle React nodes instead of dangerously setting inner HTML. * Add custom Markdoc tags support in Keystatic Introduced `CustomMarkdocTags` for defining user tags. Updated `transform` to accommodate the new custom tags, enhancing tag customization in the CMS.
This commit is contained in:
committed by
GitHub
parent
2afa736f4c
commit
1d10dd210a
@@ -1,3 +1,3 @@
|
||||
export function KeystaticContentRenderer(props: { content: unknown }) {
|
||||
return <div dangerouslySetInnerHTML={{ __html: props.content as string }} />;
|
||||
return <div>{props.content as React.ReactNode}</div>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user