Editors demos

Every demo has a standalone page with its preview, source and notes.

22 demos

Components

  • Inline edit

    Click-to-edit fields - a title in a popover with validation and a slow save, a number in place with a range rule, and a notes field that saves with Ctrl+Enter.

  • Inline edit options

    InlineEdit options side by side - a placeholder for an empty value, a disabled state, a select editor with a label lookup in the preview, saveOnEnter off with custom actions, popover placement, right to left with localized action labels, and part styling.

  • Inline edit events and ref

    A controlled InlineEdit driven from outside - editing / onEditingChange, the ref methods startEdit, validate, save and cancelEdit, a cancellable onBeforeEditStart and every before/after event with its source and trigger.

  • Inline rich text

    Rich text editing in place as a composition - InlineEdit with RichTextEditor as its editor and RichTextContent rendering the saved HTML as the preview.

  • Rich Text Editor

    An HTML editor with the default toolbar, quick toolbars, tables, uploads through a callback, mentions, a character limit and the live HTML value.

  • Inline rich text toolbar

    RichTextEditor in inline mode - toolbar="floating" shows a toolbar over the selection with links, the format painter and the emoji picker; the link quick toolbar opens, edits and removes links.

  • Rich text media, code, import and AI

    RichTextEditor inserts - audio and video from a URL or an upload, allow-listed embeds, a code block with an application highlight hook, an application file browser, file import, HTML export and a streaming, provider-agnostic AI assistant.

  • Rich text API, forms and events

    RichTextEditor driven from code and forms - typed commands, selection and history through actionsRef, Enter and Tab configuration, a custom key binding, readOnly and disabled, a disabled toolbar item, required form submit and reset, every before/after event, right to left and localized labels.

  • Block Editor

    A controlled BlockEditor with checklists, a callout, nested lists, code, mentions and labels; the block JSON and the block events update as you edit.

  • Block Editor API

    BlockEditor from code - insert, update, move, turn into and remove blocks through actionsRef, selection and commands, a custom context menu, image upload, highlighted code, a table block, paste events, sanitized HTML import and export, rebound keys, read only, print, right to left and localized menus.

  • Block Editor collaboration

    Two BlockEditors on one shared Yjs document through @salmonui/rich-text/collab - live edits, remote cursors with names and colors, per-user undo, a seeded document and its HTML read back.

  • Markdown editor

    A Markdown textarea with a formatting toolbar, keyboard shortcuts, link / image / table dialogs, a split preview from an app-supplied renderer, a character count and fullscreen.

  • Markdown editor commands

    Every MarkdownEditor toolbar command - superscript and subscript, upper and lower case, headings, quotes, inline and fenced code, lists, an image dialog with uploads, a custom item - plus the overflow modes, a syntax override, the ref API and the command events.

  • Markdown editor in a form

    MarkdownEditor as a native form field - name, required, submit and reset - with placeholder, readOnly and disabled, a resizable textarea, a server-rendered split preview, right to left, the Turkish locale for case changes, localized labels and part styles.

  • Image editor

    A Canvas 2D image editor with crop, rotate, flip, straighten, resize, zoom, finetune, filter presets, frames, shape, text and freehand annotations, redaction, undo and export.

  • Image editor, controlled

    A controlled ImageEditor - resize and zoom from outside, frames, freehand drawing, image stickers from a custom toolbar item, a trimmed quick-access toolbar, image smoothing, a phone-width toolbar overflow, right to left with localized labels, and the before/after events.

  • Rich Text Content

    Stored HTML rendered read-only by RichTextContent - checklists, a quote and a link kept, the script, event handlers and javascript link removed; the same markup on the server and the client.

  • PDF viewer

    A PDF document with the bookmarks panel, thumbnails, zoom, find, text markup from the selection, a fillable form field, print and download.

  • Password-protected PDF

    An encrypted PDF opened three ways - the built-in password dialog with its wrong-password message, the password prop, and onPasswordRequired with the application's own form.

  • PDF viewer API and navigation

    A controlled PdfViewer page with links and bookmarks, the actionsRef methods, text selection on and off, cancellable print, a phone-width toolbar overflow, right to left, localized labels, part styles and every view event.

Guides

  • Paste cleanup and sanitizing

    RichTextEditor paste cleanup - Word and Google Docs clipboard HTML normalized in clean, keep, plain text and prompt modes, denied tags, keepWordFormatting, and the always-on sanitizer removing scripts, handlers and unsafe URLs with a restriction-only sanitize hook.

  • Rich text extensions

    One engine, two editors - a custom kbd mark and a shared review-stamp command added through the extensions API to RichTextEditor and BlockEditor, and the same engine run headless without React.