SimpleTextEditor 1.3.7

dotnet add package SimpleTextEditor --version 1.3.7
NuGet\Install-Package SimpleTextEditor -Version 1.3.7
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="SimpleTextEditor" Version="1.3.7" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add SimpleTextEditor --version 1.3.7
#r "nuget: SimpleTextEditor, 1.3.7"
#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 SimpleTextEditor as a Cake Addin
#addin nuget:?package=SimpleTextEditor&version=1.3.7

// Install SimpleTextEditor as a Cake Tool
#tool nuget:?package=SimpleTextEditor&version=1.3.7

Simple Text Editor

Simple Text Editor is a bare-bones text editor component for Blazor written completely in C#, with no javascript interop!

It allows for basic formatting and setting block paragraph types.

Simple Text Editor is still in early stages of development so may contain bugs.

Screenshot of the Simple Text Editor interface

Installation

NuGet Pre Release Install via Nuget Package Manager.

Setup

Make sure that in your index.html or app.razor file (for Blazor Web Apps) has a reference to {Assembly name}.styles.css so it can use scoped styles in this package.

@using SimpleTextEditor;
<TextEditor @bind-Blocks="Content"></TextEditor>
@code{
public List<SimpleTextBlock> Content { get; set; }
}

Use

The text editor will populate List of objects of type SimpleTextBlock. Think of SimpleTextBlocks as paragraphs.

Each SimpleTextBlock contains a BlockType field of type List<SimpleTextCharacter>, and a BlockType, which specifies the paragraph formatting (e.g. H1, H2, P).

Each SimpleTextCharacter has a Content field specifying the character, and a Format field (i.e. Underline, Bold, Italic).

This List<SimpleTextBlock> object will be populated in realtime as the text is edited and formatted.

To extract your HTML or JSON, simply use the provided extension methods .ToHtml() or .ToJson() at the end of the list object variable.

Contributing

Please do contribute to this rich text editor and feel free to submit pull requests.

License

MIT

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.3.7 119 2/6/2024
1.3.6 76 1/29/2024
1.3.5 97 1/16/2024
1.2.0 109 1/1/2024
1.1.0 79 1/1/2024
1.0.0 84 1/1/2024