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: 2022-04-11 06:40:29

results matching ""

    No results matching ""