跳到主要内容

outdent

描述

当减少块缩进时触发

用法

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

参数

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

  • step - 缩进减少的步长
信息

如需处理内部事件,可以使用 Event Bus 方法

示例

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

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