← 全部文档

RichTextEditor 属性

一组只读属性,可用于获取与编辑器相关的对象。

属性说明
editor.document编辑器内容所在的 document。调用 insertElement() 之前,请用它创建节点。
editor.window编辑区域的内容 window。
editor.input编辑器保持同步的隐藏表单输入框(如果存在)。
editor.formatterFormatter 接口,其命名与 TinyMCE 的 tinymce.Formatter 一致,方便从 TinyMCE 迁移的集成者沿用同一套词汇:register、unregister、get、has、apply、remove、toggle、match、matchAll、matchNode、closest、canApply、getCssText 和 formatChanged。
editor.snippets代码片段展开所使用的已注册片段定义。
editor.toolbarFactoryMap把工具栏项名称映射到其工厂函数。插件在这里注册自定义工具栏项。
editor.config保存此编辑器实例的所有配置。
editor.container返回包含编辑器实例的外部 <div> 元素。
editor.iframe返回编辑器实例的 iframe 对象。
editor.document 返回编辑器实例当前活动的编辑器 document 对象。
editor.window 返回编辑器实例当前活动的编辑器 window 对象。
editor.selection返回编辑器实例的 selection 对象。