Scan your whole stack
From OX Research Newsroom
Are you using vditor?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v4.0.2-alpha.11
vditor was last scanned on 23 Nov 2026 at version 4.0.2-alpha.11. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 4.0.2-alpha.11 LATEST | 23 Nov 2026 | No rules fired |
| 4.0.2-alpha.10 | 19 Nov 2026 | No rules fired |
| 4.0.2-alpha.9 | 13 Nov 2026 | No rules fired |
| 4.0.2-alpha.8 | 9 Nov 2026 | Not shown |
| 4.0.2-alpha.7 | 8 Nov 2026 | Not shown |
Findings for v4.0.2-alpha.11. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 4.0.2-alpha.11; other versions have their own rules, not their own score.
0 CRITICAL 0 HIGH 5 MEDIUM 0 LOW
The publisher’s own README, as collected from the registry.
Vditor 是一款浏览器端的 Markdown 编辑器,支持所见即所得、即时渲染(类似 Typora)和分屏预览模式。它使用 TypeScript 实现,支持原生 JavaScript 以及 Vue、React、Angular 和 Svelte 等框架。
欢迎到 Vditor 官方讨论区了解更多。同时也欢迎关注 B3log 开源社区微信公众号 B3log开源:
随着 Markdown 排版方式的普及,越来越多的应用开始集成 Markdown 编辑器。目前主流可集成的 Markdown 编辑器现状如下:
而这三点恰好对应了三种应用场景:
所以,一个能够适配应用场景的 Markdown 编辑器至关重要,它需要考虑到:
Vditor 在这些方面做了努力,希望能为现代化的通用 Markdown 编辑领域做出一些贡献。
所见即所得模式对不熟悉 Markdown 的用户较为友好,熟悉 Markdown 的话也可以无缝使用。
即时渲染模式对熟悉 Typora 的用户应该不会感到陌生,理论上这是最优雅的 Markdown 编辑方式。
传统的分屏预览模式适合大屏下的 Markdown 编辑。
以上大部分特性可以通过开关配置是否启用,开发者可根据自己的应用场景选择搭配。
npm install vditor --save
import Vditor from 'vditor'
import "~vditor/src/assets/less/index"
const vditor = new Vditor(id, {options...})
<!-- ⚠️生产环境请指定版本号,如 https://unpkg.com/vditor@x.x.x/dist... -->
<link rel="stylesheet" href="https://unpkg.com/vditor/dist/index.css" />
<script src="https://unpkg.com/vditor/dist/index.min.js"></script>
编辑器所展现的外观。内置classic,dark 2 套主题。
options.theme 设置内置主题setTheme 更新编辑器主题Markdown 输出的 HTML 所展现的外观。内置 ant-design, light,dark,wechat 4 套主题。支持内容主题扩展接口。
class="vditor-reset"options.preview.theme 设置内置或自己开发的主题列表IPreviewOptions.theme 设置内置或自己开发的主题setTheme 或 setContentTheme 更新内容主题代码块所展现的外观。内置 github 等 36 套主题。
options.preview.hljs 对代码块样式、行号、是否启用进行设置IPreviewOptions.hljs 对代码块样式、行号、是否启用进行设置setTheme 或 setCodeTheme 更新代码主题可填入元素 id 或元素自身 HTMLElement
⚠️:当填入元素自身的 HTMLElement 时需设置 options.cache.id 或将 options.cache.enable 设置为 false
| 说明 | 默认值 | |
|---|---|---|
| i18n | 多语言,参见 ITips | - |
| undoDelay | 历史记录间隔 | - |
| after | 编辑器异步渲染完成后的回调方法 | - |
| height | 编辑器总高度 | 'auto' |
| minHeight | 编辑区域最小高度 | - |
| width | 编辑器总宽度,支持 % | 'auto' |
| placeholder | 输入区域为空时的提示 | '' |
| lang | 语言种类:de_DE, en_US, es_ES, fr_FR, ja_JP, ko_KR, pt_BR, ru_RU, sv_SE, vi_VN, zh_CN, zh_TW | 'zh_CN' |
| input(value: string) | 输入后触发 | - |
| focus(value: string) | 聚焦后触发 | - |
| blur(value: string) | 失焦后触发 | - |
| keydown(event: KeyboardEvent) | 按下后触发 | - |
| esc(value: string) | esc 按下后触发 | - |
| ctrlEnter(value: string) | ⌘/ctrl+enter 按下后触发 | - |
| select(value: string) | 编辑器中选中文字后触发 | - |
| unSelect() | 编辑器中未选中文字后触发 | - |
| tab | tab 键操作字符串,支持 \t 及任意字符串 |
- |
| typewriterMode | 是否启用打字机模式 | false |
| cdn | 配置自建 CDN 地址 | https://unpkg.com/vditor@${VDITOR_VERSION} |
| mode | 可选模式:sv, ir, wysiwyg | 'ir' |
| debugger | 是否显示日志 | false |
| value | 编辑器初始化值 | '' |
| theme | 主题:classic, dark | 'classic' |
| icon | 图标风格:ant, material | 'ant' |
| customRenders: {language: string, render: (element: HTMLElement, vditor: IVditor) => void}[] | 自定义渲染器 | [] |
| customWysiwygToolbar(type: TWYSISYGToolbar, element: HTMLElement): void | 对 wysiwyg 模式下的工具栏进行自定义 | - |
| customWysiwygMobileToolbar(type: TWYSISYGToolbar, element: HTMLElement): void | 对移动端 wysiwyg 模式下的工具栏进行自定义,未添加菜单项时不显示入口 | - |
toolbar: ['emoji', 'br', 'bold', '|', 'line'] 。默认值参见 src/ts/util/Options.tsemoji,headings,bold,italic,strike,|,line,quote,list,ordered-list,check ,outdent ,indent,code,inline-code,insert-after,insert-before ,undo,redo,upload,link,table,record,edit-mode,both,preview,fullscreen,outline,code-theme,content-theme,export, devtools,info,help,brname 不在枚举中时,可以添加自定义按钮,格式如下:Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.