@founderhq/payload-plugin
v0.1.0
Published
Payload CMS helpers for FounderHQ Publish rich text compatibility
Readme
@founderhq/payload-plugin
Payload CMS helpers for FounderHQ Publish. Install this in a client Payload app so FounderHQ-published rich text remains editable in Payload Admin and renderable on the public blog.
Install
npm install @founderhq/payload-plugin
# or
pnpm add @founderhq/payload-pluginRich Text Setup
Use the helper on the Payload rich text field that FounderHQ publishes into:
import { lexicalEditor } from "@payloadcms/richtext-lexical";
import { founderHQPayloadFeatures } from "@founderhq/payload-plugin";
export const BlogPosts = {
slug: "blog-posts",
fields: [
{
name: "content",
type: "richText",
editor: lexicalEditor({
features: founderHQPayloadFeatures(),
}),
},
],
};This includes Payload's default Lexical features, table support, and the FounderHQ embed block. The field used here should be the same rich text field that FounderHQ maps as the Payload content field.
Rendering Embeds
If your frontend renders Payload Lexical blocks manually, handle blocks with
blockType: "founderhqEmbed". The package exports
renderFounderHQEmbedLexicalNodeHtml for simple HTML rendering:
import { renderFounderHQEmbedLexicalNodeHtml } from "@founderhq/payload-plugin";
const html = renderFounderHQEmbedLexicalNodeHtml(node);This is what keeps embeds visible outside Payload Admin too.
