Skip to Content
Strapi Page Builder 1.0 is now available 🎉

<Editor /> Component

import { Editor } from "@wecre8websites/strapi-page-builder-react"; import "@wecre8websites/strapi-page-builder-react/editor.css" import { notFound } from "next/navigation"; import config from "../../blocks/PageBuilderConfig"; const strapiConfig = { url: process.env.NEXT_PUBLIC_API_URL as string, authToken: process.env.STRAPI_ADMIN_TOKEN as string, imageUrl: process.env.NEXT_PUBLIC_IMAGE_URL as string, } export default async function EditorPage({ searchParams }: { searchParams: Promise<{ _pagebuilderToken?: string }> }) { const { _pagebuilderToken } = await searchParams; if (!_pagebuilderToken) return notFound(); return <Editor config={config} apiKey={process.env.PAGE_BUILDER_API_KEY as string} strapi={strapiConfig} /> }

Props

ParameterDescriptionRequired
apiKeyThe API key for the Strapi Page Builder. Sign up for free.true
configThe configuration object for the Strapi Page Builder. See Editor Configuration.true
strapiThe configuration object for Strapi.false

Strapi Configuration Object

ParameterDescriptionRequired
urlThe URL of the Strapi API.true
authTokenThe authentication token for Strapi if required.false
imageUrlThe URL of the image server. Required if using the media field typefalse
Last updated on