
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
VtipEdit — lightweight Vue 3 WYSIWYG rich-text editor built on Tiptap — composable, tree-shakable, and npm-ready.
基于 Vue 3、Tiptap 3、Reka UI 与 UnoCSS 的富文本编辑器。原子化样式已预编译进发布的 CSS,使用方无需在业务项目里再配置 UnoCSS。
npm 包名:@arturoyi/vtip-edit。
目前只为个人使用,如果你感兴趣请二开,我还在不断更改中。
VtipEditor(工具栏、气泡菜单等)与 VtipRenderer(只读)共用同一套文档模型。/ 斜杠命令面板,以及图片 / 音频 / 视频 / iframe 嵌入,并支持可选的文件上传钩子。locale="zh" | "en",默认 zh.useVtip 可传入标准 Tiptap EditorOptions。:root / .light 中(见 样式)。| Peer 依赖 | vue ^3、reka-ui ^2.8 |
| 与 Tiptap 的关系 | 安装 @arturoyi/vtip-edit 时会携带其对 Tiptap 的 dependencies,但库构建时 不会 把 @tiptap/* 打进包内,需由你的打包器从 node_modules 解析(通常与本包一并提升安装)。请与当前 vtip-edit 版本所使用的 Tiptap 大版本保持兼容。 |
npm install @arturoyi/vtip-edit vue reka-ui
# 或
pnpm add @arturoyi/vtip-edit vue reka-ui
在应用中一次性引入样式:
import '@arturoyi/vtip-edit/style.css'
VtipEditor)v-model 既可传 HTML 字符串,也可传 ProseMirror JSON 对象。update:modelValue 的输出类型与初始类型一致:字符串进则出 HTML,对象进则出 JSON.
<script setup lang="ts">
import { ref } from 'vue'
import { VtipEditor } from '@arturoyi/vtip-edit'
import '@arturoyi/vtip-edit/style.css'
const content = ref('<p>Hello World!</p>')
async function uploadFile(file: File, fileType: 'image' | 'audio' | 'video') {
// 返回上传完成后的资源 URL
return 'https://example.com/media/' + file.name
}
</script>
<template>
<VtipEditor
v-model="content"
locale="zh"
:upload-file="uploadFile"
@focus="() => {}"
@blur="() => {}"
/>
</template>
VtipRenderer)内容与编辑器相同形状;无工具栏,不可编辑。
<script setup lang="ts">
import { VtipRenderer } from '@arturoyi/vtip-edit'
import '@arturoyi/vtip-edit/style.css'
const content = '<p>仅预览。</p>'
</script>
<template>
<VtipRenderer :model-value="content" locale="zh" />
</template>
useVtip内部使用的无 UI 钩子。可传入额外的 Tiptap extensions(会接在内置扩展之后),以及任意 EditorOptions 字段(例如 editorProps、autocorrect 等)。
import { useVtip } from '@arturoyi/vtip-edit'
import { EditorContent } from '@tiptap/vue-3'
// ……再与自定义布局、工具栏等组合
VtipEditor| 属性 | 类型 | 默认值 | 说明 |
|---|---|---|---|
modelValue | string | Tiptap JSON | undefined | 文档:HTML 字符串或 ProseMirror JSON |
locale | 'zh' | 'en' | 'zh' | 界面语言 |
uploadFile | (file, fileType) => Promise<string> | undefined | 若提供,图片/音频/视频相关流程可上传并插入返回的 URL;未提供时占位等流程可能使用兜底 URL |
事件: update:modelValue、focus、blur。
外层布局类名:.vtip-editor-container、.vtip-editor-content;ProseMirror 根节点为 .tiptap.
VtipRenderer| 属性 | 类型 | 默认值 | 说明 |
|---|---|---|---|
modelValue | string | Tiptap JSON | undefined | 与编辑器相同 |
locale | 'zh' | 'en' | 'zh' | 只读模式下仍会显示的文案所用语言 |
VtipEditor、VtipRenderer、useVtip、EditorContent、EditorToolbar、TableColMenu、TableRowMenu。
@arturoyi/vtip-edit/style.css(含主题 token 与 ProseMirror / Tiptap 规则)。--vtip-editor-bg、--vtip-editor-text、--vtip-table-border、--vtip-code-bg、--vtip-slash-menu-bg。完整列表见本仓库 src/style/theme/theme.css.vtip-edit 而单独配置 UnoCSS。katex/dist/katex.min.css),版本尽量与依赖中的 KaTeX 一致。pnpm install
pnpm dev # Vite 演示应用
pnpm build # 类型检查 + 构建库产物至 dist/
MIT
FAQs
VtipEdit — lightweight Vue 3 WYSIWYG rich-text editor built on Tiptap — composable, tree-shakable, and npm-ready.
We found that vtip-edit demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.