Class T.editor.Editor
Extends
T.editor.EventBase.
| Method Attributes | Method Name and Description |
|---|---|
|
execCommand(cmdName)
执行编辑命令
|
|
|
focus()
让编辑器获得焦点
|
|
|
获取编辑内容
|
|
|
initPlugins(plugins)
加载插件
|
|
|
queryCommandState(cmdName)
查询命令的状态
|
|
|
queryCommandValue(cmdName)
查询命令的值
|
|
|
render(container)
渲染编辑器的DOM到指定容器,必须且只能调用一次
|
|
|
setContent(html)
设置编辑内容
|
- Methods borrowed from class T.editor.EventBase:
- addListener, fireEvent, removeListener
| Event Attributes | Event Name and Description |
|---|---|
|
ready()
|
|
- Parameters:
- {Object} options
Method Detail
execCommand(cmdName)
执行编辑命令
- Parameters:
- {String} cmdName
- See:
- docs/Commands.html
focus()
让编辑器获得焦点
{String}
getContent()
获取编辑内容
- Returns:
- {String}
initPlugins(plugins)
加载插件
- Parameters:
- {Array} plugins
{Number,*}
queryCommandState(cmdName)
查询命令的状态
- Parameters:
- {String} cmdName
- Returns:
- {Number,*} -1 : disabled, false : normal, true : enabled.
- See:
- docs/Commands.html
{*}
queryCommandValue(cmdName)
查询命令的值
- Parameters:
- {String} cmdName
- Returns:
- {*}
- See:
- docs/Commands.html
render(container)
渲染编辑器的DOM到指定容器,必须且只能调用一次
- Parameters:
- {Element,String} container
setContent(html)
设置编辑内容
- Parameters:
- {String} html
Event Detail
beforeSelectionChange()
ready()
selectionChange()