Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix minor typos in README #549

Merged
merged 1 commit into from
Apr 12, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ Position API includes:
* `position.section` - The section of this position
* `position.offset` - The character offset of this position in the section.
* `position.marker` - Based on the section and offset, the marker this position
if on. A position may not always have a marker (for example a cursor before
is on. A position may not always have a marker (for example a cursor before
or after a card).
* `position.toRange(endPosition)` - Create a range based on two positions. Accepts
the direction of the range as a second optional argument.
Expand All @@ -157,12 +157,12 @@ Position API includes:

### Range API

`Range` represent a range of a document. A range has a starting position
`Range` represents a range of a document. A range has a starting position
(`head`), ending position (`tail`), and a direction (for example highlighting
text left-to-right is a forward direction, highlighting right-to-left is a
backward direction).

Ranges are retured by serveral APIs, but most often you will be interested in
Ranges are returned by several APIs, but most often you will be interested in
the current range selected by the user (be it their cursor or an actual
selection). This can be accessed at `editor#range`. Several post editor APIs
expect a range as an argument, for example `setRange` or `deleteRange`.
Expand All @@ -175,7 +175,7 @@ unique range instance:
* `range.isCollapsed` - A range is collapsed when its head and tail are the same
position.
* `range.focusedPosition` - If a range has a forward direction, then tail. If
it has a backward direction, the head.
it has a backward direction, then head.
* `range.extend(characterCount)` - Grow a range one character in whatever its
direction is.
* `range.move(direction)` - If the range is collapsed, move the range forward
Expand Down