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