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.
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.
// Install RTBlazorfied as a Cake Addin
#addin nuget:?package=RTBlazorfied&version=1.0.144

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

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. 
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 64 8/18/2024
1.0.252 55 8/18/2024
1.0.251 64 8/18/2024
1.0.250 65 8/18/2024
1.0.249 69 8/18/2024
1.0.248 64 8/18/2024
1.0.247 68 8/15/2024
1.0.246 60 8/15/2024
1.0.245 63 8/14/2024
1.0.244 61 8/14/2024
1.0.243 71 8/13/2024
1.0.242 61 8/13/2024
1.0.241 57 8/13/2024
1.0.240 68 8/13/2024
1.0.239 45 8/4/2024
1.0.238 48 8/4/2024
1.0.237 37 8/3/2024
1.0.236 43 8/3/2024
1.0.235 40 8/3/2024
1.0.234 40 8/2/2024
1.0.233 52 8/2/2024
1.0.232 51 8/1/2024
1.0.231 50 8/1/2024
1.0.230 48 8/1/2024
1.0.229 45 7/31/2024
1.0.228 44 7/31/2024
1.0.227 39 7/31/2024
1.0.226 42 7/30/2024
1.0.225 33 7/30/2024
1.0.224 32 7/30/2024
1.0.223 23 7/29/2024
1.0.222 24 7/29/2024
1.0.221 27 7/29/2024
1.0.220 36 7/29/2024
1.0.219 36 7/29/2024
1.0.218 37 7/29/2024
1.0.217 40 7/28/2024
1.0.215 36 7/28/2024
1.0.214 39 7/28/2024
1.0.213 43 7/27/2024
1.0.212 45 7/26/2024
1.0.211 47 7/26/2024
1.0.210 51 7/26/2024
1.0.209 44 7/26/2024
1.0.208 42 7/26/2024
1.0.207 43 7/25/2024
1.0.206 42 7/25/2024
1.0.205 38 7/25/2024
1.0.204 38 7/25/2024
1.0.203 45 7/25/2024
1.0.202 43 7/25/2024
1.0.201 41 7/25/2024
1.0.200 43 7/25/2024
1.0.199 49 7/25/2024
1.0.198 43 7/24/2024
1.0.197 41 7/24/2024
1.0.196 44 7/24/2024
1.0.195 42 7/24/2024
1.0.194 44 7/24/2024
1.0.192 30 7/24/2024
1.0.191 57 7/23/2024
1.0.190 68 7/23/2024
1.0.189 63 7/23/2024
1.0.188 58 7/23/2024
1.0.187 58 7/23/2024
1.0.186 62 7/23/2024
1.0.185 61 7/22/2024
1.0.184 59 7/22/2024
1.0.183 82 7/22/2024
1.0.182 75 7/21/2024
1.0.181 72 7/21/2024
1.0.180 82 7/21/2024
1.0.179 72 7/21/2024
1.0.178 69 7/21/2024
1.0.177 80 7/21/2024
1.0.176 77 7/21/2024
1.0.175 77 7/21/2024
1.0.174 86 7/20/2024
1.0.173 86 7/20/2024
1.0.172 75 7/19/2024
1.0.171 72 7/19/2024
1.0.170 75 7/19/2024
1.0.169 71 7/18/2024
1.0.168 66 7/18/2024
1.0.167 64 7/18/2024
1.0.166 71 7/18/2024
1.0.165 65 7/18/2024
1.0.164 68 7/18/2024
1.0.163 65 7/18/2024
1.0.162 65 7/17/2024
1.0.161 79 7/17/2024
1.0.160 67 7/17/2024
1.0.159 67 7/17/2024
1.0.158 53 7/17/2024
1.0.157 68 7/17/2024
1.0.156 80 7/16/2024
1.0.155 68 7/16/2024
1.0.154 67 7/16/2024
1.0.153 66 7/16/2024
1.0.152 64 7/16/2024
1.0.151 65 7/16/2024
1.0.150 72 7/16/2024
1.0.149 69 7/15/2024
1.0.148 70 7/14/2024
1.0.147 72 7/14/2024
1.0.146 69 7/13/2024
1.0.145 67 7/13/2024
1.0.144 77 7/13/2024
1.0.143 72 7/13/2024
1.0.142 63 7/13/2024
1.0.141 70 7/13/2024
1.0.140 69 7/13/2024
1.0.139 68 7/13/2024
1.0.138 68 7/12/2024
1.0.137 66 7/11/2024
1.0.136 67 7/11/2024
1.0.135 70 7/11/2024
1.0.134 68 7/11/2024
1.0.133 70 7/10/2024
1.0.131 68 7/9/2024
1.0.130 71 7/7/2024
1.0.129 68 7/7/2024
1.0.128 65 7/7/2024
1.0.127 63 7/7/2024
1.0.126 77 7/7/2024
1.0.125 64 7/6/2024
1.0.124 70 7/6/2024
1.0.123 76 7/5/2024
1.0.122 73 7/5/2024
1.0.121 68 7/5/2024
1.0.120 64 7/5/2024
1.0.119 70 7/5/2024
1.0.118 68 7/5/2024
1.0.117 63 7/5/2024
1.0.116 58 7/5/2024
1.0.115 67 7/5/2024
1.0.114 65 7/5/2024
1.0.113 63 7/5/2024
1.0.112 66 7/5/2024
1.0.111 82 7/4/2024
1.0.110 70 7/4/2024
1.0.109 70 7/4/2024
1.0.108 71 7/4/2024
1.0.107 81 7/4/2024
1.0.106 81 7/4/2024
1.0.105 78 7/4/2024
1.0.104 74 7/4/2024
1.0.103 71 7/4/2024
1.0.102 73 7/4/2024
1.0.101 68 7/4/2024
1.0.100 77 7/3/2024
1.0.99 72 7/3/2024
1.0.98 78 7/3/2024
1.0.97 63 7/3/2024
1.0.96 84 7/3/2024
1.0.95 71 7/3/2024
1.0.94 68 7/3/2024
1.0.93 83 7/3/2024
1.0.92 79 7/3/2024
1.0.91 92 7/3/2024
1.0.90 78 7/2/2024
1.0.89 79 7/2/2024
1.0.88 67 7/2/2024
1.0.87 72 7/2/2024
1.0.86 68 7/2/2024
1.0.85 69 7/2/2024
1.0.84 81 7/2/2024
1.0.83 83 7/2/2024
1.0.82 81 7/2/2024
1.0.81 76 7/1/2024
1.0.80 79 7/1/2024
1.0.79 73 7/1/2024
1.0.78 87 6/30/2024
1.0.77 76 6/30/2024
1.0.76 76 6/30/2024
1.0.75 80 6/30/2024
1.0.74 89 6/28/2024
1.0.73 82 6/28/2024
1.0.72 77 6/28/2024
1.0.71 80 6/28/2024
1.0.70 70 6/27/2024
1.0.69 69 6/26/2024
1.0.68 81 6/26/2024
1.0.67 86 6/22/2024
1.0.66 86 6/22/2024
1.0.65 88 6/21/2024
1.0.64 80 6/20/2024
1.0.63 82 6/19/2024
1.0.62 77 6/19/2024
1.0.61 88 6/19/2024
1.0.60 80 6/18/2024
1.0.59 75 6/17/2024
1.0.58 71 6/17/2024
1.0.57 71 6/17/2024
1.0.56 69 6/17/2024
1.0.55 75 6/17/2024
1.0.54 71 6/17/2024
1.0.53 72 6/17/2024
1.0.52 70 6/17/2024
1.0.51 81 6/17/2024
1.0.50 76 6/17/2024
1.0.49 72 6/17/2024
1.0.48 82 6/17/2024
1.0.47 78 6/17/2024
1.0.46 76 6/16/2024
1.0.45 70 6/16/2024
1.0.44 84 6/16/2024
1.0.43 77 6/16/2024
1.0.42 80 6/16/2024
1.0.41 79 6/16/2024
1.0.40 79 6/16/2024
1.0.39 82 6/16/2024
1.0.38 90 6/16/2024
1.0.37 94 6/16/2024
1.0.36 82 6/14/2024
1.0.35 70 6/13/2024
1.0.34 73 6/13/2024
1.0.33 72 6/13/2024
1.0.32 69 6/13/2024
1.0.31 69 6/12/2024
1.0.30 66 6/12/2024
1.0.29 73 6/12/2024
1.0.28 68 6/11/2024
1.0.27 65 6/11/2024
1.0.26 65 6/10/2024
1.0.25 60 6/10/2024
1.0.24 66 6/10/2024
1.0.23 77 6/10/2024
1.0.22 80 6/10/2024
1.0.21 80 6/8/2024
1.0.20 84 6/8/2024
1.0.19 77 6/8/2024
1.0.18 82 6/8/2024
1.0.17 79 6/8/2024
1.0.16 76 6/7/2024
1.0.15 78 6/7/2024
1.0.14 86 6/7/2024
1.0.13 79 6/7/2024
1.0.12 81 6/7/2024
1.0.11 78 6/7/2024
1.0.9 86 6/6/2024
1.0.8 88 6/6/2024
1.0.7 84 6/6/2024
1.0.6 77 6/6/2024
1.0.5 83 6/6/2024
1.0.4 85 6/6/2024
1.0.3 82 6/6/2024
1.0.2 82 6/6/2024
1.0.1 84 6/6/2024

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