Editor
Class
- Editor ()
Attributes
- customLink {String[]} Custom css link url for editor.
- customStyle {String} Custom style for editor.
- data {String} Current editor's content
- document {Node} iframe 's document
- formatData {String} Current editor's format content
- iframe {Node} iframe
- mode {} editor mode.
- Editor. POSITION {} <static> Enum for node position
- Editor. RANGE {} <static> Enum for range
- Editor. SELECTION {} <static> selection type enum
- statusBarEl {Node} status bar element
- textarea {Node} textarea
- toolBarEl {Node} toolbar element
- window {Node} iframe 's contentWindow
- Fields borrowed from class Component.Controller: active, activeable, children, disabled, focusable, focused, handleMouseEvents, highlighted, parent, prefixCls, view
- Fields borrowed from class Component.UIBase: created, listeners, plugins, rendered, xclass
- Fields borrowed from class Component.UIBase.Box: content, el, elAttrs, elBefore, elCls, elStyle, height, srcNode, visible, visibleMode, width
Methods
- addButton (id, cfg, ButtonType) 将 button ui 和点击功能分离
- addCommand (name, obj) Add a command object to current editor.
- addCustomLink (link) Add css link to current editor
- addCustomStyle (cssText, id) Add style text to current editor
- addSelect (id, cfg, SelectType) 将button ui 和点击功能分离 按钮必须立刻显示出来,功能可以慢慢加载
- Editor. baseZIndex (z) <static> 获得全局最大值
- blur () Make current editor lose focus
- checkSelectionChange () Check whether selection has changed since last check point.
- docReady (func) Add callback which will called when editor document is ready (fire when editor is renderer from textarea/source)
- execCommand (name) Whether current editor has specified command.
- focus () Make current editor has focus
- getControl (id) Retrieve control by id.
- getControls () Retrieve all controls.
- getDocHtml () Get full html content of editor 's iframe.
- getSelection () Get selection instance of current editor.
- hasCommand (name) Whether current editor has specified command instance.
- insertElement (element) Insert a element into current editor.
- insertHtml (data, dataFilter) Insert html string into current editor.
- notifySelectionChange () Fire selectionChange manually.
- removeCustomLink (link) Remove css link from current editor.
- removeCustomStyle (id) Remove style text with specified id from current editor
- showDialog (name, args) Show dialog
- sync () Synchronize textarea value with editor data.
- Methods borrowed from class Component.Controller: addChild, bindUI, createDom, getChildAt, getCssClassWithPrefix, handleBlur, handleDblClick, handleFocus, handleKeydown, handleKeyEventInternal, handleMouseDown, handleMouseEnter, handleMouseLeave, handleMouseUp, initializer, performActionInternal, removeChild, removeChildren, renderUI
- Methods borrowed from class Component.UIBase: create, destroy, render, syncUI
- Methods borrowed from class Base: set
- Methods borrowed from class Attribute: addAttr, addAttrs, get, getAttrs, getAttrVals, hasAttr, removeAttr, reset
- Methods borrowed from class Component.UIBase.Box: hide, show
Attributes Detail
-
customLink {String[]} Custom css link url for editor.
-
customStyle {String} Custom style for editor.
-
data {String} Current editor's content
-
document {Node} iframe 's document
-
formatData {String} Current editor's format content
-
iframe {Node} iframe
-
mode editor mode. wysiswyg mode:1 source mode:0
- Default Value
- wysiswyg mode
-
-
-
-
statusBarEl {Node} status bar element
-
textarea {Node} textarea
-
toolBarEl {Node} toolbar element
-
window {Node} iframe 's contentWindow
Methods Detail
-
addButton (id, cfg, ButtonType) view source将 button ui 和点击功能分离
Defined in:index.js.- Parameters
-
- id
- cfg
- ButtonType
-
addCommand (name, obj) view sourceAdd a command object to current editor.
Defined in:editor.js.- Parameters
-
- name {string} Command name.
- obj {Object} Command object.
-
addCustomLink (link) view sourceAdd css link to current editor
Defined in:editor.js.- Parameters
-
- link {String}
-
addCustomStyle (cssText, id) view sourceAdd style text to current editor
Defined in:editor.js.- Parameters
-
- cssText {string}
- id
-
addSelect (id, cfg, SelectType) view source将button ui 和点击功能分离 按钮必须立刻显示出来,功能可以慢慢加载
Defined in:index.js.- Parameters
-
- id
- cfg
- SelectType
-
获得全局最大值
Defined in:zIndexManager.js.- Parameters
-
- z
-
blur () view sourceMake current editor lose focus
Defined in:editor.js. -
checkSelectionChange () view sourceCheck whether selection has changed since last check point.
Defined in:editor.js. -
docReady (func) view sourceAdd callback which will called when editor document is ready (fire when editor is renderer from textarea/source)
Defined in:editor.js.- Parameters
-
- func {Function}
-
execCommand (name) view sourceWhether current editor has specified command. Refer: https://developer.mozilla.org/en/Rich-Text_Editing_in_Mozilla
Defined in:editor.js.- Parameters
-
- name {string} Command name.
-
focus () view sourceMake current editor has focus
Defined in:editor.js. -
getControl (id) view sourceRetrieve control by id.
Defined in:editor.js.- Parameters
-
- id
-
getControls () view sourceRetrieve all controls.
Defined in:editor.js.- Returns
-
- {*}
-
getDocHtml () view sourceGet full html content of editor 's iframe.
Defined in:editor.js. -
getSelection () view sourceGet selection instance of current editor.
Defined in:editor.js. -
hasCommand (name) view sourceWhether current editor has specified command instance.
Defined in:editor.js.- Parameters
-
- name {string}
-
insertElement (element) view sourceInsert a element into current editor.
Defined in:editor.js.- Parameters
-
- element {NodeList}
-
insertHtml (data, dataFilter) view sourceInsert html string into current editor.
Defined in:editor.js.- Parameters
-
- data {string}
- dataFilter
-
notifySelectionChange () view sourceFire selectionChange manually.
Defined in:editor.js. -
removeCustomLink (link) view sourceRemove css link from current editor.
Defined in:editor.js.- Parameters
-
- link {String}
-
removeCustomStyle (id) view sourceRemove style text with specified id from current editor
Defined in:editor.js.- Parameters
-
- id
-
showDialog (name, args) view sourceShow dialog
Defined in:editor.js.- Parameters
-
- name {String} Dialog name
- args Arguments passed to show
-
sync () view sourceSynchronize textarea value with editor data.
Defined in:editor.js.
Classes
- Anim
- Anim.Easing
- Attribute
- Base
- Button
- ComboBox
- ComboBox.LocalDataSource
- ComboBox.RemoteDataSource
- Component
- Component.Container
- Component.Controller
- Component.Manager
- Component.Render
- Component.UIBase
- Component.UIBase.Align
- Component.UIBase.Box
- Component.UIBase.Close
- Component.UIBase.Constrain
- Component.UIBase.ContentBox
- Component.UIBase.Drag
- Component.UIBase.Loading
- Component.UIBase.Mask
- Component.UIBase.Position
- Component.UIBase.Resize
- Component.UIBase.StdMod
- Cookie
- DataLazyload
- DD
- DD.Constrain
- DD.DDM
- DD.Draggable
- DD.DraggableDelegate
- DD.Droppable
- DD.DroppableDelegate
- DD.Proxy
- DD.Scroll
- DOM
- Editor
- Editor.Range
- Editor.Utils
- Editor.Walker
- Event
- Event.Object
- Event.Target
- IO
- IO.XhrObject
- KISSY
- KISSY.Defer
- KISSY.Loader
- KISSY.Loader.Module
- KISSY.Loader.Package
- KISSY.Promise
- Menu
- Menu.FilterMenu
- Menu.Item
- Menu.PopupMenu
- Menu.Separator
- MenuButton
- MenuButton.Option
- MenuButton.Select
- MVC
- MVC.Collection
- MVC.Model
- MVC.Router
- MVC.View
- NodeList
- Overlay
- Overlay.Dialog
- Overlay.Popup
- Resizable
- Tree
- Tree.CheckNode
- Tree.CheckTree
- Tree.Node
- Waterfall
- Waterfall.Loader