
Company News
Socket Joins New OpenJS Program to Fund Node.js Security Work
Socket is joining the OpenJS Security Stewardship Program to fund Node.js vulnerability research, maintainer remediation, and security releases.
@file-viewer/renderer-text
Advanced tools
Standalone code, text, and Markdown renderer for File Viewer; Mermaid, patch diff, and Git bundle tools are explicit opt-in capabilities.
Flyfish File Viewer 的基础代码、文本和 Markdown renderer 包。Mermaid、patch 左右比对和 Git bundle 检查已拆到 @file-viewer/capability-mermaid 与 @file-viewer/capability-text-tools,不进入 standard/full 默认闭包。
import FileViewer from '@file-viewer/vue3'
import { textRenderer } from '@file-viewer/renderer-text'
const options = {
builtinRenderers: 'none',
renderers: textRenderer,
text: {
lineNumbers: true,
},
}
也可以与其他 renderer 组合:
import { textRenderer } from '@file-viewer/renderer-text'
import { pdfRenderer } from '@file-viewer/renderer-pdf'
const options = {
builtinRenderers: 'none',
renderers: [pdfRenderer, textRenderer],
}
highlight.js core + 按语言动态加载,避免一次性注册全部语言。options.text.toolbar: false 可隐藏该 renderer 内部栏,不影响 Viewer 的下载、搜索、缩放等全局工具栏。options.text.lineNumbers: true 显示行号;行号不会进入复制内容、搜索结果或无障碍朗读。超大文本保留原有的虚拟行号栏,可显式传 false 隐藏。patch 使用 diff2html 渲染左右比对视图,bundle / bdl 才启用 Git bundle 结构检查。marked 输出只读阅读面,并保留明暗主题、表格滚动和统一缩放 provider。options.text.markdownVirtualizeAboveBytes。standard/full 默认包含基础代码、文本和 Markdown,不安装 diff2html、pako 或 Mermaid。打开可选格式时会提示运行 npx file-viewer-cli add text-tools --write 或 add mermaid-markdown --write;preset-all 仅用于显式全量/调试。
FAQs
Standalone code, text, and Markdown renderer for File Viewer; Mermaid, patch diff, and Git bundle tools are explicit opt-in capabilities.
The npm package @file-viewer/renderer-text receives a total of 8,772 weekly downloads. As such, @file-viewer/renderer-text popularity was classified as popular.
We found that @file-viewer/renderer-text 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.

Company News
Socket is joining the OpenJS Security Stewardship Program to fund Node.js vulnerability research, maintainer remediation, and security releases.

Security News
Two compromised GitHub Actions were re-enabled with malicious tags intact, exposing thousands of downstream repositories to Mini Shai-Hulud.

Research
/Security News
A malicious Firefox extension fetches its payload after installation to evade detection, steal Google session cookies, and automate account takeover.