api.getReactiveState()
描述
返回包含 RichText 响应式属性的对象
用法
api.getReactiveState(): object;
返回值
该方法返回一个包含以下参数的对象:
{
cursorState: { subscribe: any },
defaultStyles {...},
document {...},
fullscreen {...},
history {...},
layoutMode {...},
popup {...},
selection {...}
}
示例
// 初始化 RichText
const editor = new richtext.Richtext("#root", {
// 配置属性
});
// 获取 RichText 的响应式状态
const reactive_state = editor.api.getReactiveState();
console.log(reactive_state)
更新日志: 该方法已在 v2.0 中新增