Appearance
末尾空段落 KeepEmptyParagraph
始终在文档末尾保留一个空段落。任何编辑操作后若文档最后一个块不是空段落(如末尾是题目、表格、标题,或最后一个段落仍有内容),自动在文末插入一个空 paragraph。
用法
ts
import { KeepEmptyParagraph } from '@qingpai/core'
const editor = new Editor({
extensions: [KeepEmptyParagraph],
})已在 StartKit 默认注册
KeepEmptyParagraph 是 StartKit 的成员扩展,默认随 StartKit 注册;仅在需要单独控制时使用上述方式注册。
Source code
packages/core/src/extensions/keep-empty-paragraph/