Skip to content

editor.dom ​

方法 ​

createDivider() ​

javascript
createDivider(options: {editor?: Editor, attrs?: Object.<*>, tabs?: Array[{tab: string, key: string}], activeTab?: string}): HTMLElement

创建分割线

示例 ​

javascript
editor.dom.createDivider()

参数 ​

名称说明类型默认值
editor编辑器实例Editor-
attrs标签属性Objectnull
tabs选项卡Array[{tab: string, key: string}][]
activeTab选中的选项卡string-

返回值 ​

  • HTMLElement

createAnalysis() ​

javascript
createAnalysis(tag: string, attrs: Object, content: string): HTMLElement

创建解析

示例 ​

javascript
editor.dom.createAnalysis('div', null, '内容')

参数 ​

名称说明类型默认值
tag标签stringdiv
attrs标签属性Objectnull
content内容string-

返回值 ​

  • HTMLElement

createQuestionNumber() ​

javascript
createQuestionNumber(tag: string, attrs: Object, content: string): HTMLElement

创建题号

示例 ​

javascript
editor.dom.createQuestionNumber('span', null, '1')

参数 ​

名称说明类型默认值
tag标签stringspan
attrs标签属性Objectnull
content内容string-

返回值 ​

  • HTMLElement