Skip to content
Merged
Show file tree
Hide file tree
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
14 changes: 14 additions & 0 deletions docs/API-Reference/document/Document.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ const Document = brackets.getModule("document/Document")
* [.replaceRange(text, start, end, origin)](#Document+replaceRange)
* [.getRange(start, end)](#Document+getRange) ⇒ <code>string</code>
* [.getLine(Zero-based)](#Document+getLine) ⇒ <code>string</code>
* [.posFromIndex(index)](#Document+posFromIndex) ⇒ <code>Object</code>
* [.batchOperation(doOperation)](#Document+batchOperation)
* [.notifySaved()](#Document+notifySaved)
* [.adjustPosForChange(pos, textLines, start, end)](#Document+adjustPosForChange) ⇒ <code>Object</code>
Expand Down Expand Up @@ -240,6 +241,19 @@ Returns the text of the given line (excluding any line ending characters)
| --- | --- | --- |
| Zero-based | <code>number</code> | line number |

<a name="Document+posFromIndex"></a>

### document.posFromIndex(index) ⇒ <code>Object</code>
Given a character index within the document text (assuming \n newlines),
returns the corresponding {line, ch} position. Works whether or not
a master editor is attached.

**Kind**: instance method of [<code>Document</code>](#Document)

| Param | Type | Description |
| --- | --- | --- |
| index | <code>number</code> | Zero-based character offset |

<a name="Document+batchOperation"></a>

### document.batchOperation(doOperation)
Expand Down
Loading
Loading