Skip to content

Commit

Permalink
Merge pull request #227 from n1ru4l/patch-2
Browse files Browse the repository at this point in the history
feat: add method for manually retrieving the TextState
  • Loading branch information
andrerpena authored Apr 19, 2020
2 parents 54bfec0 + 50ac580 commit cdd9952
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/commandOrchestrator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ export class TextAreaTextApi implements TextApi {
this.textArea.selectionEnd = selection.end;
return getStateFromTextArea(this.textArea);
}

getState(): TextState {
return getStateFromTextArea(this.textArea);
}
}

export function getStateFromTextArea(textArea: HTMLTextAreaElement): TextState {
Expand Down

0 comments on commit cdd9952

Please sign in to comment.