npm.io
12.0.0 • Published 9h ago

@eeacms/volto-embed

Licence
MIT
Version
12.0.0
Deps
2
Size
196 kB
Vulns
0
Weekly
0

@eeacms/volto-embed

Releases Pipeline Coverage

GDPR-compliant external resource embedding components for Volto. Right now it does several things:

  • it replaces the Map default block with a variant that's data-protected
  • it provides a component <PrivacyProtection> which can be used to wrap other components that wrap sensitive content
  • it provides a function addPrivacyProtectionToSchema which adds the fields that are required to configure the "data protection" for any component wrapped in <PrivacyProtection>. See src/Iframe/ViewIframe for details on how to implement.

Upgrade

Upgrading to 12.x

This version requires Volto 18 or Volto 19 and Node.js 22.

This release adds Volto 19 support, and the published package moves to packages/volto-embed. The maps widget now renders its block icon with Volto's Image component instead of the semantic-ui-react one; the exports, the block schemas and the widget registration stay the same.

Breaking changes
  • Node.js 22 or newer is required (engines.node >= 22), 11.x declared no engine.
  • React 18 is required. The package declares react and react-dom as ^18.2.0 peers, 11.x declared no peers.

Requirements

Backend
Frontend
  • Node.js: >=22.0.0

Installation

  1. Make sure you have a Plone backend up-and-running at http://localhost:8080/Plone

    docker compose up backend
  2. Start Volto frontend

  • If you already have a volto project, just update package.json:

    "dependencies": {
        "@eeacms/volto-embed": "*"
    }

    and volto.config.js:

    const addons = ['@eeacms/volto-embed'];
  • If not, create one with Cookieplone, as recommended by the official Plone documentation for Volto 18+:

    uvx cookieplone project
    cd project-title
  1. Install or update dependencies, then start the project:

    make install

    For a Cookieplone project, start the backend and frontend in separate terminals:

    make backend-start
    make frontend-start
  2. Go to http://localhost:3000

  3. Happy editing!

License

See LICENSE.md for details.

Funding

European Environment Agency (EU)

Keywords