Gå til indholdet
LÆR

Kom i gang

Hvad RayCraft Write er, og opsætning på fem minutter.

Dette kapitel findes på engelsk og bulgarsk.

RayCraft Write is a WYSIWYG rich text editor for Blazor Server on .NET 10. It gives your users a familiar word-processor surface for articles, e-mails, product descriptions and documents, and gives you clean, safe HTML, Markdown, JSON or Word files on the server.

What you get

  • The editor itself: JavaScript (ES modules, no libraries, no build step) in one Razor class library, package RayCraft.Write.
  • A C# side that does everything which needs a server: filtering and cleaning HTML, conversion to Markdown, JSON and e-mail HTML, Word export and import, a library of files, revisions, comments and accessibility checks.
  • Small interfaces for everything you may want to replace: file storage, templates, spell checking, link previews, people, revisions, comments and collaboration.
  • Ten interface languages.

The package depends only on the shared framework Microsoft.AspNetCore.App. It does not need any other RayCraft package.

Five minutes

  1. Install the package from the RayCraft feed (Installation).
  2. Register the services and raise the SignalR message limit:
builder.Services.AddRazorComponents()
    .AddInteractiveServerComponents()
    .AddHubOptions(o => o.MaximumReceiveMessageSize = 20 * 1024 * 1024);

builder.Services.AddRte();
  1. Use the component on an interactive page:
@page "/article"
@rendermode InteractiveServer

<RichTextEditor @bind-Value="html" DocumentId="article-42" />

@code {
    string? html = "<p>Hello</p>";
}
  1. Link the style sheet in the <head> of App.razor (the editor loads it by itself too, but this avoids a flash of unstyled content):
<link rel="stylesheet" href="_content/Rte/css/rte.css" />

The bound Value is always filtered on the server before your code sees it (Security).

How the parts fit

PartWhereWhat it does
RichTextEditorcomponentshows the editor, binds Value, exposes methods
RteOptionsparameter Optionseverything the user sees: toolbar, modes, limits, language
AddRte(...)Program.csserver settings and the default services
Rte.Processingstatic classesthe same conversions without the editor
Rte.ExportBasicDocxExporter, BasicDocxImporterWord files
JavaScript APIwindow.Rte, pluginsextend the editor in the browser

Requirements and limits

  • .NET 10, Blazor Server with interactive server rendering.
  • A current Chromium-based browser is the tested target. Firefox, Safari, touch devices, IME composition and real speech devices were not tested yet.
  • Equations and diagrams are drawn only if KaTeX or Mermaid is on the page. Concurrent editing needs a CRDT that you connect. PDF is the print dialog of the browser. See Export and import.

Where to go next

Installation · Configuration · Features · Menus and keys · Languages · Export and import · Security · FAQ · License

Installation →

Klar til at prøve RayCraft Write?

Start den 14 dages prøve, intet kort nødvendigt.

Start 14 dages prøve