XEditor — Rich Text Editor
A rich-text editor based on Tiptap (ProseMirror), with a built-in toolbar supporting bold, italic, strikethrough, headings, lists, blockquotes, code blocks, and image insertion. It binds HTML content bidirectionally via v-model.
Live Demo
vue
<XEditor v-model="content" />Props / Events
| Prop | Type | Default | Description |
|---|---|---|---|
modelValue (v-model) | string | '' | Editor HTML content |
Dependency Installation
bash
npm install @tiptap/vue-3 @tiptap/starter-kit @tiptap/extension-image @tiptap/extension-code-block-lowlight lowlightUsage Notes
- Image insertion (toolbar button / paste / drag-drop) uses a local
Object URLpreview in the demo environment — no backend upload endpoint required. - Code blocks use lowlight for syntax highlighting, together with a
highlight.jstheme stylesheet. - Single image size is limited to 5MB.