RTBlazorfied 1.0.144

There is a newer version of this package available.
See the version list below for details.
dotnet add package RTBlazorfied --version 1.0.144
                    
NuGet\Install-Package RTBlazorfied -Version 1.0.144
                    
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="RTBlazorfied" Version="1.0.144" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="RTBlazorfied" Version="1.0.144" />
                    
Directory.Packages.props
<PackageReference Include="RTBlazorfied" />
                    
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 RTBlazorfied --version 1.0.144
                    
#r "nuget: RTBlazorfied, 1.0.144"
                    
#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 RTBlazorfied@1.0.144
                    
#: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=RTBlazorfied&version=1.0.144
                    
Install as a Cake Addin
#tool nuget:?package=RTBlazorfied&version=1.0.144
                    
Install as a Cake Tool

RT Blazorfied

Author: Ryan Kueter
Updated: July, 2024

About

RT Blazorfied is a free .NET library available from the NuGet Package Manager that allows Blazor developers to easily add a rich text box / html editor to their blazor application.

The editor also uses Google's Font Icons. It does not reference the icon library. However, it does embed .svg versions of those icons so they are customizable.

Targets:

  • .NET 8

Adding a Rich Textbox

Add the JavaScript Reference

Add the following reference to the end of your index.html file:

<script src="_content/RTBlazorfied/js/RTBlazorfied.js"></script>

Add the Element

In this example, the @Html is the html string. This height and width will override those specified in the configuration options.

@using RichTextBlazorfied

<RTBlazorfied @ref="box" @bind-Value="@Html" Height="500px" Width="1000px" />

The element reference provides another way to get the html or plaintext:

private RTBlazorfied? box { get; set; }

private async Task<string?> GetHtml() =>
        await box!.GetHtmlAsync();

private async Task<string?> GetPlainText() =>
        await box!.GetPlainTextAsync();

Configure the Options

RTBlazorfied was designed to allow developers to highly customize the appearance of the rich textbox with the following configuration options:

<RTBlazorfied @bind-Value="@Html" Options="@GetOptions()" />

CSS variables, e.g., var(--my-variable) are interchangeable with these styles. And omitting the ButtonVisibility options will display all the buttons.

public Action<IRTBlazorfiedOptions> GetOptions() => (o =>
{
    o.ToolbarStyles(o =>
    {
        o.BackgroundColor = "#00FF00";
        o.BorderColor = "var(--border-color)";
        o.BorderWidth = "1px";
        o.BorderStyle = "solid";
        o.BorderRadius = "10px 0px";
        o.DropdownBackgroundColor = "var(--background-color)";
        o.DropdownTextColor = "#FFFFFF";
        o.DropdownBackgroundColorHover = "#777777";
        o.DropdownTextColorHover = "#FFFFAA";
    });
    o.ModalStyles(o =>
    {
        o.RemoveCSSClassInputs();
        o.BackgroundColor = "#333333";
        o.TextColor = "#FFFFAA";
        o.TextboxBackgroundColor = "#333333";
        o.TextboxTextColor = "#FFFFAA";
        o.TextboxBorderColor = "#FFFFAA";
        o.CheckboxAccentColor = "#FFFFAA";
    });
    o.ButtonStyles(o =>
    {
        o.TextColor = "#ff0000";
        o.TextSize = "30px";
        o.BackgroundColor = "#0000FF";
        o.BackgroundColorHover = "inherit";
        o.BackgroundColorSelected = "inherit";
        o.BorderColor = "#FFF000";
        o.BorderColorHover = "#FF0000";
        o.BorderColorSelected = "#0000FF";
        o.BorderStyle = "solid";
        o.BorderRadius = "0px";
        o.BorderWidth = "1px";
    });
    o.EditorStyles(o =>
    {
        o.Width = "500px";
        o.Height = "700px";
        o.BorderRadius = "10px";
        o.BoxShadow = "3px 3px 5px 6px #ccc";
        o.BorderStyle = "dotted";
        o.BorderWidth = "10px";
        o.BorderColor = "#FF0000";
    });
    o.ContentStyles(o =>
    {
        o.ContentBoxShadow = "inset 0 0 7px #eee";
        o.BackgroundColor = "#FFFF99";
        o.TextColor = "#333";
    });
    o.ScrollbarStyles(o =>
    {
        o.Width = "5px";
        o.Opacity = "0.5";
        o.ThumbBackground = "#0000FF";
        o.ThumbBackgroundHover = "#00FFFF";
        o.BackgroundColor = "transparent";
        o.ThumbBorderRadius = "10px";
    });
    o.ButtonVisibility(o =>
    {
        o.ClearAll();
        o.Size = true;
        o.Font = true;
        o.Format = true;
        o.Bold = true;
        o.Italic = true;
        o.Underline = true;
        o.Strikethrough = true;
        o.Subscript = true;
        o.Superscript = true;
        o.TextColor = true;
        o.AlignLeft = true;
        o.AlignCenter = true;
        o.AlignRight = true;
        o.AlignJustify = true;
        o.Copy = true;
        o.Cut = true;
        o.Delete = true;
        o.SelectAll = true;
        o.Image = true;
        o.Link = true;
        o.OrderedList = true;
        o.UnorderedList = true;
        o.Undo = true;
        o.Redo = true;
        o.Quote = true;
        o.CodeBlock = true;
        o.EmbedMedia = true;

        // Dividers
        o.TextStylesDivider = false;
        o.FormatDivider = false;
        o.TextColorDivider = false;
        o.AlignDivider = false;
        o.ActionDivider = false;
        o.ListDivider = false;
        o.MediaDivider = false;
        o.HistoryDivider = false;
    });
});

