npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

vue-wysiwyg-tiptap

v0.1.3

Published

Headless WYSIWYG editor for Vue 3 built on Tiptap 3, with slash commands, mentions, AI assist, and markdown paste.

Downloads

507

Readme

vue-wysiwyg-tiptap

A headless, extensible WYSIWYG rich-text editor for Vue 3 built on Tiptap 3. Ships with slash commands, @mentions, AI text assist, image upload, markdown paste, and a bubble menu — all out of the box.

alt text

Docs & Live Demos · npm · GitHub

Features

  • Slash commands — type / for headings, lists, blockquote, code block, image, horizontal rule
  • Bubble menu — bold, italic, underline, strikethrough, code, link editing on text selection
  • @mentions — autocomplete with a configurable member list
  • AI text assist — modify selected text with customizable AI quick actions
  • Image upload — file picker, paste, and drag & drop with custom upload handler
  • Markdown paste — paste markdown and it converts to rich text automatically
  • Task lists — interactive checkboxes
  • Fully headless — all styles are optional and overridable via vwt-* CSS classes

Install

npm install vue-wysiwyg-tiptap vue @tiptap/core @tiptap/vue-3 @tiptap/pm

Quick Start

<script setup>
import { ref } from 'vue'
import { WysiwygEditor } from 'vue-wysiwyg-tiptap'
import 'vue-wysiwyg-tiptap/styles/editor.css'

const content = ref('<p>Hello world!</p>')
</script>

<template>
  <WysiwygEditor v-model="content" />
</template>

Props

| Prop | Type | Default | Description | |------|------|---------|-------------| | modelValue | String | '' | v-model HTML content | | members | Array<{id, label}> | [] | Users for @mention autocomplete | | onUploadImage | (file: File) => Promise<string \| null> | null | Image upload handler, return URL or null | | onImageUploadError | (message: string) => void | null | Image upload error callback | | onModifyText | (html: string, instruction: string) => Promise<string> | null | AI text modification handler | | aiQuickActions | Array<{label, instruction}> | See below | Override AI quick action buttons | | placeholder | String | "Type '/' for commands..." | Editor placeholder text | | extensions | Array | [] | Additional Tiptap extensions |

Default AI quick actions: Polish, Professional, Simplify, Expand, Fix Grammar.

Events

| Event | Payload | Description | |-------|---------|-------------| | update:modelValue | (html: string) | Content changed (used automatically with v-model) | | ready | (editor: Editor) | Tiptap editor instance is ready |

Slots

| Slot | Scope | Description | |------|-------|-------------| | overlay | { isUploading, isProcessing } | Custom loading overlay | | bubble-menu | { editor } | Replace the default bubble menu |

Exposed Refs

Access via a template ref on <WysiwygEditor ref="editorRef">:

  • editorRef.editor — Tiptap Editor instance
  • editorRef.aiAssist{ isProcessing, showPanel, togglePanel, applyModification, ... }
  • editorRef.imageUpload{ isUploading, openFilePicker, ... }

Image Upload

<script setup>
import { ref } from 'vue'
import { WysiwygEditor } from 'vue-wysiwyg-tiptap'

const content = ref('')

async function handleUpload(file) {
  const form = new FormData()
  form.append('image', file)
  const res = await fetch('/api/upload', { method: 'POST', body: form })
  const { url } = await res.json()
  return url
}
</script>

<template>
  <WysiwygEditor v-model="content" :on-upload-image="handleUpload" />
</template>

Images can be inserted via slash command, paste, or drag & drop. Accepted types: JPEG, PNG, GIF, WebP.

AI Assist

<script setup>
import { ref } from 'vue'
import { WysiwygEditor } from 'vue-wysiwyg-tiptap'

const content = ref('')

async function handleModify(html, instruction) {
  const res = await fetch('/api/ai/modify', {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({ html, instruction }),
  })
  const { result } = await res.json()
  return result
}

const actions = [
  { label: 'Summarize', instruction: 'Summarize in one sentence' },
  { label: 'Translate', instruction: 'Translate to French' },
]
</script>

<template>
  <WysiwygEditor
    v-model="content"
    :on-modify-text="handleModify"
    :ai-quick-actions="actions"
  />
</template>

Mentions

<template>
  <WysiwygEditor
    v-model="content"
    :members="[
      { id: '1', label: 'Alice Johnson' },
      { id: '2', label: 'Bob Smith' },
    ]"
  />
</template>

Type @ to trigger autocomplete. Up to 8 suggestions shown, filtered case-insensitively by label.

Styles

Two optional stylesheets are provided:

import 'vue-wysiwyg-tiptap/styles/editor.css'       // Editor UI (bubble menu, slash commands, etc.)
import 'vue-wysiwyg-tiptap/styles/rich-content.css'  // Typography for rendered HTML output

For rendered output, wrap your content in a .vwt-rich-content container:

<div class="vwt-rich-content" v-html="content" />

All CSS classes use the vwt- prefix and can be freely overridden. See the Styling guide for the full class reference.

Individual Exports

All components, extensions, composables, and utilities are individually importable:

import { SlashCommand, MentionExtension, ExitBlock, MarkdownPaste } from 'vue-wysiwyg-tiptap'
import { useEditorImageUpload, useEditorAIAssist } from 'vue-wysiwyg-tiptap'
import { isAllowedUrl, createSuggestionRenderer } from 'vue-wysiwyg-tiptap'

License

MIT