@coolbytes/editorjs-delimiter

中文文档
1.0.4发布于 2025/07/06MITESM + CJS零依赖近 30 天下载 2104

Delimiter block tool for Editor.js

原始使用文档
文档目录5 节
  1. Preview
  2. Installation
  3. Usage
  4. Config Params
  5. Output data

Delimiter block tool for Editor.js

This Editor.js block tool extends @editorjs/delimiter to include more styles - dash and line. For line style, more options are also available under block settings menu (see Preview).

Preview

Block Tool

delimiter

Block Settings

settings

Installation

Using npm

npm install @coolbytes/editorjs-delimiter

Using yarn

yarn add @coolbytes/editorjs-delimiter

Usage

Include it in the tools property of Editor.js config:

const editor = new EditorJS({
  tools: {
    delimiter: Delimiter
  }
});

Config Params

FieldTypeOptionalDefaultDescription
styleOptionsstring[]Yes['star', 'dash', 'line']All supported delimiter styles
defaultStylestringYes'star'Preferred delimiter style
lineWidthOptionsnumber[]Yes[8, 15, 25, 35, 50, 60, 100]All supported line width options (%). Applicable for 'line' style only
defaultLineWidthnumberYes25Preferred line width. Applicable for 'line' style only
lineThicknessOptionsnumber[]Yes[1, 2, 3, 4, 5, 6]All supported line thickness options. Applicable for 'line' style only
defaultLineThicknessnumberYes2Preferred line thickness. Applicable for 'line' style only

 

const editor = EditorJS({
  tools: {
    delimiter: {
      class: Delimiter,
      config: {
        styleOptions: ['star', 'dash', 'line'],
        defaultStyle: 'star',
        lineWidthOptions: [8, 15, 25, 35, 50, 60, 100],
        defaultLineWidth: 25,
        lineThicknessOptions: [1, 2, 3, 4, 5, 6],
        defaultLineThickness: 2,
      }
    }
  }
});

Output data

FieldTypeAvailabilityDescription
stylestringAll StylesDelimiter Style
lineWidthnumberlineWidth of line style delimiter
lineThicknessnumberlineThickness of line style delimiter

 

Example:

{
  "time": 1715969561758,
  "blocks": [
    {
      "id": "_K5QcJHHuK",
      "type": "delimiter",
      "data": {
        "style": "line",
        "lineWidth": 25,
        "lineThickness": 2
      }
    }
  ],
  "version": "2.29.1"
}

版本与发布记录

@coolbytes/editorjs-delimiter 共发布 5 个版本,首次发布于 2024/05/18;过去 12 个月发布了 0 个版本。

版本发布日期距今
1.0.4latest2025/07/061.4 年前
1.0.32024/08/162 年前
1.0.22024/05/182 年前
1.0.12024/05/182 年前
1.0.02024/05/182 年前

关于 @coolbytes/editorjs-delimiter 的常见问题

@coolbytes/editorjs-delimiter 是什么?

Delimiter block tool for Editor.js

如何安装 @coolbytes/editorjs-delimiter?

在项目目录运行 npm install @coolbytes/editorjs-delimiter,或使用 pnpm add / yarn add / bun add。

@coolbytes/editorjs-delimiter 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/coolbytes__editorjs-delimiter 是否存在。

@coolbytes/editorjs-delimiter 支持 ESM 还是 CommonJS?

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

@coolbytes/editorjs-delimiter 可以商用吗?

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

@coolbytes/editorjs-delimiter 的下载量有多少?

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

@coolbytes/editorjs-delimiter 还在维护吗?

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