Examples

PreviousNext

Slate examples are runnable editors for common schema, rendering, history, selection, collaboration, and performance cases. Use the sidebar or cards to open a live editor route.

Checklists

Interactive checklist blocks.

Code Highlighting

Decorations for highlighted code content.

Comment Mode

Comment-oriented rendering and interaction state.

Custom Placeholder

Placeholder rendering beyond the default empty-editor copy.

Document State

Document-level state stored alongside editor roots.

Editable Voids

Void elements with editable islands.

Embeds

Embedded content inside the editor tree.

Forced Layout

Normalization that enforces required document shape.

Hidden Content Blocks

DOM coverage behavior for content hidden from the normal flow.

Hovering Toolbar

A contextual menu driven by selection state.

Huge Document

Large-document editing, selection, scrolling, and performance behavior.

Images

Block void nodes with editable surrounding content.

Inlines

Inline nodes with associated data.

Linting

Editor diagnostics rendered from document content.

Markdown Preview

Markdown serialization preview driven by editor content.

Markdown Shortcuts

Input shortcuts that turn typed Markdown patterns into editor structure.

Mentions

Inline void nodes for @-mentions.

Multi-root Document

Multiple named roots in one Slate document.

Pagination

Page-layout rendering for long documents.

Paste HTML

Custom paste handling for HTML input.

Plain Text

A minimal editor with plain text behavior.

Read-only

Non-editable rendering with Slate content.

Rendering in iframes

Editor rendering inside an iframe boundary.

Rich Text

Marks, block formatting, lists, and editor toolbar behavior.

Search Highlighting

Search-driven decorations inside editor content.

Shadow DOM

Editor behavior inside a Shadow DOM boundary.

Styling

Custom element and text styling.

Synced Blocks

Shared block content rendered in multiple places.

Tables

Nested block structures with table semantics.

Yjs Collaboration

Local Yjs collaboration behavior.

Yjs Hocuspocus

Hocuspocus-backed collaboration behavior.