Umbraco.Community.BlockPreview
5.1.0
dotnet add package Umbraco.Community.BlockPreview --version 5.1.0
NuGet\Install-Package Umbraco.Community.BlockPreview -Version 5.1.0
<PackageReference Include="Umbraco.Community.BlockPreview" Version="5.1.0" />
<PackageVersion Include="Umbraco.Community.BlockPreview" Version="5.1.0" />
<PackageReference Include="Umbraco.Community.BlockPreview" />
paket add Umbraco.Community.BlockPreview --version 5.1.0
#r "nuget: Umbraco.Community.BlockPreview, 5.1.0"
#:package Umbraco.Community.BlockPreview@5.1.0
#addin nuget:?package=Umbraco.Community.BlockPreview&version=5.1.0
#tool nuget:?package=Umbraco.Community.BlockPreview&version=5.1.0
BlockPreview
BlockPreview enables easy to use rich HTML backoffice previews for the Umbraco Block Grid, Block List and Rich Text editors, with full support for both Razor views and ViewComponents.
<img src="https://raw.githubusercontent.com/rickbutterfield/Umbraco.Community.BlockPreview/develop/.github/assets/icon.png" alt="Umbraco.Community.BlockPreview icon" height="150" align="right">
Supported Versions
v5.x supports Umbraco v17
v4.x supports Umbraco v16
v1.x supports Umbraco v10.x - v13.x
To understand more about which Umbraco CMS versions are actively supported by Umbraco HQ, please see Umbraco's Long-term Support (LTS) and End-of-Life (EOL) policy.
Installation
The Umbraco v17 version of this package is available via NuGet.
To install the package, you can use either .NET CLI:
dotnet add package Umbraco.Community.BlockPreview --version 5.0.0
or the NuGet Package Manager:
Install-Package Umbraco.Community.BlockPreview -Version 5.0.0
Quick Start
Generated strongly typed models must exist on disk for BlockPreview to work. Umbraco:Cms:ModelsBuilder:ModelsMode must be set to either SourceCodeAuto or SourceCodeManual in your development environment and generated files committed to disk before deploying.
If you are using Limbo.Umbraco.ModelsBuilder, the default configuration is to have ModelsMode set to nothing. Once this is set, generate models in the backoffice as normal.
"Umbraco": {
"CMS": {
"ModelsBuilder": {
"ModelsMode": "SourceCodeAuto"
}
}
}
BlockPreview can be configured in the Program.cs file, before the call to the .Build() method:
+using Umbraco.Community.BlockPreview.Extensions;
builder.CreateUmbracoBuilder()
.AddBackOffice()
.AddWebsite()
.AddDeliveryApi()
.AddComposers()
+ .AddBlockPreview(options =>
+ {
+ options.BlockGrid = new()
+ {
+ Enabled = true,
+ ContentTypes = [RichTextBlock.ModelTypeAlias]
+ };
+
+ options.BlockList = new()
+ {
+ Enabled = true
+ };
+
+ options.RichText.Enabled = false;
+ })
.Build();
Alternatively, it can be configured in appsettings.json:
{
"BlockPreview": {
"BlockGrid": {
"Enabled": true,
"ContentTypes": ["richTextBlock"]
},
"BlockList": {
"Enabled": true
},
"RichText": {
"Enabled": false
}
}
}
Documentation
📖 Configuration Guide - Detailed configuration options, custom view locations, and stylesheet loading
📖 Usage Guide - How to use BlockPreview in your views and editors
📖 Advanced Customization - Custom services, request enrichers, and extensibility
Contribution Guidelines
To raise a new bug, create an issue on the GitHub repository. To fix a bug or add new features, fork the repository and send a pull request with your changes. Feel free to add ideas to the repository's issues list if you would to discuss anything related to the library.
Using the Test Sites
The repo comes with a test site for Umbraco 17. The site is configured with uSync out of the box to get you up and running with a test site quickly. Use the following credentials to log into the back office:
Username: admin@example.com
Password: 1234567890
Who do I talk to?
This project is maintained by Rick Butterfield and contributors. If you have any questions about the project please get in touch on Bluesky, or by raising an issue on GitHub.
Credits
This package is entirely based on the amazing work done by Dave Woestenborghs for 24days in Umbraco 2021. His code has been extended to support the new Block Grid editor in v10.4+ and turned into this package.
Matthew Wise also wrote a great article for 24days in Umbraco 2022 which added the ability to surface ViewComponents and has allowed his code to be contributed.
Ben White contributed the RequestEnricher allowing users to customise View Location and runtime stylesheet loading.
License
Copyright © 2022-2025 Rick Butterfield, and other contributors.
Licensed under the MIT License.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Umbraco.Cms.Api.Common (>= 17.1.0 && < 18.0.0)
- Umbraco.Cms.Api.Management (>= 17.1.0 && < 18.0.0)
- Umbraco.Cms.Core (>= 17.1.0 && < 18.0.0)
- Umbraco.Cms.Web.Common (>= 17.1.0 && < 18.0.0)
- Umbraco.Cms.Web.Website (>= 17.1.0 && < 18.0.0)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on Umbraco.Community.BlockPreview:
| Package | Downloads |
|---|---|
|
Umbraco.Community.Templates.UmBootstrap
A project template for creating a new Umbraco site using the UmBootstrap Starter Kit |
|
|
Our.Umbraco.BlockPreview
Easy to use rich HTML backoffice previews for the Umbraco Block List and Block Grid editors |
|
|
Our.Community.CustomForm
Custom forms add-on for UmBootstrap |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated | |
|---|---|---|---|
| 5.1.0 | 0 | 1/8/2026 | |
| 5.0.0 | 1,500 | 11/27/2025 | |
| 5.0.0-rc3 | 262 | 11/26/2025 | |
| 5.0.0-rc2.2 | 250 | 11/14/2025 | |
| 5.0.0-rc2.1 | 206 | 11/14/2025 | |
| 5.0.0-rc2 | 278 | 11/13/2025 | |
| 5.0.0-rc1 | 210 | 10/31/2025 | |
| 5.0.0-beta | 187 | 10/23/2025 | |
| 4.0.7 | 2 | 1/8/2026 | |
| 4.0.6 | 538 | 11/27/2025 | |
| 4.0.5 | 712 | 11/14/2025 | |
| 4.0.4 | 292 | 11/13/2025 | |
| 4.0.3 | 6,862 | 8/4/2025 | |
| 4.0.2 | 163 | 8/1/2025 | |
| 4.0.2-beta4 | 139 | 7/31/2025 | |
| 4.0.2-beta3 | 134 | 7/31/2025 | |
| 4.0.2-beta2 | 134 | 7/31/2025 | |
| 4.0.2-beta | 137 | 7/31/2025 | |
| 4.0.1 | 367 | 7/30/2025 | |
| 4.0.0 | 2,366 | 6/12/2025 | |
| 4.0.0-rc5 | 272 | 6/9/2025 | |
| 4.0.0-rc4 | 202 | 5/29/2025 | |
| 4.0.0-rc3 | 205 | 5/21/2025 | |
| 4.0.0-rc2 | 274 | 5/14/2025 | |
| 4.0.0-rc | 195 | 4/30/2025 | |
| 3.4.3 | 450 | 8/4/2025 | |
| 3.4.2 | 124 | 8/1/2025 | |
| 3.4.1 | 170 | 7/30/2025 | |
| 3.4.0 | 464 | 6/12/2025 | |
| 3.3.6 | 1,187 | 5/29/2025 | |
| 3.3.5 | 367 | 5/27/2025 | |
| 3.3.4 | 653 | 5/14/2025 | |
| 3.3.3 | 1,044 | 5/2/2025 | |
| 3.3.2 | 384 | 4/28/2025 | |
| 3.3.1 | 279 | 4/25/2025 | |
| 3.3.0 | 1,581 | 3/28/2025 | |
| 3.2.4 | 2,063 | 2/7/2025 | |
| 3.2.3 | 547 | 1/28/2025 | |
| 3.2.2 | 586 | 1/26/2025 | |
| 3.2.1 | 232 | 1/25/2025 | |
| 3.2.0 | 215 | 1/24/2025 | |
| 3.1.0 | 326 | 1/17/2025 | |
| 3.0.0 | 2,268 | 11/14/2024 | |
| 2.1.0 | 653 | 1/17/2025 | |
| 2.0.4 | 1,074 | 11/5/2024 | |
| 2.0.3 | 347 | 10/30/2024 | |
| 2.0.2 | 2,411 | 8/28/2024 | |
| 2.0.1 | 346 | 8/22/2024 | |
| 2.0.0 | 553 | 8/22/2024 | |
| 2.0.0-rc2 | 212 | 8/8/2024 | |
| 2.0.0-rc1 | 225 | 8/6/2024 | |
| 2.0.0-alpha007 | 189 | 8/6/2024 | |
| 2.0.0-alpha006 | 189 | 8/2/2024 | |
| 2.0.0-alpha005 | 145 | 8/2/2024 | |
| 1.14.0 | 0 | 1/8/2026 | |
| 1.13.8 | 921 | 11/13/2025 | |
| 1.13.7 | 6,227 | 8/19/2025 | |
| 1.13.6 | 5,931 | 6/4/2025 | |
| 1.13.5 | 1,350 | 5/29/2025 | |
| 1.13.4 | 3,020 | 5/14/2025 | |
| 1.13.3 | 324 | 5/14/2025 | |
| 1.13.2 | 1,059 | 5/2/2025 | |
| 1.13.1 | 444 | 4/28/2025 | |
| 1.13.0 | 298 | 4/25/2025 | |
| 1.13.0-beta | 302 | 3/28/2025 | |
| 1.12.2 | 8,158 | 2/8/2025 | |
| 1.12.2-beta | 175 | 2/5/2025 | |
| 1.12.1 | 1,146 | 1/25/2025 | |
| 1.12.0 | 1,029 | 1/24/2025 | |
| 1.11.0 | 909 | 1/17/2025 | |
| 1.10.5 | 12,090 | 10/30/2024 | |
| 1.10.4 | 8,125 | 9/13/2024 | |
| 1.10.3 | 7,928 | 8/29/2024 | |
| 1.10.2 | 579 | 8/28/2024 | |
| 1.10.1 | 535 | 8/22/2024 | |
| 1.10.0 | 326 | 8/22/2024 | |
| 1.9.1 | 3,700 | 8/7/2024 | |
| 1.9.0 | 259 | 8/7/2024 | |
| 1.8.4 | 23,229 | 4/23/2024 | |
| 1.8.3 | 9,034 | 3/25/2024 | |
| 1.8.2 | 3,694 | 3/15/2024 | |
| 1.8.1 | 281 | 3/14/2024 | |
| 1.8.0 | 18,812 | 12/15/2023 | |
| 1.7.1 | 8,680 | 9/18/2023 | |
| 1.7.0 | 532 | 9/15/2023 | |
| 1.6.1 | 2,133 | 9/2/2023 | |
| 1.6.0 | 352 | 9/1/2023 | |
| 1.5.0 | 1,245 | 8/18/2023 | |
| 1.4.1 | 3,673 | 6/30/2023 | |
| 1.4.0 | 359 | 6/29/2023 | |
| 1.3.1 | 456 | 6/26/2023 | |
| 1.3.0 | 838 | 6/20/2023 | |
| 1.2.3 | 1,693 | 5/24/2023 | |
| 1.2.2 | 420 | 5/24/2023 | |
| 1.2.1 | 1,683 | 4/12/2023 | |
| 1.2.0 | 478 | 4/12/2023 | |
| 1.1.2 | 1,108 | 3/14/2023 | |
| 1.1.1 | 531 | 3/7/2023 | |
| 1.1.0 | 584 | 2/25/2023 |