From 68dd475c8645088f3830bc20664456a029b07432 Mon Sep 17 00:00:00 2001 From: Josh Abernathy Date: Fri, 18 Aug 2017 09:00:23 -0400 Subject: [PATCH] Add `getSelections` to CodeMirror See https://codemirror.net/doc/manual.html#api_selection --- types/codemirror/index.d.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/types/codemirror/index.d.ts b/types/codemirror/index.d.ts index f6c40a99c2..fb755fae4b 100644 --- a/types/codemirror/index.d.ts +++ b/types/codemirror/index.d.ts @@ -498,6 +498,9 @@ declare namespace CodeMirror { /** Get the currently selected code. */ getSelection(): string; + + /** Returns an array containing a string for each selection, representing the content of the selections. */ + getSelections(lineSep?: string): Array; /** Replace the selection with the given string. By default, the new selection will span the inserted text. The optional collapse argument can be used to change this � passing "start" or "end" will collapse the selection to the start or end of the inserted text. */