Skip to main content

Overview

The EditorContent component is responsible for rendering the editable area of your Tiptap editor. It connects the editor instance created by useEditor to the DOM and handles the integration with Vue’s component system.

Signature

Props

Editor | null
default:"null"
required
The editor instance to render. This should be the ref returned from useEditor.The component will automatically set up the editor’s DOM element and integrate it with Vue’s reactivity system.

Behavior

Mount Phase

When the component mounts or the editor prop changes:
  1. Appends the editor’s ProseMirror view DOM to the component’s root element
  2. Sets up the editor’s app context to enable Vue features like provide/inject
  3. Creates node views for custom Vue-based nodes

Unmount Phase

When the component unmounts:
  1. Cleans up the editor’s content component reference
  2. Removes the app context reference

Rendering

The component renders as a <div> element that contains the ProseMirror editor view. All editor content and interactions happen within this container.

Examples

Basic Usage

With Styling

With Conditional Rendering

Multiple Editors

With Toolbar

Notes

  • The component renders a plain <div> that wraps the ProseMirror editor view
  • You can style the editor content using CSS with the :deep() selector to target .ProseMirror
  • The editor prop can be reactive - changing it will update the rendered editor
  • The component automatically handles cleanup when unmounted
  • You can use multiple EditorContent components with different editor instances

See Also