@directus/visual-editing

中文文档
2.1.0发布于 2026/06/11MITTypeScriptESM + CJS构建来源已验证近 30 天下载 4.3万

Visual editing library to enable in-place editing of your website’s frontend from within the Visual Editor in Directus

原始使用文档
文档目录4 节
  1. Documentation
  2. Test Website
  3. License
  4. Additional Resources

Visual Editing Frontend Library by Directus

This library works together with a Directus instance to enable Visual Editing functionality from within the Visual Editor module in Directus Studio.

Web developers must make use of this library to ensure communication between their website’s HTML elements and their Directus instance. This is done through data attributes and helper functions built into the library and imported into your website.

Documentation

Documentation covering the setup and functionality for both the frontend library and the studio module can be found in the Directus documentation.

Test Website

A test website pre-configured to work with the Directus Visual Editor module can be found in a separate repository. This can be used for example purposes and to make it easy to set up an environment for testing or contributing.

For detailed instructions on setting up the test environment see the test website's repository.

License

This package is licensed under the MIT License. See the LICENSE file for more information.

Additional Resources

版本与发布记录

@directus/visual-editing 共发布 8 个版本,首次发布于 2025/03/26;过去 12 个月发布了 5 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
2.1.0latest2026/06/115 个月前
2.1.0-rc.0canary2026/05/295 个月前
2.0.12026/05/016 个月前
2.0.02026/03/058 个月前
1.2.02026/02/069 个月前
1.1.02025/04/301.5 年前

关于 @directus/visual-editing 的常见问题

@directus/visual-editing 是什么?

Visual editing library to enable in-place editing of your website’s frontend from within the Visual Editor in Directus

如何安装 @directus/visual-editing?

在项目目录运行 npm install @directus/visual-editing,或使用 pnpm add / yarn add / bun add。

@directus/visual-editing 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@directus/visual-editing 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@directus/visual-editing 可以商用吗?

@directus/visual-editing 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@directus/visual-editing 的下载量有多少?

根据 npm 官方下载统计,@directus/visual-editing 在 2026/10/13 – 2026/11/11 这 30 天内被下载 42,612 次,日均约 1,420 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@directus/visual-editing 还在维护吗?

最新版本 2.1.0 发布于 2026/06/11(5 个月前);至今共发布 8 个版本,其中过去 12 个月发布了 5 个;首次发布于 2025/03/26。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。