@ckbox/core

中文文档
2.14.0发布于 2026/10/15SEE LICENSE IN LICENSE.mdTypeScriptCommonJS近 30 天下载 6490

Core functionality of CKBox

原始使用文档
文档目录4 节
  1. Quick start
  2. Integration with CKEditor 5
  3. Documentation
  4. License

CKBox

https://ckbox.io/

CKBox is a file management platform that makes working with your files easier while providing an outstanding user experience.

Quick start

Using a build served from the CDN is the simplest and fastest way of embedding CKBox in your application. Additionally, all the scripts served from the CDN are loaded faster, as they are hosted on multiple servers around the globe, shortening the response time.

To start using CKBox on your website, embed the following script element in the HTML code of the page:

<script src="https://cdn.ckbox.io/ckbox/2.14.0/ckbox.js"></script>

Quick implementation example:

<!doctype html>
<html>
    <head>
        <meta charset="UTF-8" />
        <script src="https://cdn.ckbox.io/ckbox/2.14.0/ckbox.js"></script>
    </head>
    <body>
        <div id="ckbox"></div>
        <script>
            // You must provide a valid token URL in order to use the application
            // After registering to CKBox, the fastest way to try out CKBox is to use the development token endpoint:
            // https://ckeditor.com/docs/ckbox/latest/guides/configuration/authentication.html#token-endpoint
            CKBox.mount(document.getElementById("ckbox"), {
                tokenUrl: "https://your.token.url",
            });
        </script>
    </body>
</html>

Integration with CKEditor 5

The code snippet below presents the simplest scenario for integration of CKEditor 5 with CKBox. To read more about the integration, please refer to the CKEditor 5 integration guide.

<!doctype html>
<html>
    <head>
        <meta charset="UTF-8" />
        <script src="https://cdn.ckbox.io/ckbox/2.14.0/ckbox.js"></script>
        <link
            rel="stylesheet"
            href="https://cdn.ckbox.io/ckbox/2.14.0/styles/themes/lark.css"
        />
        <link rel="stylesheet" href="https://cdn.ckeditor.com/ckeditor5/48.4.0/ckeditor5.css" />
    </head>
    <body>
        <div id="editor"></div>

        <script type="importmap">
            {
                "imports": {
                    "ckeditor5": "https://cdn.ckeditor.com/ckeditor5/48.4.0/ckeditor5.js",
                    "ckeditor5/": "https://cdn.ckeditor.com/ckeditor5/48.4.0/"
                }
            }
        </script>

        <script type="module">
            import {
                ClassicEditor,
                Essentials,
                CloudServices,
                CKBox,
                CKBoxImageEdit,
                PictureEditing,
                Image,
                ImageUpload,
                ImageUploadEditing,
                ImageUploadProgress,
                LinkEditing,
                Heading,
                Font,
                Bold,
                Italic,
                BlockQuote,
                Paragraph,
                Indent,
                Link,
                List
            } from 'ckeditor5';

            ClassicEditor
                .create( {
                    attachTo: document.querySelector( '#editor' ),
                    plugins: [
                        CKBox, CloudServices, Essentials, Bold, Italic, Font, Paragraph, LinkEditing,
                        PictureEditing, Image, ImageUploadEditing, ImageUploadProgress, BlockQuote,
                        Indent, Heading, Link, List, CKBoxImageEdit, ImageUpload
                    ],
                    ckbox: {
                        tokenUrl: 'https://your.token.url',
                        theme: 'lark',
                    },
                    toolbar: [
                        'ckbox', 'imageUpload', '|', 'heading', '|', 'undo', 'redo', '|', 'bold', 'italic', '|',
                        'blockQuote', 'indent', 'link', '|', 'bulletedList', 'numberedList'
                    ],
                } )
                .catch( error => {
                    console.error( error );
                } );
        </script>
    </body>
</html>

For more advanced integration scenarios, please refer to the CKBox documentation.

Documentation

CKBox documentation includes information about:

  • Enabling CKBox in your application.
  • Integrating CKBox with CKEditor 5.
  • Configuring and customizing CKBox.

You will find ready to use code snippets and live examples there.

License

CKBox (https://ckeditor.com/ckbox/)

Copyright (c) 2021-2026, CKSource Holding sp. z o.o. All rights reserved. CKBox is licensed under a commercial license and is protected by copyright law. For more details about available licensing options please contact us at [email protected].

Trademarks CKBox is a trademark of CKSource Holding sp. z o.o. All other brand and product names are trademarks, registered trademarks or service marks of their respective holders.

版本与发布记录

@ckbox/core 共发布 110 个版本,首次发布于 2022/04/14;过去 12 个月发布了 18 个版本。

版本发布日期距今
2.14.0latest2026/10/1525 天前
2.14.0-rc.0rc2026/10/1426 天前
2.13.2-rc.02026/10/011 个月前
2.13.12026/08/102 个月前
2.13.1-rc.02026/08/053 个月前
2.13.02026/06/164 个月前

其他发布通道:beta → 0.0.1,dev → 2.9.0-dev.0,rc → 2.14.0-rc.0。

关于 @ckbox/core 的常见问题

@ckbox/core 是什么?

Core functionality of CKBox

如何安装 @ckbox/core?

在项目目录运行 npm install @ckbox/core,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:react(^19)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@ckbox/core 支持 TypeScript 吗?

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

@ckbox/core 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@ckbox/core 可以商用吗?

@ckbox/core 使用 SEE LICENSE IN LICENSE.md 许可。许可条款写在包内的独立文件中,请阅读该文件确认可否商用。以上为概括,不构成法律意见,请以许可原文为准。

@ckbox/core 的下载量有多少?

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

@ckbox/core 还在维护吗?

最新版本 2.14.0 发布于 2026/10/15(25 天前);至今共发布 110 个版本,其中过去 12 个月发布了 18 个;首次发布于 2022/04/14。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。