RTBlazorfied 1.0.53

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

// Install RTBlazorfied as a Cake Tool
#tool nuget:?package=RTBlazorfied&version=1.0.53                

RT Blazorfied

Author: Ryan Kueter
Updated: June, 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.

@using RichTextBlazorfied

<RTBlazorfied @ref="box" Html="@Html" />

The element reference can be used to get the html or plaintext for saving.

private RTBlazorfied box { get; set; } = new();
private string? html { get; set; }
private string? plaintext { get; set; }

private async Task GetHtml() => 
    html = await box.GetHtmlAsync();

private async Task GetPlainText() => 
    plaintext = await box.GetPlainTextAsync();

The element reference also provides a method for restoring the text to the beginning:

box.Reinitialize();

Configure the Options

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

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

Then add the options:

public Action<IRTBlazorfiedOptions> GetOptions() => (o =>
{
    o.ToolbarStyles(o =>
    {
        o.BackgroundColor = "#00FF00";
        o.BorderColor = "#FF0000";
        o.BorderWidth = "1px";
        o.BorderStyle = "solid";
        o.BorderRadius = "10px 0px";
        o.DropdownBackgroundColor = "#333333";
        o.DropdownTextColor = "#FFFFFF";
        o.DropdownBackgroundColorHover = "#777777";
        o.DropdownTextColorHover = "#FFFFAA";
    });
    o.ModalStyles(o =>
    {
        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.Size = false;
        o.Font = false;
        o.Format = false;
        o.Bold = false;
        o.Italic = false;
        o.Underline = false;
        o.Strikethrough = false;
        o.Subscript = false;
        o.Superscript = false;
        o.Alignleft = false;
        o.Aligncenter = false;
        o.Alignright = false;
        o.Alignjustify = false;
        o.Indent = false;
        o.Copy = false;
        o.Cut = false;
        o.Delete = false;
        o.Selectall = false;
        o.Undo = false;
        o.Redo = false;
        o.Link = false;
        o.Image = 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. 
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.253 181 8/18/2024
1.0.252 117 8/18/2024
1.0.251 118 8/18/2024
1.0.250 114 8/18/2024
1.0.249 126 8/18/2024
1.0.248 113 8/18/2024
1.0.247 113 8/15/2024
1.0.246 103 8/15/2024
1.0.245 113 8/14/2024
1.0.244 103 8/14/2024
1.0.243 127 8/13/2024
1.0.242 112 8/13/2024
1.0.241 105 8/13/2024
1.0.240 118 8/13/2024
1.0.239 75 8/4/2024
1.0.238 79 8/4/2024
1.0.237 67 8/3/2024
1.0.236 72 8/3/2024
1.0.235 71 8/3/2024
1.0.234 68 8/2/2024
1.0.233 85 8/2/2024
1.0.232 75 8/1/2024
1.0.231 82 8/1/2024
1.0.230 77 8/1/2024
1.0.229 75 7/31/2024
1.0.228 64 7/31/2024
1.0.227 66 7/31/2024
1.0.226 70 7/30/2024
1.0.225 61 7/30/2024
1.0.224 60 7/30/2024
1.0.223 49 7/29/2024
1.0.222 52 7/29/2024
1.0.221 49 7/29/2024
1.0.220 63 7/29/2024
1.0.219 64 7/29/2024
1.0.218 58 7/29/2024
1.0.217 66 7/28/2024
1.0.215 63 7/28/2024
1.0.214 59 7/28/2024
1.0.213 66 7/27/2024
1.0.212 70 7/26/2024
1.0.211 77 7/26/2024
1.0.210 76 7/26/2024
1.0.209 72 7/26/2024
1.0.208 67 7/26/2024
1.0.207 70 7/25/2024
1.0.206 68 7/25/2024
1.0.205 66 7/25/2024
1.0.204 58 7/25/2024
1.0.203 74 7/25/2024
1.0.202 68 7/25/2024
1.0.201 70 7/25/2024
1.0.200 71 7/25/2024
1.0.199 73 7/25/2024
1.0.198 72 7/24/2024
1.0.197 71 7/24/2024
1.0.196 68 7/24/2024
1.0.195 62 7/24/2024
1.0.194 72 7/24/2024
1.0.192 54 7/24/2024
1.0.191 85 7/23/2024
1.0.190 94 7/23/2024
1.0.189 91 7/23/2024
1.0.188 87 7/23/2024
1.0.187 79 7/23/2024
1.0.186 83 7/23/2024
1.0.185 84 7/22/2024
1.0.184 89 7/22/2024
1.0.183 103 7/22/2024
1.0.182 100 7/21/2024
1.0.181 99 7/21/2024
1.0.180 103 7/21/2024
1.0.179 109 7/21/2024
1.0.178 95 7/21/2024
1.0.177 100 7/21/2024
1.0.176 105 7/21/2024
1.0.175 118 7/21/2024
1.0.174 114 7/20/2024
1.0.173 109 7/20/2024
1.0.172 99 7/19/2024
1.0.171 98 7/19/2024
1.0.170 99 7/19/2024
1.0.169 106 7/18/2024
1.0.168 93 7/18/2024
1.0.167 86 7/18/2024
1.0.166 111 7/18/2024
1.0.165 90 7/18/2024
1.0.164 92 7/18/2024
1.0.163 101 7/18/2024
1.0.162 91 7/17/2024
1.0.161 104 7/17/2024
1.0.160 100 7/17/2024
1.0.159 94 7/17/2024
1.0.158 75 7/17/2024
1.0.157 88 7/17/2024
1.0.156 107 7/16/2024
1.0.155 88 7/16/2024
1.0.154 93 7/16/2024
1.0.153 90 7/16/2024
1.0.152 83 7/16/2024
1.0.151 92 7/16/2024
1.0.150 95 7/16/2024
1.0.149 91 7/15/2024
1.0.148 91 7/14/2024
1.0.147 94 7/14/2024
1.0.146 95 7/13/2024
1.0.145 93 7/13/2024
1.0.144 104 7/13/2024
1.0.143 97 7/13/2024
1.0.142 89 7/13/2024
1.0.141 94 7/13/2024
1.0.140 91 7/13/2024
1.0.139 90 7/13/2024
1.0.138 93 7/12/2024
1.0.137 90 7/11/2024
1.0.136 94 7/11/2024
1.0.135 94 7/11/2024
1.0.134 88 7/11/2024
1.0.133 92 7/10/2024
1.0.131 92 7/9/2024
1.0.130 94 7/7/2024
1.0.129 95 7/7/2024
1.0.128 86 7/7/2024
1.0.127 86 7/7/2024
1.0.126 99 7/7/2024
1.0.125 88 7/6/2024
1.0.124 92 7/6/2024
1.0.123 100 7/5/2024
1.0.122 93 7/5/2024
1.0.121 94 7/5/2024
1.0.120 90 7/5/2024
1.0.119 99 7/5/2024
1.0.118 95 7/5/2024
1.0.117 87 7/5/2024
1.0.116 95 7/5/2024
1.0.115 87 7/5/2024
1.0.114 84 7/5/2024
1.0.113 98 7/5/2024
1.0.112 92 7/5/2024
1.0.111 104 7/4/2024
1.0.110 114 7/4/2024
1.0.109 96 7/4/2024
1.0.108 90 7/4/2024
1.0.107 108 7/4/2024
1.0.106 101 7/4/2024
1.0.105 102 7/4/2024
1.0.104 103 7/4/2024
1.0.103 97 7/4/2024
1.0.102 93 7/4/2024
1.0.101 92 7/4/2024
1.0.100 97 7/3/2024
1.0.99 98 7/3/2024
1.0.98 107 7/3/2024
1.0.97 86 7/3/2024
1.0.96 103 7/3/2024
1.0.95 93 7/3/2024
1.0.94 87 7/3/2024
1.0.93 127 7/3/2024
1.0.92 97 7/3/2024
1.0.91 113 7/3/2024
1.0.90 100 7/2/2024
1.0.89 103 7/2/2024
1.0.88 102 7/2/2024
1.0.87 89 7/2/2024
1.0.86 95 7/2/2024
1.0.85 96 7/2/2024
1.0.84 101 7/2/2024
1.0.83 104 7/2/2024
1.0.82 105 7/2/2024
1.0.81 99 7/1/2024
1.0.80 102 7/1/2024
1.0.79 95 7/1/2024
1.0.78 109 6/30/2024
1.0.77 100 6/30/2024
1.0.76 102 6/30/2024
1.0.75 122 6/30/2024
1.0.74 116 6/28/2024
1.0.73 102 6/28/2024
1.0.72 97 6/28/2024
1.0.71 104 6/28/2024
1.0.70 94 6/27/2024
1.0.69 94 6/26/2024
1.0.68 102 6/26/2024
1.0.67 107 6/22/2024
1.0.66 110 6/22/2024
1.0.65 110 6/21/2024
1.0.64 107 6/20/2024
1.0.63 100 6/19/2024
1.0.62 100 6/19/2024
1.0.61 111 6/19/2024
1.0.60 107 6/18/2024
1.0.59 99 6/17/2024
1.0.58 88 6/17/2024
1.0.57 93 6/17/2024
1.0.56 91 6/17/2024
1.0.55 92 6/17/2024
1.0.54 91 6/17/2024
1.0.53 95 6/17/2024
1.0.52 90 6/17/2024
1.0.51 101 6/17/2024
1.0.50 97 6/17/2024
1.0.49 90 6/17/2024
1.0.48 100 6/17/2024
1.0.47 99 6/17/2024
1.0.46 92 6/16/2024
1.0.45 91 6/16/2024
1.0.44 103 6/16/2024
1.0.43 100 6/16/2024
1.0.42 97 6/16/2024
1.0.41 101 6/16/2024
1.0.40 100 6/16/2024
1.0.39 104 6/16/2024
1.0.38 114 6/16/2024
1.0.37 113 6/16/2024
1.0.36 102 6/14/2024
1.0.35 90 6/13/2024
1.0.34 99 6/13/2024
1.0.33 93 6/13/2024
1.0.32 89 6/13/2024
1.0.31 92 6/12/2024
1.0.30 89 6/12/2024
1.0.29 94 6/12/2024
1.0.28 90 6/11/2024
1.0.27 90 6/11/2024
1.0.26 93 6/10/2024
1.0.25 87 6/10/2024
1.0.24 93 6/10/2024
1.0.23 97 6/10/2024
1.0.22 104 6/10/2024
1.0.21 99 6/8/2024
1.0.20 106 6/8/2024
1.0.19 101 6/8/2024
1.0.18 107 6/8/2024
1.0.17 102 6/8/2024
1.0.16 97 6/7/2024
1.0.15 100 6/7/2024
1.0.14 107 6/7/2024
1.0.13 99 6/7/2024
1.0.12 99 6/7/2024
1.0.11 100 6/7/2024
1.0.9 105 6/6/2024
1.0.8 112 6/6/2024
1.0.7 101 6/6/2024
1.0.6 99 6/6/2024
1.0.5 106 6/6/2024
1.0.4 107 6/6/2024
1.0.3 106 6/6/2024
1.0.2 102 6/6/2024
1.0.1 107 6/6/2024

Small bug fixes to improve the usability of the editor.