All Projects → Blazored → TextEditor

Blazored / TextEditor

Licence: MIT License
Rich text editor for Blazor applications - Uses Quill JS

Programming Languages

C#
18002 projects
javascript
184084 projects - #8 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to TextEditor

AutoSaveEditForm
A replacement for the default EditForm component which will auto save a form until it is successfully submitted
Stars: ✭ 44 (-71.79%)
Mutual labels:  blazor, blazor-client, blazored, blazor-server
Matblazor
Material Design components for Blazor and Razor Components
Stars: ✭ 2,599 (+1566.03%)
Mutual labels:  blazor, blazor-client, blazor-server
blazor-docs
Public Documentation for Telerik UI for Blazor components.
Stars: ✭ 42 (-73.08%)
Mutual labels:  blazor, blazor-client, blazor-server
MudBlazor.Markdown
Markdown component based on the MudBlazor environment
Stars: ✭ 30 (-80.77%)
Mutual labels:  blazor, blazor-client, blazor-server
AsteroidsWasm
Collection of applications based on a single C# .NET Standard project running in: Blazor Client (WebAssembly), Blazor Server, Electron, WPF, WinForms, Xamarin
Stars: ✭ 136 (-12.82%)
Mutual labels:  blazor, blazor-client, blazor-server
MudBlazor
Blazor Component Library based on Material design with an emphasis on ease of use. Mainly written in C# with Javascript kept to a bare minimum it empowers .NET developers to easily debug it if needed.
Stars: ✭ 4,539 (+2809.62%)
Mutual labels:  blazor, blazor-client, blazor-server
smart-blazor
Blazor UI Components & Examples
Stars: ✭ 32 (-79.49%)
Mutual labels:  blazor, blazor-client, blazor-server
BlazorVirtualScrolling
Blazor components for efficiently rendering large lists and data using virtual scrolling
Stars: ✭ 56 (-64.1%)
Mutual labels:  blazor, blazor-client, blazor-server
BlazorCefApp
Build windows desktop GUI app via CEF / WinForms / Blazor server-site
Stars: ✭ 28 (-82.05%)
Mutual labels:  blazor, blazor-server, blazor-applications
Blazorade-Teams
A Blazor component library that is designed to be used when building applications for Microsoft Teams.
Stars: ✭ 29 (-81.41%)
Mutual labels:  blazor, blazor-client, blazor-server
blazor-ui
A collection of examples related to Telerik UI for Blazor Components: https://www.telerik.com/blazor-ui
Stars: ✭ 182 (+16.67%)
Mutual labels:  blazor, blazor-server, blazor-applications
quilljs-rails
Easy integration of Quill rich editor with most Rails forms.
Stars: ✭ 33 (-78.85%)
Mutual labels:  rich-text-editor, quilljs
BlazorServerWithDocker
Companion code sample for my blog post - Containerising a Blazor Server App
Stars: ✭ 16 (-89.74%)
Mutual labels:  blazor, blazor-server
FlashCards
Learning Blazor By Creating A Flash Cards Application
Stars: ✭ 17 (-89.1%)
Mutual labels:  blazor, blazor-server
Blazaco
A Blazor Component utilizing the Monaco editor by Microsoft
Stars: ✭ 23 (-85.26%)
Mutual labels:  blazor, blazor-client
ngx-quill-lite
A light weight Angular wrapper of Quilljs, powerful rich text editor
Stars: ✭ 20 (-87.18%)
Mutual labels:  rich-text-editor, quilljs
awesome-blazor-browser
A Blazor WebAssembly app for browsing the "Awesome Blazor" resources.
Stars: ✭ 155 (-0.64%)
Mutual labels:  blazor, blazor-client
blazor-tour-of-heroes
The Angular Tour of Heroes tutorial, but done using Blazor instead
Stars: ✭ 17 (-89.1%)
Mutual labels:  blazor, blazor-server
SyncfusionHelpDesk
Blazor Syncfusion Help Desk
Stars: ✭ 38 (-75.64%)
Mutual labels:  blazor, blazor-server
BlazorHealthApp
Example application ported from Angular 2 to Blazor
Stars: ✭ 37 (-76.28%)
Mutual labels:  blazor, blazor-client

Blazored TextEditor

Rich Text Editor for Blazor applications - Uses Quill JS

Screenshot

Sample Applications

Helpful Articles

Installing

You can install from NuGet using the following command:

