This commit is contained in:
2026-02-11 22:30:04 +09:00
parent be1f627457
commit 30835f78d4
75 changed files with 4878 additions and 143 deletions

34
puck.config.tsx Normal file
View File

@@ -0,0 +1,34 @@
import type { Config } from "@puckeditor/core";
type Props = {
HeadingBlock: { title: string };
RichText: { content: string };
};
const puckConfig: Config<Props> = {
components: {
HeadingBlock: {
fields: {
title: { type: "text" },
},
defaultProps: {
title: "Heading",
},
render: ({ title }) => (
<div style={{ padding: 64 }}>
<h1>{title}</h1>
</div>
),
},
RichText: {
fields: {
content: { type: "textarea" },
},
render: ({ content }) => (
<div dangerouslySetInnerHTML={{ __html: content }} />
),
},
},
};
export default puckConfig;