Agent Skills › smartdoca/doca › doca-editor-integration

doca-editor-integration

GitHub

用于在 Doca 及在线办公模块中集成或标准化文档编辑器子包,涵盖富文本、表格等格式。处理资源回调、只读行为、自定义元素及权限,规范宿主与包的边界交互。

skills/doca-editor-integration/SKILL.md smartdoca/doca

Trigger Scenarios

开发文档编辑器子包 适配第三方编辑器包 定义编辑器宿主 API

Install

npx skills add smartdoca/doca --skill doca-editor-integration -g -y
More Options

Use without installing

npx skills use smartdoca/doca@doca-editor-integration

指定 Agent (Claude Code)

npx skills add smartdoca/doca --skill doca-editor-integration -a claude-code -g -y

安装 repo 全部 skill

npx skills add smartdoca/doca --all -g -y

预览 repo 内 skill

npx skills add smartdoca/doca --list

SKILL.md

Frontmatter
{
    "name": "doca-editor-integration",
    "description": "Integrate or standardize any document-type editor subpackage (rich text, spreadsheet, Markdown, canvas, slides, and future formats) in Doca and online-office modules, including resource callbacks, readonly behavior, custom inline elements, toolbar commands, find\/replace and host-owned permissions. Use when developing a subpackage, adapting editor packages, or defining their host API, not for unrelated application UI."
}

Doca editor integration

Read the integration contract before changing a package boundary. It separates verified slatetsx APIs from target capabilities for other editors. Inspect the installed artifact's README and exported types before using any method; do not assume a proposed API exists.

This boundary contract applies to every document-type subpackage, current and future — the per-format sections are instances of one shared host/package boundary. Subpackage developers and Doca host developers maintain it together: boundary changes require agreement on both sides, and the project docs and every packaged skill copy (project skills/ and user skills directories) are updated in the same change.

Keep the package responsible for its document model, editing commands, selection, undo, atomic nodes and format-specific rendering. Keep identity, user lookup/cards, assets/ACL, discovery policy, notifications, business references and networking in the host. Do not import Doca routes, cookies, user directory or deployment domains into a reusable editor package.

For collaboration work also follow the project's collaboration contract. A unified component surface is not permission to change a codec, rebuild existing documents or add another autosave channel.

Implement the document scenario first and prove its behavior. Other modules reuse lifecycle and capability semantics, not Slate types or DOM implementation details. Explicitly mark unsupported capabilities; a spreadsheet should not pretend to have text ranges or permanent anchors based on transient A1 coordinates.

Before handoff verify actual package roundtrips, readonly guards, media permission checks, stable props, atomic clipboard behavior, model-based replacement/undo, and two-client convergence for affected operations. Tests use isolated data. Record what is shipped, host-adapted, proposed upstream, and unverified. A build is not evidence of collaboration correctness.

For file import/export or conversion-package upgrades, also read file exchange. Accept documented lossy conversion when it meets the requested basic-content fidelity; preserve host-owned assets/ACL and distinguish real file formats from internal JSON/recovery models.

Version History

  • 117ce85 Current 2026-10-18 15:23

Same Skill Collection

skills/doca-collaboration/SKILL.md
skills/doca-i18n/SKILL.md

Metadata

Files
0
Version
117ce85
Hash
5ee9f523
Indexed
2026-10-18 15:23

Home - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-10-19 04:24
浙ICP备14020137号-1