Install-Package Blazored.TextEditor

Or via the Visual Studio package manger.

Setup

Blazor Server applications will need to include the following CSS and JS files in their Pages\_Host.cshtml (or Pages/_Layout.cshtml if using .Net 6).

In the head tag add the following CSS.

    <link href="//cdn.quilljs.com/1.3.6/quill.snow.css" rel="stylesheet">
    <link href="//cdn.quilljs.com/1.3.6/quill.bubble.css" rel="stylesheet">

Then add the JS script at the bottom of the page using the following script tag.

    <script src="https://cdn.quilljs.com/1.3.6/quill.js"></script>
    <script src="_content/Blazored.TextEditor/quill-blot-formatter.min.js"></script>
    <script src="_content/Blazored.TextEditor/Blazored-BlazorQuill.js"></script>

NOTE If you're using Blazor WebAssembly then these need to be added to your wwwroot\index.html.

You can add the following using statement to your main _Imports.razor to make referencing the component a bit easier.

@using Blazored.TextEditor

Usage

Below is a list of all the options available on the Text Editor.

Templates

  • ToolbarContent (optional) - Allows the user to define the Toolbar (above the editor control, or in-line when using the bubble theme, and a user highlights text in the editor).
  • EditorContent (optional) - Allows the user to define the initial content

Parameters

  • ReadOnly (Optional - Default: false) - Determines if the editor will load in read-only mode. This mode can be toggled.
  • Placeholder (Optional - Default: Compose an epic...) - The text to show when editor is empty.
  • Theme (Optional - Default: snow) - Use snow to show the Toolbar on top of the editor, and bubble for inline editing.
  • DebugLevel (Optional - Default: info) - Determines the level of debug information returned to the web browser console window. Options are error, warn, log, or info.

Methods

  • GetText - Gets the content of the editor as Text.
  • GetHTML - Gets the content of the editor as HTML.
  • GetContent - Gets the content of the editor in the native Quill JSON Delta format.
  • LoadContent (json) - Allows the content of the editor to be programmatically set.
  • LoadHTMLContent (string) - Allows the content of the editor to be programmatically set.
  • InsertImage (string) - Inserts an image at the current point in the editor.
  • InsertText (string) - Inserts text at the current point in the editor.

Basic Example

(see code in the Index.razor page in the repo for more examples)

@using Blazored.TextEditor

<BlazoredTextEditor @ref="@QuillHtml">
    <ToolbarContent>
        <select class="ql-header">
            <option selected=""></option>
            <option value="1"></option>
            <option value="2"></option>
            <option value="3"></option>
            <option value="4"></option>
            <option value="5"></option>
        </select>
        <span class="ql-formats">
            <button class="ql-bold"></button>
            <button class="ql-italic"></button>
            <button class="ql-underline"></button>
            <button class="ql-strike"></button>
        </span>
        <span class="ql-formats">
            <select class="ql-color"></select>
            <select class="ql-background"></select>
        </span>
        <span class="ql-formats">
            <button class="ql-list" value="ordered"></button>
            <button class="ql-list" value="bullet"></button>
        </span>
        <span class="ql-formats">
            <button class="ql-link"></button>
        </span>
    </ToolbarContent>
    <EditorContent>
        <h4>This Toolbar works with HTML</h4>
        <a href="http://BlazorHelpWebsite.com">
        BlazorHelpWebsite.com</a>
    </EditorContent>
</BlazoredTextEditor>
<br />
<button class="btn btn-primary" 
        @onclick="GetHTML">Get HTML</button>
<button class="btn btn-primary"
        @onclick="SetHTML">Set HTML</button>
<br />
<div>
    <br />
    @((MarkupString)QuillHTMLContent)
    @QuillHTMLContent
</div>
<br />

@code {

BlazoredTextEditor QuillHtml;
string QuillHTMLContent;

    public async void GetHTML()
    {
        QuillHTMLContent = await this.QuillHtml.GetHTML();
        StateHasChanged();
    }

    public async void SetHTML()
    {
        string QuillContent =
            @"<a href='http://BlazorHelpWebsite.com/'>" +
            "<img src='images/BlazorHelpWebsite.gif' /></a>";

        await this.QuillHtml.LoadHTMLContent(QuillContent);
        StateHasChanged();
    }
}

Rich Text Screenshot

Screenshot

Read Only Screenshot

Screenshot

Blazored TextEditor Forks

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].