Components

Editors

Each editor variant maps to a different TipTap extension set. All text editors output ProseMirrorJSON.

Editor Variants

Choose the variant that matches your content needs. Each example below is a live editor.

Single-line Headings, names, titles

Live Example

An Editable Heading

<Editable.Data key="hero" {data}>
  {#snippet children({ text })}
    <h1>{@render text('title')}</h1>
  {/snippet}
</Editable.Data>

Loads only Document, Text, History, and Placeholder. No paragraph wrapping.

Multiple Data Sections

Nest multiple Data components under a single Root. Each gets a unique key and appears in the save map.

Live Example

Hero Section

Journal on a desk

First Note

Content of the first note.

Second Note

Content of the second note.

<Editable.Root {editing} onsave={handleSave}>
  {#snippet children({ state, save })}
    <Editable.Data key="hero" data={hero}>
      {#snippet children({ text, image })}
        <h1>{@render text('title')}</h1>
        {@render image('cover', { maxWidth: 1200, maxHeight: 675, quality: 0.85 })}
      {/snippet}
    </Editable.Data>

    {#each notes as note, i}
      <Editable.Data key={`notes-${i}`} data={note}>
        {#snippet children({ text, multiline })}
          <h3>{@render text('title')}</h3>
          <p>{@render multiline('body')}</p>
        {/snippet}
      </Editable.Data>
    {/each}
  {/snippet}
</Editable.Root>