@atlaskit/editor-core

中文文档
242.0.18发布于 2026/11/07Apache-2.0TypeScriptESM + CJS近 30 天下载 11.1万

A package contains Atlassian editor core functionality

原始使用文档
文档目录9 节
  1. Description
  2. Key Features
  3. Editor Components
  4. Presets and Configuration
  5. Core Infrastructure
  6. UI Components
  7. Examples
  8. Quick Start
  9. Team

@atlaskit/editor-core

A package contains Atlassian editor core functionality.

Description

This is the main package for the Atlassian Editor, providing the core functionality and components needed to build rich text editing experiences. It includes composable editor components, presets for different use cases (full-page, comment, chromeless), and the foundational infrastructure for the editor ecosystem.

Key Features

Editor Components

  • Composable Editor: Modern composable editor architecture
  • Full Page Editor: Complete editing experience for documents
  • Comment Editor: Lightweight editor for comments and short content
  • Chromeless Editor: Minimal editor without surrounding UI

Presets and Configuration

  • Default Preset: Standard editor configuration with common features
  • Universal Preset: Flexible preset supporting multiple use cases
  • Custom Presets: Extensible preset system for tailored configurations

Core Infrastructure

  • Plugin System: Extensible plugin architecture
  • Editor View: ProseMirror-based editing foundation
  • Performance Tracking: Built-in performance monitoring and analytics
  • Error Boundaries: Robust error handling and recovery

UI Components

  • Toolbar Systems: Primary, floating, and contextual toolbars
  • Context Panels: Side panels for additional editor controls
  • Element Browser: Quick insert interface for content elements

Examples

The package includes comprehensive examples in the examples/ directory covering:

  • Kitchen sink demonstration
  • Different editor appearances and configurations
  • Collaborative editing setups
  • Media handling and integrations
  • Performance testing scenarios

Quick Start

Current devloop involves leveraging the atlaskit website shell to build out examples.

  1. After following https://hello.atlassian.net/wiki/spaces/AF/pages/2634599657/Getting+Started
  2. yarn start editor-core

Then hit http://localhost:9000/examples/editor/editor-core

This opts you into the default esbuild configuration. If needing to fall back to webpack, this can be done via yarn start editor-core --experimental=webpack

Running visual regression tests will also use the webpack build, due to the slight variation in how those assets are built for styling VISUAL_REGRESSION=true yarn start editor-core

If you need to override the default port and run multiple builds side by side, use the PORT env variable: PORT=9005 yarn start editor-core

Team

Editor

版本与发布记录

@atlaskit/editor-core 共发布 4,156 个版本,首次发布于 2017/01/30;过去 12 个月发布了 621 个版本。

版本发布日期距今
242.0.18latest2026/11/07今天
242.0.172026/11/061 天前
242.0.162026/11/061 天前
242.0.152026/11/061 天前
242.0.142026/11/062 天前
242.0.132026/11/052 天前

其他发布通道:next → 183.1.1,hotfix → 182.1.3。

关于 @atlaskit/editor-core 的常见问题

@atlaskit/editor-core 是什么?

A package contains Atlassian editor core functionality

如何安装 @atlaskit/editor-core?

在项目目录运行 npm install @atlaskit/editor-core,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:react(^18.2.0 || ^19.2.0)、react-dom(^18.2.0 || ^19.2.0)、react-intl(^5.25.1 || ^6.0.0 || ^7.0.0)、@atlaskit/media-core(^39.0.0)、@atlaskit/editor-common(^134.9.0)、@atlaskit/link-provider(^6.1.0)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@atlaskit/editor-core 支持 TypeScript 吗?

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

@atlaskit/editor-core 支持 ESM 还是 CommonJS?

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

@atlaskit/editor-core 可以商用吗?

@atlaskit/editor-core 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@atlaskit/editor-core 的下载量有多少?

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

@atlaskit/editor-core 还在维护吗?

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