Tizzani.MudBlazor.HtmlEditor 2.3.0

dotnet add package Tizzani.MudBlazor.HtmlEditor --version 2.3.0
                    
NuGet\Install-Package Tizzani.MudBlazor.HtmlEditor -Version 2.3.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Tizzani.MudBlazor.HtmlEditor" Version="2.3.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Tizzani.MudBlazor.HtmlEditor" Version="2.3.0" />
                    
Directory.Packages.props
<PackageReference Include="Tizzani.MudBlazor.HtmlEditor" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Tizzani.MudBlazor.HtmlEditor --version 2.3.0
                    
#r "nuget: Tizzani.MudBlazor.HtmlEditor, 2.3.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Tizzani.MudBlazor.HtmlEditor@2.3.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Tizzani.MudBlazor.HtmlEditor&version=2.3.0
                    
Install as a Cake Addin
#tool nuget:?package=Tizzani.MudBlazor.HtmlEditor&version=2.3.0
                    
Install as a Cake Tool

Tizzani.MudBlazor.HtmlEditor

A customizable HTML editor component for MudBlazor, powered by QuillJS.

NuGet Version NuGet Downloads Last Commit License

image

Works in dark mode, too!

image

Installation

Download the latest release from NuGet:

dotnet add package Tizzani.MudBlazor.HtmlEditor

Add references to the required CSS and JS to your main HTML file (e.g. App.razor, index.html, or Page.cshtml depending on your Blazor setup):


<link href="_content/Tizzani.MudBlazor.HtmlEditor/MudHtmlEditor.css" rel="stylesheet" />


<script src="https://cdn.jsdelivr.net/npm/quill@2.0.2/dist/quill.js"></script>
<script src="_content/Tizzani.MudBlazor.HtmlEditor/quill-blot-formatter.min.js"></script> 

Finally, add the following to your _Imports.razor:

@using Tizzani.MudBlazor.HtmlEditor

Configuring Toolbar Options (available since v2.1)

There are several options available for customizing the HTML editor toolbar.

To customize options for a specific editor instance, define a <MudHtmlToolbarOptions> inside the <MudHtmlEditor>:

<MudHtmlEditor>
  <MudHtmlToolbarOptions InsertImage="false" /> 
</MudHtmlEditor>

For all available options, see here.

Configuring Default Options

To configure default options for all instances of the HTML editor, you can wrap your razor content with <CascadingMudHtmlToolbarOptions>.

App.razor or Routes.razor
<CascadingMudHtmlToolbarOptions InsertImage="false">
  <Router AppAssembly="@typeof(Program).Assembly">
    
  </Router>
</CascadingMudHtmlToolbarOptions>

Child components will inherit the default options, unless they override them with their own <MudHtmlToolbarOptions> instance.

Advanced Customization

For more advanced customization, you can define your own toolbar options inside of an individual <MudHtmlEditor> component:

<MudHtmlEditor>
  <span class="ql-formats">
    <button class="ql-bold" type="button"></button>
    <button class="ql-italic" type="button"></button>
    <button class="ql-underline" type="button"></button>
    <button class="ql-strike" type="button"></button>
  </span>
</MudHtmlEditor>

See the QuillJS documentation for more information on customizing the toolbar.

Migrating from v1.0 to v2.0

  • Remove the services.AddMudBlazorHtmlEditor(); call from your Startup.cs or Program.cs file.
  • Remove the <script src="_content/Tizzani.MudBlazor.HtmlEditor/HtmlEditor.js"> tag from the document body. The required JS is now included by default.
Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Tizzani.MudBlazor.HtmlEditor:

Package Downloads
DotBoil.Studio.Core

Headless UI studio for DotBoil applications. Provides a drag-and-drop form designer, dynamic form renderer, and low-code page builder built on MudBlazor — enabling data-driven UIs to be created and modified at runtime without redeployment.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.3.0 51,239 12/24/2024
2.2.1 9,188 9/9/2024
2.2.0 251 9/9/2024
2.1.0 3,708 5/22/2024
2.0.0 256 5/22/2024
1.2.4 572 4/10/2024
1.2.3 230 4/10/2024
1.2.2 248 4/10/2024
1.2.1 257 4/10/2024
1.2.0 235 4/9/2024
1.1.2 249 4/9/2024
1.1.1 241 4/9/2024
1.1.0 1,771 1/6/2024
1.0.2 321 11/6/2023
1.0.1 237 11/6/2023
1.0.0 237 11/6/2023