DocsBuild your experienceLayout recipes
Quick install
Patterns that hold up

Layout recipes

Proven arrangements for the editor — a full-page workspace, a modal, and a compact framed card — with the markup to match.

Last updated

Fit to page

Create a Notion-style, edge-to-edge layout where the toolbar sticks to the top of the window and the word count floats in the bottom corner by passing the fitToPage={true} prop. The editor handles all layout defaults automatically.

Example usage
Component.tsx
<ConfigurableEditorWithAuth
  apiKey="your-api-key"
  fitToPage={true}
/>

Using fit to page in a modal

To make Eddyter fill the full height of a modal, wrap it in a container that grows to the available space and scrolls on its own. The modal itself should be a flex column with a fixed height (for example flex flex-col h-[95vh]).

Modal.tsx
<div className="flex-1 overflow-y-auto relative border border-main-border/10 dark:border-main-border/[0.07] rounded-xl mb-9">
  <ConfigurableEditorWithAuth
    apiKey="your-api-key"
    fitToPage={true}
  />
</div>

Only when the editor stands alone

Use this only when Eddyter is the only content inside the modal. If the modal also has other fields, headings or text, avoid fitToPage there and use the regular Eddyter setup instead.

Compact UI style

Pass uiStyle="compact" to render Eddyter as a single framed card — ideal for modals, forms and cards where Eddyter sits inside other UI. It only changes how the editor looks: the toolbar, height and word count keep their normal behaviour, and your content is never touched.

Component.tsx
<ConfigurableEditorWithAuth
  apiKey="your-api-key"
  uiStyle="compact"
  toolbar={{ mode: "static" }}
/>

Note

You never need to write uiStyle="default" — leaving the prop out gives the default style. Pass uiStyle="compact" only when you want the compact look.

Was this page useful?