|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object | +--TinyMCE_Selection
Defined in TinyMCE_Selection.class.js
Field Summary | |
Object |
instance
|
Constructor Summary | |
TinyMCE_Selection
(<TinyMCE_Control> inst)
Constructs a Selection instance and binds it to the specificed TinyMCE editor control. |
Method Summary | |
TinyMCE_Bookmark
|
getBookmark(<boolean> simple)
Returns a selection bookmark that can be restored later with moveToBookmark. |
HTMLElement
|
getFocusElement()
Returns the currently selected/focused element. |
DOMRange
|
getRng()
Returns the browsers selections first range instance. |
DOMSelection
|
getSel()
Returns the browsers selection instance. |
string
|
getSelectedHTML()
Returns the selected HTML code. |
string
|
getSelectedText()
Returns the selected text. |
boolean
|
moveToBookmark(<TinyMCE_Bookmark> bookmark)
Restores the selection to the specified bookmark. |
void
|
scrollToNode(<HTMLNode> node)
Scrolls to the specified node location. |
void
|
selectNode(<HTMLNode> node, <boolean> collapse, <boolean> select_text_node, <boolean> to_start)
Selects the specified node. |
Field Detail |
Object instance
Constructor Detail |
TinyMCE_Selection(<TinyMCE_Control> inst)
inst
- TinyMCE editor control instance.
Method Detail |
TinyMCE_Bookmark getBookmark(<boolean> simple)
simple
- If this is set to true, the selection bookmark will not me dom persistent.
HTMLElement getFocusElement()
DOMRange getRng()
DOMSelection getSel()
string getSelectedHTML()
string getSelectedText()
boolean moveToBookmark(<TinyMCE_Bookmark> bookmark)
bookmark
- Bookmark to restore selection from.
void scrollToNode(<HTMLNode> node)
node
- Node to scroll to.
void selectNode(<HTMLNode> node, <boolean> collapse, <boolean> select_text_node, <boolean> to_start)
node
- Node object to move selection to.
collapse
- True/false if it will be collasped.
select_text_node
- True/false if the text contents should be selected or not.
to_start
- True/false if the collapse should be to start or end of range.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |