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.

Copyright © wangEditor (2020 - present) all right reserved,powered by GitbookFile Modify: 2021-07-04 12:51:04

results matching ""

    No results matching ""