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