cut
描述
在剪切选中文本时触发
用法
"cut": () => boolean | void;
信息
如需处理内部事件,可以使用 Event Bus 方法
示例
// 初始化 RichText
const editor = new richtext.Richtext("#root", {
// 配置属性
});
// 订阅 "cut" 事件
editor.api.on("cut", () => {
console.log("Selected text was cut");
});
更新日志: 该事件在 v2.0 中新增