跳到主要内容

indent

描述

当增加块缩进时触发

用法

"indent": ({ step: number }) => boolean | void;

参数

indent 事件的回调函数可以接收一个包含以下参数的对象:

  • step - 缩进增加的步长
信息

要处理内部事件,您可以使用 Event Bus 方法

示例

// 初始化 RichText
const editor = new richtext.Richtext("#root", {
// 配置属性
});
// 订阅 "indent" 事件
editor.api.on("indent", (obj) => {
console.log(obj);
console.log("The indention was increased");
});

更新日志: 该事件在 v2.0 中新增