Skip to content

Editor ​

Usage ​

tsx
import { Editor } from "eddies";

export default function Page() {
  return (
    <div className="m-5">
      <Editor />
    </div>
  );
}

Props ​

EditorOptions ​

PropTypeDescription
className?stringThe class name to use for the editor.
theme?"light" | "dark"Defines the editor's theme.
showCharacterCount?booleanShow character count.
limit?numberThe limit of characters.
menu?booleanShows menu above the editor.
bubbleMenuItems?BubbleMenuItem[]Items that will be displayed in bubble menu.
slashMenuCommands?SlashCommandItem[]Slash menu commands.
onReady?(editor: EddiesEditor) => voidTriggered when the editor is ready.
onContentChange?(editor: EddiesEditor) => voidTriggered on every content change.
initialValue?ContentContent shown every time the editor is created.
extensionsExtensionsExtensions to add to the editor.
placeholder?PlaceholderOptionsThe placeholder text when the editor is empty.
isEditable?booleanDisables the editor.
autofocus?FocusPositionAuto focus settings
keyboardShortcuts?Record<string, KeyboardShortcutCommand>Custom keyboard shortcuts.
tiptapOptions?Partial<TiptapEditorOptions>Editor props to pass to the editor.