<h1class="memberHeader"><spanclass="name">EditSession<spanclass="editInC9"><ahref='http://c9.io/open/git/?url=git%3A%2F%2Fgithub.com%2Fajaxorg%2Face.git'title='Edit in Cloud9 IDE'>[edit]</a></span></span>
<divclass="memberContent"><p>Stores various states related to a <ahref="document.html#Document"class="link-short"title="Document (class)"data-id="Document"><code>Document</code></a>. A single <code>EditSession</code> can be in charge of several <code>Document</code>s.</p>
<divid="ellipsis_new EditSession"class="ellipsis_description"><p>Sets up a new <code>EditSession</code> and associates it with the given <code>Document</code> and <code>TextMode</code>. ...</p>
</div>
<divid="short_new EditSession"class="short_description hiddenSpan"><p>Sets up a new <code>EditSession</code> and associates it with the given <code>Document</code> and <code>TextMode</code>.</p>
<h4>Arguments</h4><tableclass="argumentTable argument-list table table-striped table-bordered"><trclass="argumentRow "><tdclass="argName ">text</td><tdclass="argType""><ahref="document.html#Document"class=""title="Document (class)"data-id="Document">Document</a> | <ahref="http://www.nodemanual.org/latest/js_doc/String.html"class=""title="String"data-id="String">String</a></td><tdclass="argDescription ">Required. If <code>text</code> is a <code>Document</code>, it associates the <code>EditSession</code> with it. Otherwise, a new <code>Document</code> is created, with the initial text</td></tr><trclass="argumentRow "><tdclass="argName ">mode</td><tdclass="argType""><ahref="https://github.com/ajaxorg/ace/blob/master/lib/ace/mode/text.js"class=""title="TextMode"data-id="TextMode">TextMode</a></td><tdclass="argDescription ">Required. The inital language mode to use for the document</td></tr></table>
<divid="ellipsis_EditSession@onReloadTokenizer"class="ellipsis_description"><p>Reloads all the tokens on the current session. This function calls [[BackgroundTokenizer.start `BackgroundTokenizer....</p>
</div>
<divid="short_EditSession@onReloadTokenizer"class="short_description hiddenSpan"><p>Reloads all the tokens on the current session. This function calls <ahref="background_tokenizer.html#BackgroundTokenizer.start"class="link-short"title="BackgroundTokenizer.start (class method)"data-id="BackgroundTokenizer.start"><code>BackgroundTokenizer.start ()</code></a> to all the rows; it also emits the <code>'tokenizerUpdate'</code> event.</p>
<divid="ellipsis_EditSession.addMarker"class="ellipsis_description"><p>Adds a new marker to the given <code>Range</code>. If <code>inFront</code> is <code>true</code>, a front marker is defined, and the `'changeFrontMark...</p>
</div>
<divid="short_EditSession.addMarker"class="short_description hiddenSpan"><p>Adds a new marker to the given <code>Range</code>. If <code>inFront</code> is <code>true</code>, a front marker is defined, and the <code>'changeFrontMarker'</code> event fires; otherwise, the <code>'changeBackMarker'</code> event fires.</p>
<h4>Arguments</h4><tableclass="argumentTable argument-list table table-striped table-bordered"><trclass="argumentRow "><tdclass="argName ">range</td><tdclass="argType""><ahref="range.html#Range"class=""title="Range (class)"data-id="Range">Range</a></td><tdclass="argDescription ">Required. Define the range of the marker</td></tr><trclass="argumentRow "><tdclass="argName ">clazz</td><tdclass="argType""><ahref="http://www.nodemanual.org/latest/js_doc/String.html"class=""title="String"data-id="String">String</a></td><tdclass="argDescription ">Required. Set the CSS class for the marker</td></tr><trclass="argumentRow "><tdclass="argName ">type</td><tdclass="argType""><ahref="http://www.nodemanual.org/latest/js_doc/Function.html"class=""title="Function"data-id="Function">Function</a> | <ahref="http://www.nodemanual.org/latest/js_doc/String.html"class=""title="String"data-id="String">String</a></td><tdclass="argDescription ">Required. Identify the type of the marker</td></tr><trclass="argumentRow "><tdclass="argName ">inFront</td><tdclass="argType""><ahref="http://www.nodemanual.org/latest/js_doc/Boolean.html"class=""title="Boolean"data-id="Boolean">Boolean</a></td><tdclass="argDescription ">Required. Set to <code>true</code> to establish a front marker</td></tr></table>
<divid="ellipsis_EditSession.clearAnnotations"class="ellipsis_description"><p>Clears all the annotations for this session. This function also triggers the <code>'changeAnnotation'</code> event. ...</p>
</div>
<divid="short_EditSession.clearAnnotations"class="short_description hiddenSpan"><p>Clears all the annotations for this session. This function also triggers the <code>'changeAnnotation'</code> event.</p>
<divid="ellipsis_EditSession.clearBreakpoint"class="ellipsis_description"><p>Removes a breakpoint on the row number given by <code>rows</code>. This function also emites the <code>'changeBreakpoint'</code> event. ...</p>
</div>
<divid="short_EditSession.clearBreakpoint"class="short_description hiddenSpan"><p>Removes a breakpoint on the row number given by <code>rows</code>. This function also emites the <code>'changeBreakpoint'</code> event.</p>
<divid="ellipsis_EditSession.clearBreakpoints"class="ellipsis_description"><p>Removes all breakpoints on the rows. This function also emites the <code>'changeBreakpoint'</code> event. ...</p>
</div>
<divid="short_EditSession.clearBreakpoints"class="short_description hiddenSpan"><p>Removes all breakpoints on the rows. This function also emites the <code>'changeBreakpoint'</code> event.</p>
<li><spanclass="label related-to">Related to <ahref="#EditSession.screenToDocumentPosition"class=""title="EditSession.screenToDocumentPosition (class method)"data-id="EditSession.screenToDocumentPosition">EditSession.screenToDocumentPosition</a></span></li>
</ul>
</li>
</ul>
</div>
<divclass="sideToggler">
<divid="ellipsis_EditSession.documentToScreenPosition"class="ellipsis_description"><p>Converts document coordinates to screen coordinates. This takes into account code folding, word wrap, tab size, and any other visual modifications. ...</p>
</div>
<divid="short_EditSession.documentToScreenPosition"class="short_description hiddenSpan"><p>Converts document coordinates to screen coordinates. This takes into account code folding, word wrap, tab size, and any other visual modifications.</p>
<h4>Arguments</h4><tableclass="argumentTable argument-list table table-striped table-bordered"><trclass="argumentRow "><tdclass="argName ">docRow</td><tdclass="argType""><ahref="http://www.nodemanual.org/latest/js_doc/Number.html"class=""title="Number"data-id="Number">Number</a></td><tdclass="argDescription ">Required. The document row to check</td></tr><trclass="argumentRow "><tdclass="argName ">docColumn</td><tdclass="argType""><ahref="http://www.nodemanual.org/latest/js_doc/Number.html"class=""title="Number"data-id="Number">Number</a></td><tdclass="argDescription ">Required. The document column to check</td></tr></table>
<h4>Returns</h4><tableclass="returnTable return-list table table-striped table-bordered"><trclass=" "><tdclass="returnType "><ahref="http://www.nodemanual.org/latest/js_doc/Object.html"class=""title="Object"data-id="Object">Object</a></td><tdclass="returnDescription ">The object returned by this method has two properties: <code>row</code> and <code>column</code>.</td></tr></table>
<divid="ellipsis_EditSession.duplicateLines"class="ellipsis_description"><p>Duplicates all the text between <code>firstRow</code> and <code>lastRow</code>. ...</p>
</div>
<divid="short_EditSession.duplicateLines"class="short_description hiddenSpan"><p>Duplicates all the text between <code>firstRow</code> and <code>lastRow</code>.</p>
<h4>Arguments</h4><tableclass="argumentTable argument-list table table-striped table-bordered"><trclass="argumentRow "><tdclass="argName ">firstRow</td><tdclass="argType""><ahref="http://www.nodemanual.org/latest/js_doc/Number.html"class=""title="Number"data-id="Number">Number</a></td><tdclass="argDescription ">Required. The starting row to duplicate</td></tr><trclass="argumentRow "><tdclass="argName ">lastRow</td><tdclass="argType""><ahref="http://www.nodemanual.org/latest/js_doc/Number.html"class=""title="Number"data-id="Number">Number</a></td><tdclass="argDescription ">Required. The final row to duplicate</td></tr></table>
<h4>Returns</h4><tableclass="returnTable return-list table table-striped table-bordered"><trclass=" "><tdclass="returnType "><ahref="http://www.nodemanual.org/latest/js_doc/Number.html"class=""title="Number"data-id="Number">Number</a></td><tdclass="returnDescription ">Returns the number of new rows added; in other words, <code>lastRow - firstRow + 1</code>.</td></tr></table>
<h4>Arguments</h4><tableclass="argumentTable argument-list table table-striped table-bordered"><trclass="argumentRow "><tdclass="argName ">row</td><tdclass="argType""><ahref="http://www.nodemanual.org/latest/js_doc/Number.html"class=""title="Number"data-id="Number">Number</a></td><tdclass="argDescription ">Required. The row number to start from</td></tr><trclass="argumentRow "><tdclass="argName ">column</td><tdclass="argType""><ahref="http://www.nodemanual.org/latest/js_doc/Number.html"class=""title="Number"data-id="Number">Number</a></td><tdclass="argDescription ">Required. The column number to start from</td></tr></table>
<divid="ellipsis_EditSession.getBreakpoints"class="ellipsis_description"><p>Returns an array of numbers, indicating which rows have breakpoints. ...</p>
</div>
<divid="short_EditSession.getBreakpoints"class="short_description hiddenSpan"><p>Returns an array of numbers, indicating which rows have breakpoints.</p>
<li><spanclass="label related-to">Related to <ahref="document.html#Document.getLines"class=""title="Document.getLines (class method)"data-id="Document.getLines">Document.getLines</a></span></li>
</ul>
</li>
</ul>
</div>
<divclass="sideToggler">
<divid="ellipsis_EditSession.getLines"class="ellipsis_description"><p>Returns an array of strings of the rows between <code>firstRow</code> and <code>lastRow</code>. This function is inclusive of <code>lastRow</code>. ...</p>
</div>
<divid="short_EditSession.getLines"class="short_description hiddenSpan"><p>Returns an array of strings of the rows between <code>firstRow</code> and <code>lastRow</code>. This function is inclusive of <code>lastRow</code>.</p>
<h4>Arguments</h4><tableclass="argumentTable argument-list table table-striped table-bordered"><trclass="argumentRow "><tdclass="argName ">firstRow</td><tdclass="argType""><ahref="http://www.nodemanual.org/latest/js_doc/Number.html"class=""title="Number"data-id="Number">Number</a></td><tdclass="argDescription ">Required. The first row index to retrieve</td></tr><trclass="argumentRow "><tdclass="argName ">lastRow</td><tdclass="argType""><ahref="http://www.nodemanual.org/latest/js_doc/Number.html"class=""title="Number"data-id="Number">Number</a></td><tdclass="argDescription ">Required. The final row index to retrieve</td></tr></table>
<divid="ellipsis_EditSession.getMarkers"class="ellipsis_description"><p>Returns an array containing the IDs of all the markers, either front or back. ...</p>
</div>
<divid="short_EditSession.getMarkers"class="short_description hiddenSpan"><p>Returns an array containing the IDs of all the markers, either front or back.</p>
<h4>Arguments</h4><tableclass="argumentTable argument-list table table-striped table-bordered"><trclass="argumentRow "><tdclass="argName ">inFront</td><tdclass="argType""><ahref="http://www.nodemanual.org/latest/js_doc/Boolean.html"class=""title="Boolean"data-id="Boolean">Boolean</a></td><tdclass="argDescription ">Required. If <code>true</code>, indicates you only want front markers; <code>false</code> indicates only back markers</td></tr></table>
<divid="ellipsis_EditSession.getOverwrite"class="ellipsis_description"><p>Returns <code>true</code> if overwrites are enabled; <code>false</code> otherwise. ...</p>
</div>
<divid="short_EditSession.getOverwrite"class="short_description hiddenSpan"><p>Returns <code>true</code> if overwrites are enabled; <code>false</code> otherwise.</p>
<divid="ellipsis_EditSession.getRowHeight"class="ellipsis_description"><p>Returns the height of the indicated row. This is mostly relevant for situations where wrapping occurs, and a single ...</p>
</div>
<divid="short_EditSession.getRowHeight"class="short_description hiddenSpan"><p>Returns the height of the indicated row. This is mostly relevant for situations where wrapping occurs, and a single line spans across multiple rows.</p>
<h4>Arguments</h4><tableclass="argumentTable argument-list table table-striped table-bordered"><trclass="argumentRow "><tdclass="argName ">config</td><tdclass="argType""><ahref="http://www.nodemanual.org/latest/js_doc/Object.html"class=""title="Object"data-id="Object">Object</a></td><tdclass="argDescription ">Required. An object containing a parameter indicating the <code>lineHeight</code>.</td></tr><trclass="argumentRow "><tdclass="argName ">row</td><tdclass="argType""><ahref="http://www.nodemanual.org/latest/js_doc/Number.html"class=""title="Number"data-id="Number">Number</a></td><tdclass="argDescription ">Required. The row number to check</td></tr></table>
<h4>Arguments</h4><tableclass="argumentTable argument-list table table-striped table-bordered"><trclass="argumentRow "><tdclass="argName ">row</td><tdclass="argType""><ahref="http://www.nodemanual.org/latest/js_doc/Number.html"class=""title="Number"data-id="Number">Number</a></td><tdclass="argDescription ">Required. The row number to check</td></tr></table>
<divid="ellipsis_EditSession.getScreenTabSize"class="ellipsis_description"><p>The distance to the next tab stop at the specified screen column. ...</p>
</div>
<divid="short_EditSession.getScreenTabSize"class="short_description hiddenSpan"><p>The distance to the next tab stop at the specified screen column.</p>
<divid="ellipsis_EditSession.getScrollLeft"class="ellipsis_description"><p>[Returns the value of the distance between the left of the editor and the leftmost part of the visible content.]{: #...</p>
</div>
<divid="short_EditSession.getScrollLeft"class="short_description hiddenSpan"><p>Returns the value of the distance between the left of the editor and the leftmost part of the visible content.</p>
<divid="ellipsis_EditSession.getScrollTop"class="ellipsis_description"><p>[Returns the value of the distance between the top of the editor and the topmost part of the visible content.]{: #Ed...</p>
</div>
<divid="short_EditSession.getScrollTop"class="short_description hiddenSpan"><p>Returns the value of the distance between the top of the editor and the topmost part of the visible content.</p>
<divid="ellipsis_EditSession.getTabString"class="ellipsis_description"><p>Returns the current value for tabs. If the user is using soft tabs, this will be a series of spaces (defined by [[Ed...</p>
</div>
<divid="short_EditSession.getTabString"class="short_description hiddenSpan"><p>Returns the current value for tabs. If the user is using soft tabs, this will be a series of spaces (defined by <ahref="#EditSession.getTabSize"class="link-short"title="EditSession.getTabSize (class method)"data-id="EditSession.getTabSize">getTabSize</a>); otherwise it's simply <code>'\t'</code>.</p>
<li><spanclass="label related-to">Related to <ahref="document.html#Document.getTextRange"class=""title="Document.getTextRange (class method)"data-id="Document.getTextRange">Document.getTextRange</a></span></li>
</ul>
</li>
</ul>
</div>
<divclass="sideToggler">
<divid="ellipsis_EditSession.getTextRange"class="ellipsis_description"><p>Given a range within the document, this function returns all the text within that range as a single string. ...</p>
</div>
<divid="short_EditSession.getTextRange"class="short_description hiddenSpan"><p>Given a range within the document, this function returns all the text within that range as a single string.</p>
<h4>Arguments</h4><tableclass="argumentTable argument-list table table-striped table-bordered"><trclass="argumentRow "><tdclass="argName ">range</td><tdclass="argType""><ahref="http://www.nodemanual.org/latest/js_doc/String.html"class=""title="String"data-id="String">String</a></td><tdclass="argDescription ">Required. The range to work with</td></tr></table>
<h4>Arguments</h4><tableclass="argumentTable argument-list table table-striped table-bordered"><trclass="argumentRow "><tdclass="argName ">row</td><tdclass="argType""><ahref="http://www.nodemanual.org/latest/js_doc/Number.html"class=""title="Number"data-id="Number">Number</a></td><tdclass="argDescription ">Required. The row number to retrieve from</td></tr><trclass="argumentRow "><tdclass="argName ">column</td><tdclass="argType""><ahref="http://www.nodemanual.org/latest/js_doc/Number.html"class=""title="Number"data-id="Number">Number</a></td><tdclass="argDescription ">Required. The column number to retrieve from</td></tr></table>
<li><spanclass="label related-to">Related to <ahref="background_tokenizer.html#BackgroundTokenizer.getTokens"class=""title="BackgroundTokenizer.getTokens (class method)"data-id="BackgroundTokenizer.getTokens">BackgroundTokenizer.getTokens</a></span></li>
</ul>
</li>
</ul>
</div>
<divclass="sideToggler">
<divid="ellipsis_EditSession.getTokens"class="ellipsis_description"><p>Starts tokenizing at the row indicated. Returns a list of objects of the tokenized rows. ...</p>
</div>
<divid="short_EditSession.getTokens"class="short_description hiddenSpan"><p>Starts tokenizing at the row indicated. Returns a list of objects of the tokenized rows.</p>
<divid="ellipsis_EditSession.getUseSoftTabs"class="ellipsis_description"><p>Returns <code>true</code> if soft tabs are being used, <code>false</code> otherwise. ...</p>
</div>
<divid="short_EditSession.getUseSoftTabs"class="short_description hiddenSpan"><p>Returns <code>true</code> if soft tabs are being used, <code>false</code> otherwise.</p>
<divid="ellipsis_EditSession.getUseWrapMode"class="ellipsis_description"><p>Returns <code>true</code> if wrap mode is being used; <code>false</code> otherwise. ...</p>
</div>
<divid="short_EditSession.getUseWrapMode"class="short_description hiddenSpan"><p>Returns <code>true</code> if wrap mode is being used; <code>false</code> otherwise.</p>
<li><spanclass="label alias single">Aliased as: <ahref="#EditSession.toString"class=""title="EditSession.toString (class method)"data-id="EditSession.toString">EditSession.toString</a></span></li>
</ul>
</li>
</ul>
</div>
<divclass="sideToggler">
<divid="ellipsis_EditSession.getValue"class="ellipsis_description"><p>Returns the current <ahref="document.html#Document"class="link-short"title="Document (class)"data-id="Document"><code>Document</code></a> as a string. ...</p>
</div>
<divid="short_EditSession.getValue"class="short_description hiddenSpan"><p>Returns the current <ahref="document.html#Document"class="link-short"title="Document (class)"data-id="Document"><code>Document</code></a> as a string.</p>
<divid="ellipsis_EditSession.getWordRange"class="ellipsis_description"><p>Given a starting row and column, this method returns the <code>Range</code> of the first word boundary it finds. ...</p>
</div>
<divid="short_EditSession.getWordRange"class="short_description hiddenSpan"><p>Given a starting row and column, this method returns the <code>Range</code> of the first word boundary it finds.</p>
<divid="ellipsis_EditSession.getWrapLimitRange"class="ellipsis_description"><p>Returns an object that defines the minimum and maximum of the wrap limit; it looks something like this:
...</p>
</div>
<divid="short_EditSession.getWrapLimitRange"class="short_description hiddenSpan"><p>Returns an object that defines the minimum and maximum of the wrap limit; it looks something like this:
<divid="ellipsis_EditSession.indentRows"class="ellipsis_description"><p>Indents all the rows, from <code>startRow</code> to <code>endRow</code> (inclusive), by prefixing each row with the token in <code>indentString</code>.
...</p>
</div>
<divid="short_EditSession.indentRows"class="short_description hiddenSpan"><p>Indents all the rows, from <code>startRow</code> to <code>endRow</code> (inclusive), by prefixing each row with the token in <code>indentString</code>.
<divclass="description"><p>If <code>indentString</code> contains the <code>'\t'</code> character, it's replaced by whatever is defined by <ahref="#EditSession.getTabString"class="link-short"title="EditSession.getTabString (class method)"data-id="EditSession.getTabString">getTabString</a>.</p>
<li><spanclass="label related-to">Related to <ahref="document.html#Document.insert"class=""title="Document.insert (class method)"data-id="Document.insert">Document.insert</a></span></li>
</ul>
</li>
</ul>
</div>
<divclass="sideToggler">
<divid="ellipsis_EditSession.insert"class="ellipsis_description"><p>Inserts a block of <code>text</code> and the indicated <code>position</code>. ...</p>
</div>
<divid="short_EditSession.insert"class="short_description hiddenSpan"><p>Inserts a block of <code>text</code> and the indicated <code>position</code>.</p>
<h4>Arguments</h4><tableclass="argumentTable argument-list table table-striped table-bordered"><trclass="argumentRow "><tdclass="argName ">position</td><tdclass="argType""><ahref="http://www.nodemanual.org/latest/js_doc/Number.html"class=""title="Number"data-id="Number">Number</a></td><tdclass="argDescription ">Required. The position to start inserting at</td></tr><trclass="argumentRow "><tdclass="argName ">text</td><tdclass="argType""><ahref="http://www.nodemanual.org/latest/js_doc/String.html"class=""title="String"data-id="String">String</a></td><tdclass="argDescription ">Required. A chunk of text to insert</td></tr></table>
<h4>Returns</h4><tableclass="returnTable return-list table table-striped table-bordered"><trclass=" "><tdclass="returnType "><ahref="http://www.nodemanual.org/latest/js_doc/Number.html"class=""title="Number"data-id="Number">Number</a></td><tdclass="returnDescription ">The position of the last line of <code>text</code>. If the length of <code>text</code> is 0, this function simply returns <code>position</code>.</td></tr></table>
<divid="ellipsis_EditSession.isTabStop"class="ellipsis_description"><p>Returns <code>true</code> if the character at the position is a soft tab. ...</p>
</div>
<divid="short_EditSession.isTabStop"class="short_description hiddenSpan"><p>Returns <code>true</code> if the character at the position is a soft tab.</p>
<h4>Arguments</h4><tableclass="argumentTable argument-list table table-striped table-bordered"><trclass="argumentRow "><tdclass="argName ">position</td><tdclass="argType""><ahref="http://www.nodemanual.org/latest/js_doc/Object.html"class=""title="Object"data-id="Object">Object</a></td><tdclass="argDescription ">Required. The position to check</td></tr></table>
<h4>Arguments</h4><tableclass="argumentTable argument-list table table-striped table-bordered"><trclass="argumentRow "><tdclass="argName ">firstRow</td><tdclass="argType""><ahref="http://www.nodemanual.org/latest/js_doc/Number.html"class=""title="Number"data-id="Number">Number</a></td><tdclass="argDescription ">Required. The starting row to move down</td></tr><trclass="argumentRow "><tdclass="argName ">lastRow</td><tdclass="argType""><ahref="http://www.nodemanual.org/latest/js_doc/Number.html"class=""title="Number"data-id="Number">Number</a></td><tdclass="argDescription ">Required. The final row to move down</td></tr></table>
<h4>Returns</h4><tableclass="returnTable return-list table table-striped table-bordered"><trclass=" "><tdclass="returnType "><ahref="http://www.nodemanual.org/latest/js_doc/Number.html"class=""title="Number"data-id="Number">Number</a></td><tdclass="returnDescription ">If <code>firstRow</code> is less-than or equal to 0, this function returns 0. Otherwise, on success, it returns -1.</td></tr></table>
<li><spanclass="label related-to">Related to <ahref="document.html#Document.insertLines"class=""title="Document.insertLines (class method)"data-id="Document.insertLines">Document.insertLines</a></span></li>
</ul>
</li>
</ul>
</div>
<divclass="sideToggler">
<divid="ellipsis_EditSession.moveLinesUp"class="ellipsis_description"><p>Shifts all the lines in the document up one, starting from <code>firstRow</code> and ending at <code>lastRow</code>. ...</p>
</div>
<divid="short_EditSession.moveLinesUp"class="short_description hiddenSpan"><p>Shifts all the lines in the document up one, starting from <code>firstRow</code> and ending at <code>lastRow</code>.</p>
<h4>Arguments</h4><tableclass="argumentTable argument-list table table-striped table-bordered"><trclass="argumentRow "><tdclass="argName ">firstRow</td><tdclass="argType""><ahref="http://www.nodemanual.org/latest/js_doc/Number.html"class=""title="Number"data-id="Number">Number</a></td><tdclass="argDescription ">Required. The starting row to move up</td></tr><trclass="argumentRow "><tdclass="argName ">lastRow</td><tdclass="argType""><ahref="http://www.nodemanual.org/latest/js_doc/Number.html"class=""title="Number"data-id="Number">Number</a></td><tdclass="argDescription ">Required. The final row to move up</td></tr></table>
<h4>Returns</h4><tableclass="returnTable return-list table table-striped table-bordered"><trclass=" "><tdclass="returnType "><ahref="http://www.nodemanual.org/latest/js_doc/Number.html"class=""title="Number"data-id="Number">Number</a></td><tdclass="returnDescription ">If <code>firstRow</code> is less-than or equal to 0, this function returns 0. Otherwise, on success, it returns -1.</td></tr></table>
<h4>Arguments</h4><tableclass="argumentTable argument-list table table-striped table-bordered"><trclass="argumentRow "><tdclass="argName ">fromRange</td><tdclass="argType""><ahref="range.html#Range"class=""title="Range (class)"data-id="Range">Range</a></td><tdclass="argDescription ">Required. The range of text you want moved within the document</td></tr><trclass="argumentRow "><tdclass="argName ">toPosition</td><tdclass="argType""><ahref="http://www.nodemanual.org/latest/js_doc/Object.html"class=""title="Object"data-id="Object">Object</a></td><tdclass="argDescription ">Required. The location (row and column) where you want to move the text to</td></tr></table>
<h4>Returns</h4><tableclass="returnTable return-list table table-striped table-bordered"><trclass=" "><tdclass="returnType "><ahref="range.html#Range"class=""title="Range (class)"data-id="Range">Range</a></td><tdclass="returnDescription ">The new range where the text was moved to. Moves a range of text from the given range to the given position. <code>toPosition</code> is an object that looks like this:</td></tr></table>
<divid="ellipsis_EditSession.outdentRows"class="ellipsis_description"><p>Outdents all the rows defined by the <code>start</code> and <code>end</code> properties of <code>range</code>. ...</p>
</div>
<divid="short_EditSession.outdentRows"class="short_description hiddenSpan"><p>Outdents all the rows defined by the <code>start</code> and <code>end</code> properties of <code>range</code>.</p>
<h4>Arguments</h4><tableclass="argumentTable argument-list table table-striped table-bordered"><trclass="argumentRow "><tdclass="argName ">range</td><tdclass="argType""><ahref="range.html#Range"class=""title="Range (class)"data-id="Range">Range</a></td><tdclass="argDescription ">Required. A range of rows</td></tr></table>
<h4>Arguments</h4><tableclass="argumentTable argument-list table table-striped table-bordered"><trclass="argumentRow "><tdclass="argName ">deltas</td><tdclass="argType""><ahref="http://www.nodemanual.org/latest/js_doc/Array.html"class=""title="Array"data-id="Array">Array</a></td><tdclass="argDescription ">Required. An array of previous changes</td></tr><trclass="argumentRow "><tdclass="argName ">dontSelect</td><tdclass="argType""><ahref="http://www.nodemanual.org/latest/js_doc/Boolean.html"class=""title="Boolean"data-id="Boolean">Boolean</a></td><tdclass="argDescription ">Required. If <code>true</code>, doesn't select the range of where the change occured</td></tr></table>
<h4>Arguments</h4><tableclass="argumentTable argument-list table table-striped table-bordered"><trclass="argumentRow "><tdclass="argName ">range</td><tdclass="argType""><ahref="range.html#Range"class=""title="Range (class)"data-id="Range">Range</a></td><tdclass="argDescription ">Required. A specified Range to remove</td></tr></table>
<h4>Returns</h4><tableclass="returnTable return-list table table-striped table-bordered"><trclass=" "><tdclass="returnType "><ahref="http://www.nodemanual.org/latest/js_doc/Object.html"class=""title="Object"data-id="Object">Object</a></td><tdclass="returnDescription ">The new <code>start</code> property of the range, which contains <code>startRow</code> and <code>startColumn</code>. If <code>range</code> is empty, this function returns the unmodified value of <code>range.start</code>.</td></tr></table>
<divid="ellipsis_EditSession.removeMarker"class="ellipsis_description"><p>Removes the marker with the specified ID. If this marker was in front, the <code>'changeFrontMarker'</code> event is emitted. I...</p>
</div>
<divid="short_EditSession.removeMarker"class="short_description hiddenSpan"><p>Removes the marker with the specified ID. If this marker was in front, the <code>'changeFrontMarker'</code> event is emitted. If the marker was in the back, the <code>'changeBackMarker'</code> event is emitted.</p>
<h4>Arguments</h4><tableclass="argumentTable argument-list table table-striped table-bordered"><trclass="argumentRow "><tdclass="argName ">markerId</td><tdclass="argType""><ahref="http://www.nodemanual.org/latest/js_doc/Number.html"class=""title="Number"data-id="Number">Number</a></td><tdclass="argDescription ">Required. A number representing a marker</td></tr></table>
<h4>Arguments</h4><tableclass="argumentTable argument-list table table-striped table-bordered"><trclass="argumentRow "><tdclass="argName ">range</td><tdclass="argType""><ahref="range.html#Range"class=""title="Range (class)"data-id="Range">Range</a></td><tdclass="argDescription ">Required. A specified Range to replace</td></tr><trclass="argumentRow "><tdclass="argName ">text</td><tdclass="argType""><ahref="http://www.nodemanual.org/latest/js_doc/String.html"class=""title="String"data-id="String">String</a></td><tdclass="argDescription ">Required. The new text to use as a replacement</td></tr></table>
<h4>Returns</h4><tableclass="returnTable return-list table table-striped table-bordered"><trclass=" "><tdclass="returnType "><ahref="http://www.nodemanual.org/latest/js_doc/Object.html"class=""title="Object"data-id="Object">Object</a></td><tdclass="returnDescription ">Returns an object containing the final row and column, like this:<br/><code>{row: endRow, column: 0}</code><br/> If the text and range are empty, this function returns an object containing the current <code>range.start</code> value.<br/> If the text is the exact same as what currently exists, this function returns an object containing the current <code>range.end</code> value.</td></tr></table>
<li><spanclass="label related-to">Related to <ahref="#EditSession.documentToScreenPosition"class=""title="EditSession.documentToScreenPosition (class method)"data-id="EditSession.documentToScreenPosition">EditSession.documentToScreenPosition</a></span></li>
</ul>
</li>
</ul>
</div>
<divclass="sideToggler">
<divid="ellipsis_EditSession.screenToDocumentPosition"class="ellipsis_description"><p>Converts characters coordinates on the screen to characters coordinates within the document. [This takes into accoun...</p>
</div>
<divid="short_EditSession.screenToDocumentPosition"class="short_description hiddenSpan"><p>This takes into account code folding, word wrap, tab size, and any other visual modifications.</p>
<h4>Arguments</h4><tableclass="argumentTable argument-list table table-striped table-bordered"><trclass="argumentRow "><tdclass="argName ">screenRow</td><tdclass="argType""><ahref="http://www.nodemanual.org/latest/js_doc/Number.html"class=""title="Number"data-id="Number">Number</a></td><tdclass="argDescription ">Required. The screen row to check</td></tr><trclass="argumentRow "><tdclass="argName ">screenColumn</td><tdclass="argType""><ahref="http://www.nodemanual.org/latest/js_doc/Number.html"class=""title="Number"data-id="Number">Number</a></td><tdclass="argDescription ">Required. The screen column to check</td></tr></table>
<h4>Returns</h4><tableclass="returnTable return-list table table-striped table-bordered"><trclass=" "><tdclass="returnType "><ahref="http://www.nodemanual.org/latest/js_doc/Object.html"class=""title="Object"data-id="Object">Object</a></td><tdclass="returnDescription ">The object returned has two properties: <code>row</code> and <code>column</code>.</td></tr></table>
<divid="ellipsis_EditSession.setAnnotations"class="ellipsis_description"><p>Sets annotations for the <code>EditSession</code>. This functions emits the <code>'changeAnnotation'</code> event. ...</p>
</div>
<divid="short_EditSession.setAnnotations"class="short_description hiddenSpan"><p>Sets annotations for the <code>EditSession</code>. This functions emits the <code>'changeAnnotation'</code> event.</p>
<h4>Arguments</h4><tableclass="argumentTable argument-list table table-striped table-bordered"><trclass="argumentRow "><tdclass="argName ">annotations</td><tdclass="argType""><ahref="http://www.nodemanual.org/latest/js_doc/Array.html"class=""title="Array"data-id="Array">Array</a></td><tdclass="argDescription ">Required. A list of annotations</td></tr></table>
<divid="ellipsis_EditSession.setBreakpoint"class="ellipsis_description"><p>Sets a breakpoint on the row number given by <code>rows</code>. This function also emites the <code>'changeBreakpoint'</code> event. ...</p>
</div>
<divid="short_EditSession.setBreakpoint"class="short_description hiddenSpan"><p>Sets a breakpoint on the row number given by <code>rows</code>. This function also emites the <code>'changeBreakpoint'</code> event.</p>
<divid="ellipsis_EditSession.setBreakpoints"class="ellipsis_description"><p>Sets a breakpoint on every row number given by <code>rows</code>. This function also emites the <code>'changeBreakpoint'</code> event. ...</p>
</div>
<divid="short_EditSession.setBreakpoints"class="short_description hiddenSpan"><p>Sets a breakpoint on every row number given by <code>rows</code>. This function also emites the <code>'changeBreakpoint'</code> event.</p>
<divid="ellipsis_EditSession.setDocument"class="ellipsis_description"><p>Sets the <code>EditSession</code> to point to a new <code>Document</code>. If a <code>BackgroundTokenizer</code> exists, it also points to <code>doc</code>. ...</p>
</div>
<divid="short_EditSession.setDocument"class="short_description hiddenSpan"><p>Sets the <code>EditSession</code> to point to a new <code>Document</code>. If a <code>BackgroundTokenizer</code> exists, it also points to <code>doc</code>.</p>
<h4>Arguments</h4><tableclass="argumentTable argument-list table table-striped table-bordered"><trclass="argumentRow "><tdclass="argName ">doc</td><tdclass="argType""><ahref="document.html#Document"class=""title="Document (class)"data-id="Document">Document</a></td><tdclass="argDescription ">Required. The new <code>Document</code> to use</td></tr></table>
<divid="ellipsis_EditSession.setMode"class="ellipsis_description"><p>Sets a new text mode for the <code>EditSession</code>. This method also emits the <code>'changeMode'</code> event. If a [[BackgroundTokeni...</p>
</div>
<divid="short_EditSession.setMode"class="short_description hiddenSpan"><p>Sets a new text mode for the <code>EditSession</code>. This method also emits the <code>'changeMode'</code> event. If a <ahref="background_tokenizer.html#BackgroundTokenizer"class="link-short"title="BackgroundTokenizer (class)"data-id="BackgroundTokenizer"><code>BackgroundTokenizer</code></a> is set, the <code>'tokenizerUpdate'</code> event is also emitted.</p>
<h4>Arguments</h4><tableclass="argumentTable argument-list table table-striped table-bordered"><trclass="argumentRow "><tdclass="argName ">mode</td><tdclass="argType""><ahref="https://github.com/ajaxorg/ace/blob/master/lib/ace/mode/text.js"class=""title="TextMode"data-id="TextMode">TextMode</a></td><tdclass="argDescription ">Required. Set a new text mode</td></tr></table>
<h4>Arguments</h4><tableclass="argumentTable argument-list table table-striped table-bordered"><trclass="argumentRow "><tdclass="argName ">newLineMode</td><tdclass="argType""><ahref="http://www.nodemanual.org/latest/js_doc/String.html"class=""title="String"data-id="String">String</a></td><tdclass="argDescription ">Required. The newline mode to use; can be either <code>windows</code>, <code>unix</code>, or <code>auto</code></td></tr></table>
<divid="ellipsis_EditSession.setOverwrite"class="ellipsis_description"><p>Pass in <code>true</code> to enable overwrites in your session, or <code>false</code> to disable. If overwrites is enabled, any text you e...</p>
</div>
<divid="short_EditSession.setOverwrite"class="short_description hiddenSpan"><p>Pass in <code>true</code> to enable overwrites in your session, or <code>false</code> to disable. If overwrites is enabled, any text you enter will type over any text after it. If the value of <code>overwrite</code> changes, this function also emites the <code>changeOverwrite</code> event.</p>
<h4>Arguments</h4><tableclass="argumentTable argument-list table table-striped table-bordered"><trclass="argumentRow "><tdclass="argName ">overwrite</td><tdclass="argType""><ahref="http://www.nodemanual.org/latest/js_doc/Boolean.html"class=""title="Boolean"data-id="Boolean">Boolean</a></td><tdclass="argDescription ">Required. Defines wheter or not to set overwrites</td></tr></table>
<divid="ellipsis_EditSession.setScrollLeft"class="ellipsis_description"><p>[Sets the value of the distance between the left of the editor and the leftmost part of the visible content.]{: #Edi...</p>
</div>
<divid="short_EditSession.setScrollLeft"class="short_description hiddenSpan"><p>Sets the value of the distance between the left of the editor and the leftmost part of the visible content.</p>
<divid="ellipsis_EditSession.setScrollTop"class="ellipsis_description"><p>This function sets the scroll top value. It also emits the <code>'changeScrollTop'</code> event. ...</p>
</div>
<divid="short_EditSession.setScrollTop"class="short_description hiddenSpan"><p>This function sets the scroll top value. It also emits the <code>'changeScrollTop'</code> event.</p>
<h4>Arguments</h4><tableclass="argumentTable argument-list table table-striped table-bordered"><trclass="argumentRow "><tdclass="argName ">scrollTop</td><tdclass="argType""><ahref="http://www.nodemanual.org/latest/js_doc/Number.html"class=""title="Number"data-id="Number">Number</a></td><tdclass="argDescription ">Required. The new scroll top value</td></tr></table>
<divid="ellipsis_EditSession.setTabSize"class="ellipsis_description"><p>Set the number of spaces that define a soft tab; for example, passing in <code>4</code> transforms the soft tabs to be equivale...</p>
</div>
<divid="short_EditSession.setTabSize"class="short_description hiddenSpan"><p>Set the number of spaces that define a soft tab; for example, passing in <code>4</code> transforms the soft tabs to be equivalent to four spaces. This function also emits the <code>changeTabSize</code> event.</p>
<divid="ellipsis_EditSession.setUndoSelect"class="ellipsis_description"><p>ENables or disables highlighting of the range where an undo occured. ...</p>
</div>
<divid="short_EditSession.setUndoSelect"class="short_description hiddenSpan"><p>ENables or disables highlighting of the range where an undo occured.</p>
<h4>Arguments</h4><tableclass="argumentTable argument-list table table-striped table-bordered"><trclass="argumentRow "><tdclass="argName ">enable</td><tdclass="argType""><ahref="http://www.nodemanual.org/latest/js_doc/Boolean.html"class=""title="Boolean"data-id="Boolean">Boolean</a></td><tdclass="argDescription ">Required. If <code>true</code>, selects the range of the reinserted change</td></tr></table>
<divid="ellipsis_EditSession.setUseSoftTabs"class="ellipsis_description"><p>Pass <code>true</code> to enable the use of soft tabs. Soft tabs means you're using spaces instead of the tab character (<code>'\t'</code>). ...</p>
</div>
<divid="short_EditSession.setUseSoftTabs"class="short_description hiddenSpan"><p>Pass <code>true</code> to enable the use of soft tabs. Soft tabs means you're using spaces instead of the tab character (<code>'\t'</code>).</p>
<h4>Arguments</h4><tableclass="argumentTable argument-list table table-striped table-bordered"><trclass="argumentRow "><tdclass="argName ">useSoftTabs</td><tdclass="argType""><ahref="http://www.nodemanual.org/latest/js_doc/Boolean.html"class=""title="Boolean"data-id="Boolean">Boolean</a></td><tdclass="argDescription ">Required. Value indicating whether or not to use soft tabs</td></tr></table>
<divid="ellipsis_EditSession.setUseWorker"class="ellipsis_description"><p>Identifies if you want to use a worker for the <code>EditSession</code>. ...</p>
</div>
<divid="short_EditSession.setUseWorker"class="short_description hiddenSpan"><p>Identifies if you want to use a worker for the <code>EditSession</code>.</p>
<h4>Arguments</h4><tableclass="argumentTable argument-list table table-striped table-bordered"><trclass="argumentRow "><tdclass="argName ">useWorker</td><tdclass="argType""><ahref="http://www.nodemanual.org/latest/js_doc/Boolean.html"class=""title="Boolean"data-id="Boolean">Boolean</a></td><tdclass="argDescription ">Required. Set to <code>true</code> to use a worker</td></tr></table>
<divid="ellipsis_EditSession.setUseWrapMode"class="ellipsis_description"><p>Sets whether or not line wrapping is enabled. If <code>useWrapMode</code> is different than the current value, the `'changeWrap...</p>
</div>
<divid="short_EditSession.setUseWrapMode"class="short_description hiddenSpan"><p>Sets whether or not line wrapping is enabled. If <code>useWrapMode</code> is different than the current value, the <code>'changeWrapMode'</code> event is emitted.</p>
<h4>Arguments</h4><tableclass="argumentTable argument-list table table-striped table-bordered"><trclass="argumentRow "><tdclass="argName ">text</td><tdclass="argType""><ahref="http://www.nodemanual.org/latest/js_doc/String.html"class=""title="String"data-id="String">String</a></td><tdclass="argDescription ">Required. The new text to place</td></tr></table>
<divid="ellipsis_EditSession.setWrapLimitRange"class="ellipsis_description"><p>Sets the boundaries of wrap. Either value can be <code>null</code> to have an unconstrained wrap, or, they can be the same numb...</p>
</div>
<divid="short_EditSession.setWrapLimitRange"class="short_description hiddenSpan"><p>Sets the boundaries of wrap. Either value can be <code>null</code> to have an unconstrained wrap, or, they can be the same number to pin the limit. If the wrap limits for <code>min</code> or <code>max</code> are different, this method also emits the <code>'changeWrapMode'</code> event.</p>
<h4>Arguments</h4><tableclass="argumentTable argument-list table table-striped table-bordered"><trclass="argumentRow "><tdclass="argName ">min</td><tdclass="argType""><ahref="http://www.nodemanual.org/latest/js_doc/Number.html"class=""title="Number"data-id="Number">Number</a></td><tdclass="argDescription ">Required. The minimum wrap value (the left side wrap)</td></tr><trclass="argumentRow "><tdclass="argName ">max</td><tdclass="argType""><ahref="http://www.nodemanual.org/latest/js_doc/Number.html"class=""title="Number"data-id="Number">Number</a></td><tdclass="argDescription ">Required. The maximum wrap value (the right side wrap)</td></tr></table>
<divid="ellipsis_EditSession.toggleOverwrite"class="ellipsis_description"><p>Sets the value of overwrite to the opposite of whatever it currently is. ...</p>
</div>
<divid="short_EditSession.toggleOverwrite"class="short_description hiddenSpan"><p>Sets the value of overwrite to the opposite of whatever it currently is.</p>
<li><spanclass="label alias single">Aliased as: <ahref="#EditSession.getValue"class=""title="EditSession.getValue (class method)"data-id="EditSession.getValue">EditSession.getValue</a></span></li>
</ul>
</li>
</ul>
</div>
<divclass="sideToggler">
<divid="ellipsis_EditSession.toString"class="ellipsis_description"><p>Returns the current <ahref="document.html#Document"class="link-short"title="Document (class)"data-id="Document"><code>Document</code></a> as a string. ...</p>
</div>
<divid="short_EditSession.toString"class="short_description hiddenSpan"><p>Returns the current <ahref="document.html#Document"class="link-short"title="Document (class)"data-id="Document"><code>Document</code></a> as a string.</p>
<h4>Arguments</h4><tableclass="argumentTable argument-list table table-striped table-bordered"><trclass="argumentRow "><tdclass="argName ">deltas</td><tdclass="argType""><ahref="http://www.nodemanual.org/latest/js_doc/Array.html"class=""title="Array"data-id="Array">Array</a></td><tdclass="argDescription ">Required. An array of previous changes</td></tr><trclass="argumentRow "><tdclass="argName ">dontSelect</td><tdclass="argType""><ahref="http://www.nodemanual.org/latest/js_doc/Boolean.html"class=""title="Boolean"data-id="Boolean">Boolean</a></td><tdclass="argDescription ">Required. If <code>true</code>, doesn't select the range of where the change occured</td></tr></table>