Skip to content

Getting Started

Pick your setup: Core for a headless editor you style yourself, Core + UI for a themed editor with toolbar and bubble menu out of the box, or Angular for ready-made components with auto-rendered toolbar and menus.

Terminal window
pnpm add @domternal/core
import {
Editor, Document, Text, Paragraph,
Bold, Italic, Underline,
} from '@domternal/core';
const editor = new Editor({
element: document.getElementById('editor')!,
extensions: [Document, Text, Paragraph, Bold, Italic, Underline],
content: '<p>Hello <strong>Bold</strong>, <em>Italic</em> and <u>Underline</u>!</p>',
});

Import only what you need for full control and zero bloat. Use StarterKit instead for a batteries-included setup with headings, lists, code blocks, history, and more.

Select text and press Mod+B for bold, Mod+I for italic, or Mod+U for underline.

Click to try it out

Now that your editor is running, explore the rest of the toolkit:

  • StarterKit - use StarterKit for a batteries-included setup with headings, lists, code blocks, history, and more
  • Extensions - add tables, images, emoji, mentions, and syntax-highlighted code blocks via standalone packages
  • Theming - style your editor with CSS or use the ready-made @domternal/theme
  • Editor API - chain commands, listen to events, and read or update content programmatically