Back to Jsoneditor

15 Selection Api

examples/15_selection_api.html

10.4.3386 B
Original Source

Selection indication was done using the on[Text]SelectionChange listeners.
you can try the following calls in the console of your browser:
// text and code modes: editor.getTextSelection() editor.setTextSelection(startPos, endPos) // tree mode: editor.getSelection() editor.setSelection(startNode, endNode)

Selection:

Text:

Selection: