Skip to content
This repository has been archived by the owner on Jan 24, 2021. It is now read-only.

sindresorhus/atom-set-text

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

atom-set-text Build Status

A better Atom TextEditor#setText() that preserves cursor/scroll position and selections

Install

$ npm install --save atom-set-text

Usage

/** @babel */
import setText from 'atom-set-text';

setText('new text');

API

setText(text, [editor])

text

Type: string

Text you want to set in the editor.

editor

Default: atom.workspace.getActiveTextEditor()

Editor to set the text in.

License

MIT © Sindre Sorhus

About

[DEPRECATED] A better Atom `TextEditor#setText()` that preserves cursor/scroll position and selections

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published