MCPcopy Create free account
hub / github.com/resend/react-email / createEditor

Function createEditor

packages/editor/src/utils/set-text-alignment.spec.ts:6–16  ·  view source on GitHub ↗
(content?: Record<string, unknown>)

Source from the content-addressed store, hash-verified

4import { setTextAlignment } from './set-text-alignment';
5
6function createEditor(content?: Record<string, unknown>) {
7 return new Editor({
8 extensions: [
9 StarterKit,
10 AlignmentAttribute.configure({
11 types: ['heading', 'paragraph'],
12 }),
13 ],
14 content: content ?? undefined,
15 });
16}
17
18const PARAGRAPH_DOC = {
19 type: 'doc',

Callers 1

Calls 1

configureMethod · 0.45

Tested by

no test coverage detected