Gå til indholdet
LÆR

Installation

Det private feed, tokenet og pakken.

Dette kapitel findes på engelsk og bulgarsk.

The feed and the token

RayCraft.Write is not on nuget.org. It is in the private RayCraft feed:

https://nuget.raycraft.dev/v3/index.json

You need an account at RayCraft with an active entitlement for RayCraft Write. From the account page you create a feed token (an organization can have several tokens; a token can be revoked at any time). Treat the token like a password.

Add the feed

Keep the token out of your repository. Add the source on your machine:

dotnet nuget add source https://nuget.raycraft.dev/v3/index.json --name raycraft --username token --password <YOUR-TOKEN> --store-password-in-clear-text

On a build server use a secret instead of a file. In NuGet.config you can reference environment variables:

<configuration>
  <packageSources>
    <add key="raycraft" value="https://nuget.raycraft.dev/v3/index.json" />
  </packageSources>
  <packageSourceCredentials>
    <raycraft>
      <add key="Username" value="token" />
      <add key="ClearTextPassword" value="%RAYCRAFT_TOKEN%" />
    </raycraft>
  </packageSourceCredentials>
</configuration>

Set the environment variable RAYCRAFT_TOKEN in your CI system. Do not commit the token.

The user name and the exact form of the token are shown on your account page; the values above are the usual shape for a token feed.

Install the package

dotnet add package RayCraft.Write

or in the project file:

<PackageReference Include="RayCraft.Write" Version="1.*" />

The package contains the library (Rte.dll), the static files (_content/Rte/css/rte.css, _content/Rte/js/...), the ten language packs (embedded), README.md, EULA.txt and THIRD-PARTY-NOTICES.md. The assembly and the namespace are Rte.

Register and use

See Getting started. The one setting people forget is the SignalR message size: the editor sends HTML and uploaded files over the connection, and the default limit of 32 KB is too small.

Updates and versions

Versions follow semantic versioning. Newer versions come from the same feed with the same token while your license is active (the license runs for one year and renews yearly). Versions you already received keep working under the terms they came with (License).

The license file

A license covers one production instance: in practice, one public domain. Besides the feed token, your account gives you a signed license file (rte.license) issued for that domain. It is checked locally, offline, every time the application starts and does not call out to the network. Put it in one of these places (checked in this order):

  1. RteServerOptions.License.Text or .FilePath passed to AddRte(o => o.License = ...).
  2. The environment variable RTE_LICENSE (the file's content) or RTE_LICENSE_FILE (a path to it).
  3. A file named rte.license next to the application.

Without a valid file, or on an address the file does not cover, the editor still works, in an evaluation mode: a banner is shown and Word export, import and the media library are turned off. Nothing in your content is ever deleted or locked.

Domains

A license names the one production address it covers (example.com, or *.example.com for every subdomain of it). The license is not tied to any particular computer or server, so moving the same deployment to new hardware, or scaling it across several servers behind a load balancer, needs no new file. localhost, 127.0.0.1 and any address ending in .localhost, .local or .test always work, with no license needed, for local development. A staging or test subdomain of your real domain (staging.example.com) is not free on its own, so it does not double as a free production deployment; add it to the license (or use a wildcard) the same way as the production address, or write to support@raycraft.dev to add a second address.

See License for what each state of the banner means and for the terms.

Troubleshooting

SymptomLikely cause
NU1101 or Unable to find package RayCraft.Writethe feed is not added, or the token is wrong or revoked
401 or 403 from the feedthe token is not valid, or your organization has no entitlement for RayCraft Write
the editor shows only the server-rendered textthe page is not interactive: add @rendermode InteractiveServer
the connection drops when you paste an image or a filethe SignalR message limit is too small (AddHubOptions)
the page looks unstyled for a momentadd the <link> to rte.css in App.razor

← Kom i gangKonfiguration →

Klar til at prøve RayCraft Write?

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

Start 14 dages prøve