Appearance
放置光标 Dropcursor
定制 TipTap 官方 Dropcursor 的默认样式,可直接注册无需配置。
用法
ts
import { Dropcursor } from '@qingpai/core'
const editor = new Editor({
extensions: [Dropcursor],
})配置
继承 @tiptap/extension-dropcursor 的全部选项,仅覆盖默认值:
| 名称 | 类型 | 默认值 | 描述 |
|---|---|---|---|
color | string | '#155aef' | 放置光标颜色 |
width | number | 2 | 放置光标宽度(px) |
ts
Dropcursor.configure({
color: '#155aef',
width: 2,
})Source code
packages/core/src/extensions/dropcursor/