Contributions

This project is being developed for free by me, Ryan Kueter, in my spare time. So, if you would like to contribute, please submit your ideas on the Github project page.

Product Compatible and additional computed target framework versions.
.NET 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 was computed.  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

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.254 170 12/5/2024
1.0.253 233 8/18/2024
1.0.252 157 8/18/2024
1.0.251 173 8/18/2024
1.0.250 150 8/18/2024
1.0.249 183 8/18/2024
1.0.248 158 8/18/2024
1.0.247 159 8/15/2024
1.0.246 143 8/15/2024
1.0.245 170 8/14/2024
1.0.244 156 8/14/2024
1.0.243 181 8/13/2024
1.0.242 174 8/13/2024
1.0.241 151 8/13/2024
1.0.240 159 8/13/2024
1.0.239 118 8/4/2024
1.0.238 127 8/4/2024
1.0.237 120 8/3/2024
1.0.236 110 8/3/2024
1.0.235 124 8/3/2024
1.0.234 128 8/2/2024
1.0.233 146 8/2/2024
1.0.232 121 8/1/2024
1.0.231 134 8/1/2024
1.0.230 126 8/1/2024
1.0.229 114 7/31/2024
1.0.228 112 7/31/2024
1.0.227 118 7/31/2024
1.0.226 113 7/30/2024
1.0.225 118 7/30/2024
1.0.224 112 7/30/2024
1.0.223 102 7/29/2024
1.0.222 101 7/29/2024
1.0.221 102 7/29/2024
1.0.220 102 7/29/2024
1.0.219 112 7/29/2024
1.0.218 87 7/29/2024
1.0.217 118 7/28/2024
1.0.215 102 7/28/2024
1.0.214 110 7/28/2024
1.0.213 116 7/27/2024
1.0.212 109 7/26/2024
1.0.211 126 7/26/2024
1.0.210 126 7/26/2024
1.0.209 125 7/26/2024
1.0.208 119 7/26/2024
1.0.207 131 7/25/2024
1.0.206 106 7/25/2024
1.0.205 109 7/25/2024
1.0.204 113 7/25/2024
1.0.203 108 7/25/2024
1.0.202 129 7/25/2024
1.0.201 113 7/25/2024
1.0.200 125 7/25/2024
1.0.199 103 7/25/2024
1.0.198 131 7/24/2024
1.0.197 112 7/24/2024
1.0.196 129 7/24/2024
1.0.195 108 7/24/2024
1.0.194 106 7/24/2024
1.0.192 99 7/24/2024
1.0.191 117 7/23/2024
1.0.190 125 7/23/2024
1.0.189 151 7/23/2024
1.0.188 162 7/23/2024
1.0.187 124 7/23/2024
1.0.186 122 7/23/2024
1.0.185 137 7/22/2024
1.0.184 127 7/22/2024
1.0.183 155 7/22/2024
1.0.182 143 7/21/2024
1.0.181 139 7/21/2024
1.0.180 144 7/21/2024
1.0.179 149 7/21/2024
1.0.178 138 7/21/2024
1.0.177 137 7/21/2024
1.0.176 150 7/21/2024
1.0.175 164 7/21/2024
1.0.174 142 7/20/2024
1.0.173 164 7/20/2024
1.0.172 143 7/19/2024
1.0.171 141 7/19/2024
1.0.170 145 7/19/2024
1.0.169 146 7/18/2024
1.0.168 149 7/18/2024
1.0.167 120 7/18/2024
1.0.166 167 7/18/2024
1.0.165 133 7/18/2024
1.0.164 148 7/18/2024
1.0.163 159 7/18/2024
1.0.162 135 7/17/2024
1.0.161 154 7/17/2024
1.0.160 152 7/17/2024
1.0.159 150 7/17/2024
1.0.158 115 7/17/2024
1.0.157 138 7/17/2024
1.0.156 182 7/16/2024
1.0.155 139 7/16/2024
1.0.154 131 7/16/2024
1.0.153 119 7/16/2024
1.0.152 122 7/16/2024
1.0.151 142 7/16/2024
1.0.150 133 7/16/2024
1.0.149 144 7/15/2024
1.0.148 139 7/14/2024
1.0.147 146 7/14/2024
1.0.146 147 7/13/2024
1.0.145 135 7/13/2024
1.0.144 133 7/13/2024
1.0.143 163 7/13/2024
1.0.142 142 7/13/2024
1.0.141 136 7/13/2024
1.0.140 135 7/13/2024
1.0.139 139 7/13/2024
1.0.138 131 7/12/2024
1.0.137 146 7/11/2024
1.0.136 140 7/11/2024
1.0.135 139 7/11/2024
1.0.134 147 7/11/2024
1.0.133 143 7/10/2024
1.0.131 147 7/9/2024
1.0.130 139 7/7/2024
1.0.129 139 7/7/2024
1.0.128 138 7/7/2024
1.0.127 133 7/7/2024
1.0.126 157 7/7/2024
1.0.125 134 7/6/2024
1.0.124 164 7/6/2024
1.0.123 152 7/5/2024
1.0.122 136 7/5/2024
1.0.121 142 7/5/2024
1.0.120 131 7/5/2024
1.0.119 138 7/5/2024
1.0.118 145 7/5/2024
1.0.117 141 7/5/2024
1.0.116 125 7/5/2024
1.0.115 131 7/5/2024
1.0.114 126 7/5/2024
1.0.113 163 7/5/2024
1.0.112 132 7/5/2024
1.0.111 156 7/4/2024
1.0.110 157 7/4/2024
1.0.109 140 7/4/2024
1.0.108 152 7/4/2024
1.0.107 162 7/4/2024
1.0.106 151 7/4/2024
1.0.105 141 7/4/2024
1.0.104 166 7/4/2024
1.0.103 139 7/4/2024
1.0.102 155 7/4/2024
1.0.101 138 7/4/2024
1.0.100 159 7/3/2024
1.0.99 139 7/3/2024
1.0.98 159 7/3/2024
1.0.97 144 7/3/2024
1.0.96 143 7/3/2024
1.0.95 122 7/3/2024
1.0.94 120 7/3/2024
1.0.93 185 7/3/2024
1.0.92 153 7/3/2024
1.0.91 160 7/3/2024
1.0.90 141 7/2/2024
1.0.89 158 7/2/2024
1.0.88 146 7/2/2024
1.0.87 144 7/2/2024
1.0.86 146 7/2/2024
1.0.85 138 7/2/2024
1.0.84 141 7/2/2024
1.0.83 147 7/2/2024
1.0.82 144 7/2/2024
1.0.81 146 7/1/2024
1.0.80 155 7/1/2024
1.0.79 150 7/1/2024
1.0.78 144 6/30/2024
1.0.77 134 6/30/2024
1.0.76 149 6/30/2024
1.0.75 164 6/30/2024
1.0.74 155 6/28/2024
1.0.73 142 6/28/2024
1.0.72 146 6/28/2024
1.0.71 146 6/28/2024
1.0.70 139 6/27/2024
1.0.69 148 6/26/2024
1.0.68 143 6/26/2024
1.0.67 152 6/22/2024
1.0.66 172 6/22/2024
1.0.65 152 6/21/2024
1.0.64 164 6/20/2024
1.0.63 154 6/19/2024
1.0.62 158 6/19/2024
1.0.61 152 6/19/2024
1.0.60 165 6/18/2024
1.0.59 150 6/17/2024
1.0.58 140 6/17/2024
1.0.57 135 6/17/2024
1.0.56 134 6/17/2024
1.0.55 141 6/17/2024
1.0.54 140 6/17/2024
1.0.53 151 6/17/2024
1.0.52 139 6/17/2024
1.0.51 151 6/17/2024
1.0.50 152 6/17/2024
1.0.49 146 6/17/2024
1.0.48 140 6/17/2024
1.0.47 151 6/17/2024
1.0.46 153 6/16/2024
1.0.45 131 6/16/2024
1.0.44 160 6/16/2024
1.0.43 154 6/16/2024
1.0.42 152 6/16/2024
1.0.41 167 6/16/2024
1.0.40 151 6/16/2024
1.0.39 159 6/16/2024
1.0.38 178 6/16/2024
1.0.37 165 6/16/2024
1.0.36 163 6/14/2024
1.0.35 134 6/13/2024
1.0.34 138 6/13/2024
1.0.33 142 6/13/2024
1.0.32 141 6/13/2024
1.0.31 129 6/12/2024
1.0.30 132 6/12/2024
1.0.29 122 6/12/2024
1.0.28 139 6/11/2024
1.0.27 133 6/11/2024
1.0.26 127 6/10/2024
1.0.25 131 6/10/2024
1.0.24 132 6/10/2024
1.0.23 150 6/10/2024
1.0.22 127 6/10/2024
1.0.21 135 6/8/2024
1.0.20 144 6/8/2024
1.0.19 140 6/8/2024
1.0.18 164 6/8/2024
1.0.17 152 6/8/2024
1.0.16 142 6/7/2024
1.0.15 146 6/7/2024
1.0.14 141 6/7/2024
1.0.13 137 6/7/2024
1.0.12 144 6/7/2024
1.0.11 144 6/7/2024
1.0.9 143 6/6/2024
1.0.8 150 6/6/2024
1.0.7 127 6/6/2024
1.0.6 122 6/6/2024
1.0.5 134 6/6/2024
1.0.4 144 6/6/2024
1.0.3 145 6/6/2024
1.0.2 137 6/6/2024
1.0.1 142 6/6/2024

Added the ability to remove css inputs and dividers and small bug fixes to improve the usability of the editor.