Denne side er ikke oversat endnu. Den vises på engelsk.
Dette kapitel findes på engelsk og bulgarsk.
Every feature below is part of the editor. Some belong to a plugin (listed in the last column); RteOptions.Plugins chooses which of the 14 built-in plugins to load.
Editing
| Feature | Notes | Plugin |
|---|---|---|
| Configurable toolbar | Toolbar lists the buttons; a "more" button folds the rest on narrow screens | core |
| Undo and redo | unlimited, also for tables | core |
| Modes | Design, HTML source and Preview; the HTML mode shows the clean HTML | core |
| Full screen | F11 or the button | core |
| Enter | creates p, br or div (EnterMode); Shift+Enter is a line break | core |
| Indent | by CSS margin, lists by nesting | core |
| Find and replace | case, whole word, replace all in one undo step | find |
| Writing modes | typewriter and focus modes | tools |
| Local draft | the browser keeps a draft and asks to restore it | core |
Text and blocks
Paragraph styles and headings 1 to 6, bold, italic, underline, strikethrough, inline code, subscript and superscript, colors for text and highlight, font size, line height, alignment, bulleted, numbered and to-do lists, block quotes, horizontal rules, code blocks and snippets, and "clear formatting".
Modern blocks (/ menu, plugin slash and blocks): callouts (info, success, warning), two to four columns, toggles (collapsible blocks), to-do lists, equations (TeX), diagrams (Mermaid), bookmark cards, date, person and link chips, foldable headings, and a handle on every block to drag it or open its menu (duplicate, move up and down, delete).
Tables (plugin tables)
Insert with a grid or a dialog, add and remove rows and columns, merge and split cells, alignment, borders, table and cell properties, column resize, cell selection, a context menu, Tab and Shift+Tab to move between cells.
Links, images and media
- Link dialog: web address, e-mail, phone number or a heading in the same text; title, target and
rel. Thenoopener noreferrerpair is added for a new window. - Image dialog: address or upload, alternative text with a hint, width and height with the aspect ratio kept, alignment, a caption (the image becomes a figure), lazy loading, resize handles.
- Library of files (
MediaStore): thumbnails, folders, rename, delete, search, sort, pagination, resize of large images on upload, drag and drop. - Video and audio: an address or a file; YouTube and Vimeo addresses are embedded in a sandboxed frame; only the hosts in
Embed.AllowedHostsare accepted. - Templates: nine built-in layouts and your own through
IRteTemplateProvider. - Emoji picker and
:shortcodes:. - File upload with a type filter and a size limit.
Paste and import
- Cleaning of Word and Excel content: lists become lists, tables stay tables, office markup is removed.
- Three modes: keep formatting, keep only character formatting, plain text.
Ctrl+Shift+Vpastes as plain text. After a paste a menu (Alt+Shift+V) changes the mode. - Drag and drop of images and files.
- Markdown import in the output menu; import of JSON.
Writing aids
Markdown shortcuts as you type (# , - , 1. , **bold**, ` code , text), spell check (the browser, or the server through IRteSpellChecker), read aloud, dictation (needs a browser that supports it and a microphone), the :emoji:` shortcodes.
Review
- Comments on a selection, with replies and resolve (
IRteCommentStore). - Named revisions with a side-by-side comparison (
IRteRevisionStore). - Live accessibility panel: alternative text, empty headings, vague link text, contrast, tables, frames. Many findings have a fix button.
- Merge fields (
MergeFields) for mail merge, with a preview that does not change the saved text. - Tag inspector: shows the path of tags at the caret and lets you edit attributes, unwrap or remove the element.
Output
Clean HTML 5, XHTML, structured JSON, Markdown, e-mail HTML with inline styles, static HTML, plain text, DOCX on the server, PDF through the print dialog. See Export and import.
Content control
Allowed and blocked elements and attributes, length limits shown in the status bar, relative or absolute URLs, validation of JSON. See Security.
Accessibility of the editor itself
Every command can be used from the keyboard. The toolbar is a single tab stop and moves with the arrow keys; dialogs trap and return the focus; state changes are announced to screen readers; prefers-reduced-motion and forced colors are respected; icons are SVG; a compact toolbar with bottom sheets is used on narrow screens (written and checked by its style rules; not yet tested on devices).
Hooks for the heavy parts
| Feature | Built in | Plug in |
|---|---|---|
| Equations | TeX shown in a styled box; window.katex or window.MathJax is used when the page has it | load KaTeX or MathJax |
| Diagrams | Mermaid source in a styled box; window.mermaid is used when present | load Mermaid |
| Concurrent editing | editor.collab: remote cursors, presence list, last write wins | IRteCollaboration and a CRDT such as Yjs |
| Word export and import | BasicDocxExporter, BasicDocxImporter | IRteDocxExporter, IRteDocxImporter |
| the print dialog | a server renderer of your own | |
| People for mentions | none | IRtePeopleProvider |
| Bookmark card titles | the domain only | IRteLinkPreviewProvider |
Extending in the browser
A plugin is a module with export default function install(editor). Register it before the editors start:
const { registerPlugin } = await import("/_content/Rte/js/rte.js");
registerPlugin("mine", editor => {
editor.commands.register("hello", { label: "Hello", run: ed => ed.insertHtml("<p>Hello</p>") });
editor.toolbar.add({ name: "hello", type: "button", label: "Hello", icon: "edit", command: "hello" });
editor.slash.add({ id: "hello", label: "Hello", keywords: ["hi"], run: ed => ed.exec("hello") });
}); Add "hello" to Options.Toolbar to show the button. The API (commands, toolbar, dialogs, menus, panels, status bar, history, selection, events, dotnet.call) is described in the specification delivered with the source (SPEC.md). window.Rte.getEditors() returns the editors that are alive.
Klar til at prøve RayCraft Write?
Start den 14 dages prøve, intet kort nødvendigt.
Start 14 dages prøve