Skip to content

kitconcept/volto-plate

Repository files navigation

kitconcept, GmbH

Volto Plate.js support
(@kitconcept/volto-plate)

An add-on that adds a Plate.js support in Volto.

npm Code analysis checks Unit tests Acceptance tests

Warning

This package is in early development and should be used with caution in production environments. It is subject to breaking changes and incomplete features. Please test thoroughly and report any issues you encounter.

Features

This package provides support for the Plate.js rich text editor in Volto.

It provides "on-the-fly" conversion between Slate.js and Plate.js data models, allowing seamless integration of Plate.js-based blocks in Volto. The conversion is only one-way: from Slate.js to Plate.js when loading data into the editor. Once in Plate.js, the data remains in Plate.js format. In the future, we may considering adding a backend package providing scripts for batch converting back and forth between the two formats if needed.

Plate.js uses the concept of "blocks" that collide with the Volto ones. From now on, we will refer to Volto blocks as "Volto blocks" and Plate.js blocks as "Plate blocks" to avoid confusion.

From the user perspective, it provides:

  • A total replacement of slate (text) default block using Plate.js (by default) using block model 3.
  • A new Plate block type, which uses Plate.js as the rich text editor.
  • Basic features using the inline floating toolbar, extending the default Volto one with experimental additions.
  • Slash commands to insert both Plate blocks and Volto blocks.
  • Split block in here slash command.
  • Add new block slash command.
  • Ability to insert a Volto image block as a Plate image block (inline).
  • Ability to insert existing "normal" Volto blocks via the (+) button inside the Plate block.

Behavior notes

It keeps in place the default Volto rich text block (slate-based) assumptions, so you can have multiple plate.js-based blocks in the same page. However, pressing ENTER won't create a new block, instead, it will create a new paragraph inside the same block, as is standard behavior in rich text editors. You can create new blocks using the block chooser as usual, and using the / slash command inside the plate.js-based block.

Developer features

From the developer perspective, it provides:

  • A Volto block adapter to reuse existing Volto blocks inside Plate-based editors (e.g. rich text).
  • A Plate plugin to reuse the Volto Image block inside Plate-based editors.
  • A Plate-based Text block implementation for Volto, replacing the default Slate-based one.

Installation

To install your project, you must choose the method appropriate to your version of Volto.

Volto 18 and later

Add @kitconcept/volto-plate to your package.json:

"dependencies": {
    "@kitconcept/volto-plate": "*"
}

Add @kitconcept/volto-plate to your volto.config.js:

const addons = ['@kitconcept/volto-plate'];

If this package provides a Volto theme, and you want to activate it, then add the following to your volto.config.js:

const theme = '@kitconcept/volto-plate';

Test installation

Visit http://localhost:3000/ in a browser, login, and check the awesome new features.

Development

The development of this add-on is done in isolation using a new approach using pnpm workspaces and latest mrs-developer and other Volto core improvements. For this reason, it only works with pnpm and Volto 18 (currently in alpha).

Prerequisites ✅

Installation 🔧

  1. Clone this repository, then change your working directory.

    git clone [email protected]:collective/volto-plate.git
    cd volto-plate
  2. Install this code base.

    make install

Make convenience commands

Run make help to list the available commands.

help                             Show this help
install                          Installs the add-on in a development environment
start                            Starts Volto, allowing reloading of the add-on during development
build                            Build a production bundle for distribution of the project with the add-on
i18n                             Sync i18n
ci-i18n                          Check if i18n is not synced
format                           Format codebase
lint                             Lint, or catch and remove problems, in code base
release                          Release the add-on on npmjs.org
release-dry-run                  Dry-run the release of the add-on on npmjs.org
test                             Run unit tests
ci-test                          Run unit tests in CI
backend-docker-start             Starts a Docker-based backend for development
storybook-start                  Start Storybook server on port 6006
storybook-build                  Build Storybook
acceptance-frontend-dev-start    Start acceptance frontend in development mode
acceptance-frontend-prod-start   Start acceptance frontend in production mode
acceptance-backend-start         Start backend acceptance server
ci-acceptance-backend-start      Start backend acceptance server in headless mode for CI
acceptance-test                  Start acceptance tests in interactive mode
ci-acceptance-test               Run acceptance tests in headless mode for CI

Development environment set up

Install package requirements.

make install

Start developing

Start the backend.

make backend-docker-start

In a separate terminal session, start the frontend.

make start

Lint code

Run ESlint, Prettier, and Stylelint in analyze mode.

make lint

Format code

Run ESlint, Prettier, and Stylelint in fix mode.

make format

i18n

Extract the i18n messages to locales.

make i18n

Unit tests

Run unit tests.

make test

Run Acceptance tests

This project uses Playwright for acceptance testing.

Run each of these steps in separate terminal sessions.

In the first session, start the frontend in development mode.

make acceptance-frontend-dev-start

In the second session, start the backend acceptance server.

make acceptance-backend-start

In the third session, start the acceptance tests in interactive mode.

make acceptance-test

License

The project is licensed under the MIT license.

Credits and acknowledgements 🙏

Generated using Cookieplone (0.9.8) and cookieplone-templates (1d2012a) on 2025-09-23 09:45:10.835983. A special thanks to all contributors and supporters!

About

platejs.org block Plone Volto add-on

Topics

Resources

Stars

Watchers

Forks