Selection API
editor.selection.getSelectionText
Getting the text of selected.
editor.selection.getSelectionContainerElem().elems[0]
Getting the dom of selection.
editor.selection.getSelectionStartElem().elems[0]
Getting the starting dom of selection.
editor.selection.getSelectionEndElem().elems[0]
Getting the ending dom of selection.
editor.selection.collapseRange
Collapsing the selection of editor.
editor.selection.isSelectionEmpty
Getting result if the selection is empty.