@wecre8websites/strapi-page-builder-react
v1.2.2
Published
<div align="center"> <img alt="Page Builder" width="60" src="https://pagebuilder.wc8.io/pagebuilder_logo.png"> </div> <h1 align="center">Page Builder - React Companion</h1> <p align="center">Visual, drag and drop page editor for Strapi.</p> <p align="c
Readme
Documentation
Read the complete documentation at https://pagebuilder.wc8.io
Page Builder plugin for Strapi
Strapi is the leading open-source headless Content Management System. It’s 100% JavaScript, fully customizable and developer-first.
Visually edit and build your site using Strapi content and custom componets
The Page Builder plugin adds a visual page editor to Strapi, leting you drag and drop custom sections and connect them to CMS data.
This is the companion package which must me added in your React project and which connects with @wecre8websites/strapi-page-builder
Setting up Page Builder is quick and easy.
- Sign up for a free Page Builder API key at https://pagebuilder.wc8.io
- Add the @wecre8websites/strapi-page-builder package to your Strapi project.
- Add the new template relation field to one or more of your Strapi content types.
- Configure the Page Builder plugin with your API key, Editor URL and select the default content type and content.
- Open Page Builder from the sidebar menu and start building custom templates.
Migrating from DropZones to slots (optional)
Puck's <DropZone> is deprecated in favour of slot fields. Existing DropZones keep working, so migrate when you are ready.
Change your components. Replace each
<DropZone zone="name" />with a slot field calledname:fields: { items: { type: "slot" } }, render: ({ items: Items }) => <Items className="grid grid-cols-3" />,A zone whose name is built from the component id (for example
zone={`${id}-dropzone`}) is dynamic: pick any slot field name (sayitems) and map it in step 3.Allow the migration on Strapi. Set
PAGE_BUILDER_SLOT_MIGRATION=truein the Strapi environment and restart. This exposes two API-token endpoints (GET/PUT /api/page-builder/migration/templates); they return 404 without the flag. Create a Full access API token for the run.Run the migration from your front-end project:
# preview, nothing is written npx strapi-page-builder-migrate-slots --url http://localhost:1337 --token $TOKEN --dry-run # migrate; a backup of every template is written first npx strapi-page-builder-migrate-slots --url http://localhost:1337 --token $TOKEN --slot TestimonialGrid=itemsZones whose name equals a slot field migrate automatically.
--slot Component=fieldmoves a dynamic zone intofield; for several zones or custom shapes pass--map ./slot-map.mjs, a module whose default export is Puck'smigrateDynamicZonesForComponent({ Columns: (props, zones) => ({ ...props, columns: ... }) }). Templates it cannot migrate are reported and left untouched. It is safe to re-run.Unset
PAGE_BUILDER_SLOT_MIGRATIONand restart Strapi.
