Copy blocks between different Umbraco CMS websites running on different URLs.
Umbraco has built-in clipboard support for copying blocks within a single instance. This package extends that to work across sites by combining an Umbraco backoffice extension with a companion Chrome Extension that acts as a cross-origin clipboard bridge.
Assumption: Both sites must have the same block/element type structure (matching content type GUIDs).
Site A Chrome Extension Site B
+-----------------+ +------------------+ +-----------------+
| Copy to External | ---> | chrome.storage | ---> | Paste from |
| | | .local | | External |
+-----------------+ +------------------+ +-----------------+
- Click "Copy to External" on a Block List or Block Grid property on Site A
- The Chrome extension stores the serialized block data
- Navigate to Site B
- Click "Paste from External" on a compatible property
- Review the paste preview and confirm
- Blocks are inserted with freshly generated keys
Install the NuGet package into your Umbraco 17+ project:
dotnet add package Umbraco.Community.BlockCopyOr add it to your .csproj:
<PackageReference Include="Umbraco.Community.BlockCopy" Version="1.*" />The package registers two property actions on Block List and Block Grid editors:
- Copy to External (appears when the property has a value)
- Paste from External (appears when the property is writable)
The Chrome extension is required for cross-site communication. Install it in developer mode:
-
Build the extension:
cd chrome-extension npm install npm run build -
Load in Chrome:
- Open Chrome and navigate to
chrome://extensions - Enable Developer mode (toggle in the top-right corner)
- Click "Load unpacked"
- Select the
chrome-extensionfolder (the one containingmanifest.json)
- Open Chrome and navigate to
-
Verify: You should see the "Umbraco Block Copy" extension in your toolbar. Click the icon to see the popup showing clipboard status.
-
Pin it (optional): Click the puzzle piece icon in Chrome's toolbar and pin "Umbraco Block Copy" for easy access.
Note: The extension needs to be loaded on both machines/browsers where you want to copy and paste blocks. If you're working on a single machine with two Umbraco sites, one installation covers both.
| Permission | Why |
|---|---|
storage |
Stores copied block data in chrome.storage.local |
| Content script on all URLs | Detects Umbraco backoffice pages to enable the bridge |
The extension only activates on pages running the Umbraco backoffice (detected by the presence of <umb-backoffice-main> in the DOM). On all other pages it does nothing.
- Navigate to a content node with a Block List or Block Grid property
- Click the three-dot menu on the property
- Select "Copy to External"
- A notification confirms the blocks were copied
- The Chrome extension popup will show the clipboard contents
- Navigate to the target site's content node
- Click the three-dot menu on a Block List or Block Grid property
- Select "Paste from External"
- Review the paste preview showing:
- Source URL and timestamp
- Number of blocks
- Content type GUIDs (verify these match your target site)
- Warnings for media references or editor type mismatches
- Click "Paste" to confirm
Important: Pasting replaces the current property value. It does not append blocks.
- Media references (images, files) are passed through as-is. The GUIDs may not match on the target site - you'll need to re-select media items after pasting.
- Nested block editors (blocks containing other Block List/Grid values) have their inner keys preserved, not regenerated. This may cause key collisions in complex scenarios.
- Culture-variant blocks are preserved structurally but the target site must support the same cultures.
- Chrome only (no Firefox/Safari support).
- Node.js >= 22.17.1
- npm >= 10.9.2
- .NET 10.0 SDK
- Umbraco CMS 17+
Frontend extension:
cd src/Umbraco.Community.BlockCopy.Client
npm install
npm run buildChrome extension:
cd chrome-extension
npm install
npm run build.NET project:
dotnet buildUnit tests (52 tests):
cd src/Umbraco.Community.BlockCopy.Client
npm testChrome extension tests (20 tests):
cd chrome-extension
npm testE2E tests (7 tests):
cd src/Umbraco.Community.BlockCopy.Client
npx playwright install chromium
npm run test:e2eUmbraco.Community.BlockCopy/
+-- src/
| +-- Umbraco.Community.BlockCopy/ # .NET NuGet package
| | +-- BlockCopyComposer.cs
| | +-- wwwroot/App_Plugins/BlockCopy/ # Built frontend assets
| +-- Umbraco.Community.BlockCopy.Client/ # Frontend extension
| +-- src/
| | +-- models/ # BlockSerializer, PortableBlockData
| | +-- bridge/ # DOM event bridge to Chrome extension
| | +-- actions/ # Copy/Paste property actions
| | +-- modals/ # Paste preview modal
| +-- e2e/ # Playwright E2E tests
+-- chrome-extension/ # Chrome Extension (MV3)
| +-- src/
| | +-- background.ts # Service worker
| | +-- content-script.ts # Umbraco page detection + event relay
| | +-- popup.ts # Extension popup UI
| | +-- storage/ # chrome.storage.local wrapper
| +-- tests/ # Vitest unit tests
+-- Umbraco.Community.BlockCopy.sln
The system has three layers:
- Umbraco Extension - Property actions that serialize blocks to a
PortableBlockDataformat and dispatch/receive DOMCustomEvents - Chrome Content Script - Injected into Umbraco backoffice pages, relays events between the DOM and the Chrome service worker
- Chrome Service Worker - Stores/retrieves block data in
chrome.storage.local
Key regeneration on paste follows the same pattern as Umbraco's internal UmbBlockPropertyValueCloner, using crypto.randomUUID() with a fallback to crypto.getRandomValues() for non-secure contexts.
Contributions are welcome! Please open an issue or pull request.
MIT