Skip to content

Props

The three adapters expose the same props.

PropTypeDefaultDescription
modelValuestring | object''Value bound with v-model
output'html' | 'json''html'Output format
placeholderstringCurrent locale defaultPlaceholder text
locale'zh-CN' | 'en-US' | LocaleOptions'zh-CN'Built-in locale or partial message overrides
uploadImage(file: File) => Promise<string | null>-Image upload function; enables upload, paste, and drag/drop
uploadAsset(file: File, kind: UploadAssetKind) => Promise<string | UploadedAsset | null>-Video, audio, and file upload function; enables the attachment menu
readonlybooleanfalseReadonly mode
darkbooleanfalseComponent-level dark mode
showWordCountbooleantrueWhether to show the footer word count
autosavefalse | AutosaveOptions<string | object>falseAutosave config; shows save status in the footer when enabled
draftfalse | LocalDraftOptions<string | object>falseLocal draft recovery config; requires a stable document key
toolbarToolbarConfig | falseFull default toolbarControls toolbar button groups and order
toolbarLayout'classic' | 'compact''classic'Toolbar layout; compact moves lower-frequency actions into structured menus
toolbarOptionsToolbarOptionsDefault menu configControls toolbar menu data and action parameters
editorBehaviorOptionsEditorBehaviorOptionsDefault behavior configControls default behavior for links, tables, images, and media
extensionsExtensionsDefault extension setCustom Tiptap extensions; replaces the default extension set when provided
debugboolean | ProEditorDebugOptionsfalseDeveloper diagnostics switch for integration and editor behavior debugging
debugLogger(entry: ProEditorDebugEntry) => voidconsole.debugCustom diagnostics log receiver

Events

EventDescription
update:modelValueEmitted when editor content changes; used by v-model
autosave-status-changeEmitted with a new AutosaveState snapshot for every state transition
autosave-errorEmitted when saving enters the error state, with the error thrown by onSave
draft-foundEmitted when a valid local draft differs from current content
draft-restoredEmitted after an explicit draft restore
draft-clearedEmitted after deleting a local draft, with its document key
draft-errorEmitted for storage, serialization, or configuration errors

Slots

SlotDescription
toolbarFully replaces the built-in toolbar
toolbar-beforeInserts content before built-in toolbar buttons
toolbar-afterInserts content after built-in toolbar buttons

Locale

Built-in locales include Chinese and English:

vue
<ProEditorElementPlus v-model="content" locale="en-US" />

You can also override only a few messages:

vue
<ProEditorElementPlus
  v-model="content"
  :locale="{
    locale: 'en-US',
    messages: {
      'command.bold': 'Strong',
      'placeholder.default': 'Start writing...',
    },
  }"
/>

locale affects the built-in toolbar, dialogs, message text, preview bar, word count, autosave status, and the default placeholder when placeholder is not explicitly provided. Labels passed through custom toolbarOptions are displayed as-is and are not overwritten by the built-in dictionary.

See Autosave for behavior, concurrency guarantees, and examples. See Local Draft Recovery for storage and privacy details.

UploadAsset

uploadAsset is used for video, audio, and generic file upload. kind identifies the current entry:

ts
type UploadAssetKind = 'image' | 'video' | 'audio' | 'file'

interface UploadedAsset {
  url: string
  name?: string
  size?: number
  mimeType?: string
  fileTypeText?: string
  uploadedAt?: string | number | Date
  duration?: number
  poster?: string
}

Returning a string treats it as the asset URL, and Core fills name, size, and mimeType from the original File. Returning UploadedAsset preserves server metadata. fileTypeText overrides the file card type label. Returning null skips insertion.

Developer Diagnostics

debug and debugLogger are for developer troubleshooting and are disabled by default. They can filter lifecycle, content, selection, transaction, command, upload, markdown, adapter, and table logs by channel. See Developer Diagnostics.

A community package built on Tiptap v3 + Vue 3.