Files
ace/api/document.html

60 lines
55 KiB
HTML
Raw Permalink Normal View History

2012-04-28 16:25:33 +02:00
<!DOCTYPE html><!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en"> <![endif]-->
2012-05-22 12:35:33 -07:00
<!--[if IE 7]> <html class="no-js ie7 oldie" lang="en"> <![endif]-->
<!--[if IE 8]> <html class="no-js ie8 oldie" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]--><html xmlns="http://www.w3.org/1999/xhtml"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"><title>Document - Ace API</title><meta name="generator" content="c9-doc-build"><meta name="description" content="Ace API documentation for the online code editor."><meta name="author" content="Garen J. Torikian"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="stylesheet" href="./resources/csses/bootstrap.min.css"><link rel="stylesheet" href="./resources/csses/prettify.css"><link rel="stylesheet" href="./resources/csses/ace_api.css"><link href="./resources/images/favicon.ico" rel="icon" type="image/x-icon"><script src="./resources/javascripts/jquery.js"></script><script src="./resources/javascripts/clicker.js"></script><script src="./resources/javascripts/jquery.collapse.js"></script><script src="./resources/javascripts/jquery.cookie.js"></script><script src="./resources/javascripts/bootstrap-dropdown.js"></script><script src="./resources/javascripts/jquery-scrollspy.js"></script><script script src="./resources/javascripts/prettify-extension.js"></script></head><body><div class="navbar navbar-fixed-top"><div class="navbar-inner"><div id="topSection" class="container"><span class="brand"></span><ul class="nav topLinks"><li id="ace_site"><a href="../index.html">Ace</a></li><li id="ace_api" class="active"><a href="index.html">Ace API Reference</a></li></ul><form id="searchbox" action="" class="navbar-search pull-right"> <input name="query" type="text" placeholder="Search the API" title="Search across all the documentation" class="search-query span3"></form></div></div></div><div id="nonFooter"><div id="wrapper"><div class="content"><div class="row centerpiece"><div id="sidebarContainer" class="span3"><div id="sidebar"><div id="well"><h3>Ace Reference</h3><div class="swirl_divider"> </div><ul class="menu"><li><div class="menu-item"><a href="ace.html" class="menuLink namespace">Ace</a></div></li><li><div class="menu-item"><a href="anchor.html" class="menuLink namespace">Anchor</a></div></li><li><div class="menu-item"><a href="background_tokenizer.html" class="menuLink namespace">BackgroundTokenizer </a></div></li><li><div class="menu-item"><a href="document.html" class="menuLink namespace">Document </a></div></li><li><div class="menu-item"><a href="edit_session.html" class="menuLink namespace">EditSession </a></div></li><li><div class="menu-item"><a href="editor.html" class="menuLink namespace">Editor</a></div></li><li><div class="menu-item"><a href="range.html" class="menuLink namespace">Range</a></div></li><li><div class="menu-item"><a href="scrollbar.html" class="menuLink namespace">Scrollbar</a></div></li><li><div class="menu-item"><a href="search.html" class="menuLink namespace">Search </a></div></li><li><div class="menu-item"><a href="selection.html" class="menuLink namespace">Selection </a></div></li><li><div class="menu-item"><a href="token_iterator.html" class="menuLink namespace">TokenIterator</a></div></li><li><div class="menu-item"><a href="tokenizer.html" class="menuLink namespace">Tokenizer</a></div></li><li><div class="menu-item"><a href="undomanager.html" class="menuLink namespace">UndoManager</a></div></li><li><div class="menu-item"><a href="virtual_renderer.html" class="menuLink namespace">VirtualRenderer</a></div></li></ul></div></div></div><div id="mainContent" class="span9"><div id="documentation"><div class="classContent"><div class="membersBackground"></div><div class=" members pos0"><div class=" membersContent pos0"><h1 class="memberHeader"><span class="name">Document<span class="editInC9"><a href='http://c9.io/open/git/?url=git%3A%2F%2Fgithub.com%2Fajaxorg%2Face.git' title='Edit in Cloud9 IDE'>[edit]</a></span></span></h1><ul data-tabs="tabs" class="nav tabs pos0"><li data-dropdown="dropdown" class="dropdown"></li><li data-dropdown="dropdown" class="dropdown"><a href="#" data-toggle="dropdown"
</div></div></article><h3 class="sectionHeader">Constructors</h3><article id="Document.new" data-title="Document.new (constructor)" class="article"><div class="section method"><div class="memberContent"><div class="title"><ul class="signatures"><li class="signature"><ul><li class="signature-call"><span class="constructorIdentifier">new </span><span id="Document.new" class="member-name methodClicker">Document</span>(<span class="sigArgList">[<a href="http://www.nodemanual.org/latest/js_doc/String.html" class="argument methodClicker" title="String" data-id="String">String</a> | <a href="http://www.nodemanual.org/latest/js_doc/Array.html" class="argument methodClicker" title="Array" data-id="Array">Array</a> text]</span>)</li></ul><ul class="metaInfo"></ul></li></ul></div><div class="sideToggler"><div id="ellipsis_Document.new" class="ellipsis_description"><p>Creates a new <code>Document</code>. If <code>text</code> is included, the <code>Document</code> contains those strings; otherwise, it&#39;s empty.</p>
</div><h3 id="Document.new" class="methodToggle methodClicker inactive">&nbsp;&nbsp;&nbsp;</h3><div class="description"><p>Creates a new <code>Document</code>. If <code>text</code> is included, the <code>Document</code> contains those strings; otherwise, it&#39;s empty.</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">text</td><td class="argType" "><a href="http://www.nodemanual.org/latest/js_doc/String.html" class="" title="String" data-id="String">String</a> | <a href="http://www.nodemanual.org/latest/js_doc/Array.html" class="" title="Array" data-id="Array">Array</a></td><td class="argDescription ">Required. The starting text</td></tr></table></div></div></div></div></article><h3 class="sectionHeader">Methods</h3><article id="Document.$clipPosition" data-title="Document.$clipPosition (class method)" class="article"><div class="section method"><div class="memberContent"><div class="title"><ul class="signatures"><li class="signature"><ul><li class="signature-call"><span id="Document.$clipPosition" class="member-name methodClicker"><span class="sigClassName">Document.</span><span class="sigMemberName">$clipPosition</span></span>(<span class="sigArgList">position</span>)<li class="signature-returns"><ul class="argument-types"><li class="argument-type"><a href="http://www.nodemanual.org/latest/js_doc/Number.html" class="returnType " title="Number" data-id="Number">Number</a></li></ul></li></li></ul><ul class="metaInfo"><li><span class="label internal">Internal</span></li></ul></li></ul></div><div class="sideToggler"><div id="ellipsis_Document.$clipPosition" class="ellipsis_description"></div><h3 id="Document.$clipPosition" class="methodToggle methodClicker inactive">&nbsp;&nbsp;&nbsp;</h3><div class="description"></div></div></div></div></article><article id="Document.$detectNewLine" data-title="Document.$detectNewLine (class method)" class="article"><div class="section method"><div class="memberContent"><div class="title"><ul class="signatures"><li class="signature"><ul><li class="signature-call"><span id="Document.$detectNewLine" class="member-name methodClicker"><span class="sigClassName">Document.</span><span class="sigMemberName">$detectNewLine</span></span>(<span class="sigArgList">text</span>)<li class="signature-returns"><ul class="argument-types"><li class="argument-type"><span class="returnType " title="Document.$detectNewLine (class method)">Void</span></li></ul></li></li></ul><ul class="metaInfo"><li><span class="label internal">Internal</span></li></ul></li></ul></div><div class="sideToggler"><div id="ellipsis_Document.$detectNewLine" class="ellipsis_description"></div><h3 id="Document.$detectNewLine" class="methodToggle methodClicker inactive">&nbsp;&nbsp;&nbsp;</h3><div class="description"></div></div></div></div></article><article id="Document.$split" data-title="Document.$split (class method)" class="article"><div class="section method"><div class="memberContent"><div class="title"><ul class="signatures"><li class="signature"><ul><li class="signature-call"><span id="Document.$split" class="member-name methodClicker"><span class="sigClassName">Document.</span><span class="sigMemberName">$split</span></span>(<span class="sigArgList"><a href="http://www.nodemanual.org/latest/js_doc/String.html" class="argument methodClicker" title="String" data-id="String">String</a> text</span>)<li class="signature-returns"><ul class="argument-types"><li class="argument-type"><a href="http://www.nodemanual.org/latest/js_doc/String.html" class="returnType " title="String" data-id="String">String</a></li></ul></li></li></ul><ul class="metaInfo"><li><span class="label internal">Internal</span></li></ul></li></ul></div><div class="sideToggler"><div id="ellipsis_Document.$split" class="ellipsis_description"><p>Splits a string of text on any newline (<code>\n</code>) or carriage-return (&#39;\r&#39;) characters.</p>
</div><h3 id="Document.$split" class="methodToggle methodClicker inactive">&nbsp;&nbsp;&nbsp;</h3><div class="description"><p>Splits a string of text on any newline (<code>\n</code>) or carriage-return (&#39;\r&#39;) characters.</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">text</td><td class="argType" "><a href="http://www.nodemanual.org/latest/js_doc/String.html" class="" title="String" data-id="String">String</a></td><td class="argDescription ">Required. The text to work with</td></tr></table></div></div></div></div></article><article id="Document.applyDeltas" data-title="Document.applyDeltas (class method)" class="article"><div class="section method"><div class="memberContent"><div class="title"><ul class="signatures"><li class="signature"><ul><li class="signature-call"><span id="Document.applyDeltas" class="member-name methodClicker"><span class="sigClassName">Document.</span><span class="sigMemberName">applyDeltas</span></span>(<span class="sigArgList">deltas</span>)<li class="signature-returns"><ul class="argument-types"><li class="argument-type"><span class="returnType " title="Document.applyDeltas (class method)">Void</span></li></ul></li></li></ul><ul class="metaInfo"></ul></li></ul></div><div class="sideToggler"><div id="ellipsis_Document.applyDeltas" class="ellipsis_description"><p>Applies all the changes previously accumulated. These can be either <code>&#39;includeText&#39;</code>, <code>&#39;insertLines&#39;</code>, <code>&#39;removeText&#39;</code>, and <code>&#39;removeLines&#39;</code>.</p>
</div><h3 id="Document.applyDeltas" class="methodToggle methodClicker inactive">&nbsp;&nbsp;&nbsp;</h3><div class="description"><p>Applies all the changes previously accumulated. These can be either <code>&#39;includeText&#39;</code>, <code>&#39;insertLines&#39;</code>, <code>&#39;removeText&#39;</code>, and <code>&#39;removeLines&#39;</code>.</p>
</div></div></div></div></article><article id="Document.createAnchor" data-title="Document.createAnchor (class method)" class="article"><div class="section method"><div class="memberContent"><div class="title"><ul class="signatures"><li class="signature"><ul><li class="signature-call"><span id="Document.createAnchor" class="member-name methodClicker"><span class="sigClassName">Document.</span><span class="sigMemberName">createAnchor</span></span>(<span class="sigArgList"><a href="http://www.nodemanual.org/latest/js_doc/Number.html" class="argument methodClicker" title="Number" data-id="Number">Number</a> row, <a href="http://www.nodemanual.org/latest/js_doc/Number.html" class="argument methodClicker" title="Number" data-id="Number">Number</a> column</span>)<li class="signature-returns"><ul class="argument-types"><li class="argument-type"><a href="anchor.html#Anchor" class="returnType " title="Anchor (class)" data-id="Anchor">Anchor</a></li></ul></li></li></ul><ul class="metaInfo"></ul></li></ul></div><div class="sideToggler"><div id="ellipsis_Document.createAnchor" class="ellipsis_description"><p>Creates a new <code>Anchor</code> to define a floating point in the document.</p>
</div><h3 id="Document.createAnchor" class="methodToggle methodClicker inactive">&nbsp;&nbsp;&nbsp;</h3><div class="description"><p>Creates a new <code>Anchor</code> to define a floating point in the document.</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">row</td><td class="argType" "><a href="http://www.nodemanual.org/latest/js_doc/Number.html" class="" title="Number" data-id="Number">Number</a></td><td class="argDescription ">Required. The row number to use</td></tr><tr class="argumentRow "><td class="argName ">column</td><td class="argType" "><a href="http://www.nodemanual.org/latest/js_doc/Number.html" class="" title="Number" data-id="Number">Number</a></td><td class="argDescription ">Required. The column number to use</td></tr></table></div></div></div></div></article><article id="Document.getAllLines" data-title="Document.getAllLines (class method)" class="article"><div class="section method"><div class="memberContent"><div class="title"><ul class="signatures"><li class="signature"><ul><li class="signature-call"><span id="Document.getAllLines" class="member-name methodClicker"><span class="sigClassName">Document.</span><span class="sigMemberName">getAllLines</span></span>(<span class="sigArgList"></span>)<li class="signature-returns"><ul class="argument-types"><li class="argument-type">[ <a href="http://www.nodemanual.org/latest/js_doc/String.html" class="returnType " title="String" data-id="String">String</a> ]</li></ul></li></li></ul><ul class="metaInfo"></ul></li></ul></div><div class="sideToggler"><div id="ellipsis_Document.getAllLines" class="ellipsis_description"><p>Returns all lines in the document as string array. Warning: The caller should not modify this array!</p>
</div><h3 id="Document.getAllLines" class="methodToggle methodClicker inactive">&nbsp;&nbsp;&nbsp;</h3><div class="description"><p>Returns all lines in the document as string array. Warning: The caller should not modify this array!</p>
</div></div></div></div></article><article id="Document.getLength" data-title="Document.getLength (class method)" class="article"><div class="section method"><div class="memberContent"><div class="title"><ul class="signatures"><li class="signature"><ul><li class="signature-call"><span id="Document.getLength" class="member-name methodClicker"><span class="sigClassName">Document.</span><span class="sigMemberName">getLength</span></span>(<span class="sigArgList"></span>)<li class="signature-returns"><ul class="argument-types"><li class="argument-type"><a href="http://www.nodemanual.org/latest/js_doc/Number.html" class="returnType " title="Number" data-id="Number">Number</a></li></ul></li></li></ul><ul class="metaInfo"></ul></li></ul></div><div class="sideToggler"><div id="ellipsis_Document.getLength" class="ellipsis_description"><p>Returns the number of rows in the document.</p>
</div><h3 id="Document.getLength" class="methodToggle methodClicker inactive">&nbsp;&nbsp;&nbsp;</h3><div class="description"><p>Returns the number of rows in the document.</p>
</div></div></div></div></article><article id="Document.getLine" data-title="Document.getLine (class method)" class="article"><div class="section method"><div class="memberContent"><div class="title"><ul class="signatures"><li class="signature"><ul><li class="signature-call"><span id="Document.getLine" class="member-name methodClicker"><span class="sigClassName">Document.</span><span class="sigMemberName">getLine</span></span>(<span class="sigArgList"><a href="http://www.nodemanual.org/latest/js_doc/Number.html" class="argument methodClicker" title="Number" data-id="Number">Number</a> row</span>)<li class="signature-returns"><ul class="argument-types"><li class="argument-type"><a href="http://www.nodemanual.org/latest/js_doc/String.html" class="returnType " title="String" data-id="String">String</a></li></ul></li></li></ul><ul class="metaInfo"></ul></li></ul></div><div class="sideToggler"><div id="ellipsis_Document.getLine" class="ellipsis_description"><p>Returns a verbatim copy of the given line as it is in the document</p>
</div><h3 id="Document.getLine" class="methodToggle methodClicker inactive">&nbsp;&nbsp;&nbsp;</h3><div class="description"><p>Returns a verbatim copy of the given line as it is in the document</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">row</td><td class="argType" "><a href="http://www.nodemanual.org/latest/js_doc/Number.html" class="" title="Number" data-id="Number">Number</a></td><td class="argDescription ">Required. The row index to retrieve</td></tr></table></div></div></div></div></article><article id="Document.getLines" data-title="Document.getLines (class method)" class="article"><div class="section method"><div class="memberContent"><div class="title"><ul class="signatures"><li class="signature"><ul><li class="signature-call"><span id="Document.getLines" class="member-name methodClicker"><span class="sigClassName">Document.</span><span class="sigMemberName">getLines</span></span>(<span class="sigArgList"><a href="http://www.nodemanual.org/latest/js_doc/Number.html" class="argument methodClicker" title="Number" data-id="Number">Number</a> firstRow, <a href="http://www.nodemanual.org/latest/js_doc/Number.html" class="argument methodClicker" title="Number" data-id="Number">Number</a> lastRow</span>)<li class="signature-returns"><ul class="argument-types"><li class="argument-type">[ <a href="http://www.nodemanual.org/latest/js_doc/String.html" class="returnType " title="String" data-id="String">String</a> ]</li></ul></li></li></ul><ul class="metaInfo"></ul></li></ul></div><div class="sideToggler"><div id="ellipsis_Document.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><h3 id="Document.getLines" class="methodToggle methodClicker inactive">&nbsp;&nbsp;&nbsp;</h3><div class="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>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">firstRow</td><td class="argType" "><a href="http://www.nodemanual.org/latest/js_doc/Number.html" class="" title="Number" data-id="Number">Number</a></td><td class="argDescription ">Required. The first row index to retrieve</td></tr><tr class="argumentRow "><td class="argName ">lastRow</td><td class="argType" "><a href="http://www.nodemanual.org/latest/js_doc/Number.html" class="" title="Number" data-id="Number">Number</a></td><td class="argDescription ">Required. The final row index to retrieve</td></tr></table></div></div></div></div></article><article id="Document.getNewLineCharacter" data-title="Document.getNewLineCharacter (class method)" class="article"><div class="section method"><div class="memberContent"><div class="title"><ul class="signatures"><li class="signature"><ul><li class="signature-call"><span id="Document.getNewLineCharacter" class="member-name methodClicker"><span class="sigClassName">Document.</span><span class="sigMemberName">getNewLineCharacter</span></span>(<span class="sigArgList"></span>)<li class="signature-returns"><ul class="argument-types"><li class="argument-type"><a href="http://www.nodemanual.org/latest/js_doc/String.html" class="returnType " title="String" data-id="String">String</a></li></ul></li></li></ul><ul class="metaInfo"></ul></li></ul></div><div class="sideToggler"><div id="ellipsis_Document.getNewLineCharacter" class="ellipsis_description"><p>Returns the newline character that&#39;s being used, depending on the value of <code>newLineMode</code>.</p>
</div><h3 id="Document.getNewLineCharacter" class="methodToggle methodClicker inactive">&nbsp;&nbsp;&nbsp;</h3><div class="description"><p>Returns the newline character that&#39;s being used, depending on the value of <code>newLineMode</code>.</p>
</div></div></div></div></article><article id="Document.getNewLineMode" data-title="Document.getNewLineMode (class method)" class="article"><div class="section method"><div class="memberContent"><div class="title"><ul class="signatures"><li class="signature"><ul><li class="signature-call"><span id="Document.getNewLineMode" class="member-name methodClicker"><span class="sigClassName">Document.</span><span class="sigMemberName">getNewLineMode</span></span>(<span class="sigArgList"></span>)<li class="signature-returns"><ul class="argument-types"><li class="argument-type"><a href="http://www.nodemanual.org/latest/js_doc/String.html" class="returnType " title="String" data-id="String">String</a></li></ul></li></li></ul><ul class="metaInfo"></ul></li></ul></div><div class="sideToggler"><div id="ellipsis_Document.getNewLineMode" class="ellipsis_description"><p>Returns the type of newlines being used; either <code>windows</code>, <code>unix</code>, or <code>auto</code></p>
</div><h3 id="Document.getNewLineMode" class="methodToggle methodClicker inactive">&nbsp;&nbsp;&nbsp;</h3><div class="description"><p>Returns the type of newlines being used; either <code>windows</code>, <code>unix</code>, or <code>auto</code></p>
</div></div></div></div></article><article id="Document.getTextRange" data-title="Document.getTextRange (class method)" class="article"><div class="section method"><div class="memberContent"><div class="title"><ul class="signatures"><li class="signature"><ul><li class="signature-call"><span id="Document.getTextRange" class="member-name methodClicker"><span class="sigClassName">Document.</span><span class="sigMemberName">getTextRange</span></span>(<span class="sigArgList"><a href="range.html#Range" class="argument methodClicker" title="Range (class)" data-id="Range">Range</a> range</span>)<li class="signature-returns"><ul class="argument-types"><li class="argument-type"><a href="http://www.nodemanual.org/latest/js_doc/String.html" class="returnType " title="String" data-id="String">String</a></li></ul></li></li></ul><ul class="metaInfo"></ul></li></ul></div><div class="sideToggler"><div id="ellipsis_Document.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><h3 id="Document.getTextRange" class="methodToggle methodClicker inactive">&nbsp;&nbsp;&nbsp;</h3><div class="description"><p>Given a range within the document, this function returns all the text within that range as a single string.</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">range</td><td class="argType" "><a href="range.html#Range" class="" title="Range (class)" data-id="Range">Range</a></td><td class="argDescription ">Required. The range to work with</td></tr></table></div></div></div></div></article><article id="Document.getValue" data-title="Document.getValue (class method)" class="article"><div class="section method"><div class="memberContent"><div class="title"><ul class="signatures"><li class="signature"><ul><li class="signature-call"><span id="Document.getValue" class="member-name methodClicker"><span class="sigClassName">Document.</span><span class="sigMemberName">getValue</span></span>(<span class="sigArgList"></span>)<li class="signature-returns"><ul class="argument-types"><li class="argument-type"><a href="http://www.nodemanual.org/latest/js_doc/String.html" class="returnType " title="String" data-id="String">String</a></li></ul></li></li></ul><ul class="metaInfo"></ul></li></ul></div><div class="sideToggler"><div id="ellipsis_Document.getValue" class="ellipsis_description"><p>Returns all the lines in the document as a single string, split by the new line character.</p>
</div><h3 id="Document.getValue" class="methodToggle methodClicker inactive">&nbsp;&nbsp;&nbsp;</h3><div class="description"><p>Returns all the lines in the document as a single string, split by the new line character.</p>
</div></div></div></div></article><article id="Document.insert" data-title="Document.insert (class method)" class="article"><div class="section method"><div class="memberContent"><div class="title"><ul class="signatures"><li class="signature"><ul><li class="signature-call"><span id="Document.insert" class="member-name methodClicker"><span class="sigClassName">Document.</span><span class="sigMemberName">insert</span></span>(<span class="sigArgList"><a href="http://www.nodemanual.org/latest/js_doc/Number.html" class="argument methodClicker" title="Number" data-id="Number">Number</a> position, <a href="http://www.nodemanual.org/latest/js_doc/String.html" class="argument methodClicker" title="String" data-id="String">String</a> text</span>)<li class="signature-returns"><ul class="argument-types"><li class="argument-type"><a href="http://www.nodemanual.org/latest/js_doc/Number.html" class="returnType " title="Number" data-id="Number">Number</a></li></ul></li></li></ul><ul class="metaInfo"></ul></li></ul></div><div class="sideToggler"><div id="ellipsis_Document.insert" class="ellipsis_description"></div><h3 id="Document.insert" class="methodToggle methodClicker inactive">&nbsp;&nbsp;&nbsp;</h3><div class="description"><h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">position</td><td class="argType" "><a href="http://www.nodemanual.org/latest/js_doc/Number.html" class="" title="Number" data-id="Number">Number</a></td><td class="argDescription ">Required. The position to start inserting at</td></tr><tr class="argumentRow "><td class="argName ">text</td><td class="argType" "><a href="http://www.nodemanual.org/latest/js_doc/String.html" class="" title="String" data-id="String">String</a></td><td class="argDescription ">Required. A chunk of text to insert</td></tr></table></div></div></div></div></article><article id="Document.insertInLine" data-title="Document.insertInLine (class method)" class="article"><div class="section method"><div class="memberContent"><div class="title"><ul class="signatures"><li class="signature"><ul><li class="signature-call"><span id="Document.insertInLine" class="member-name methodClicker"><span class="sigClassName">Document.</span><span class="sigMemberName">insertInLine</span></span>(<span class="sigArgList"><a href="http://www.nodemanual.org/latest/js_doc/Number.html" class="argument methodClicker" title="Number" data-id="Number">Number</a> position, <a href="http://www.nodemanual.org/latest/js_doc/String.html" class="argument methodClicker" title="String" data-id="String">String</a> text</span>)<li class="signature-returns"><ul class="argument-types"><li class="argument-type"><a href="http://www.nodemanual.org/latest/js_doc/Object.html" class="returnType " title="Object" data-id="Object">Object</a></li><li class="argument-type"><a href="http://www.nodemanual.org/latest/js_doc/Number.html" class="returnType " title="Number" data-id="Number">Number</a></li></ul></li></li></ul><ul class="metaInfo"></ul></li></ul></div><div class="sideToggler"><div id="ellipsis_Document.insertInLine" class="ellipsis_description"><p>Inserts <code>text</code> into the <code>position</code> at the current row. This method also triggers the <code>&#39;change&#39;</code> event.</p>
</div><h3 id="Document.insertInLine" class="methodToggle methodClicker inactive">&nbsp;&nbsp;&nbsp;</h3><div class="description"><p>Inserts <code>text</code> into the <code>position</code> at the current row. This method also triggers the <code>&#39;change&#39;</code> event.</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">position</td><td class="argType" "><a href="http://www.nodemanual.org/latest/js_doc/Number.html" class="" title="Number" data-id="Number">Number</a></td><td class="argDescription ">Required. The position to insert at</td></tr><tr class="argumentRow "><td class="argName ">text</td><td class="argType" "><a href="http://www.nodemanual.org/latest/js_doc/String.html" class="" title="String" data-id="String">String</a></td><td class="argDescription ">Required. A chunk of text</td></tr></table></div></div></div></div></article><article id="Document.insertLines" data-title="Document.insertLines (class method)" class="article"><div class="section method"><div class="memberContent"><div class="title"><ul class="signatures"><li class="signature"><ul><li class="signature-call"><span id="Document.insertLines" class="member-name methodClicker"><span class="sigClassName">Document.</span><span class="sigMemberName">insertLines</span></span>(<span class="sigArgList"><a href="http://www.nodemanual.org/latest/js_doc/Number.html" class="argument methodClicker" title="Number" data-id="Number">Number</a> row, <a href="http://www.nodemanual.org/latest/js_doc/Array.html" class="argument methodClicker" title="Array" data-id="Array">Array</a> lines</span>)<li class="signature-returns"><ul class="argument-types"><li class="argument-type"><a href="http://www.nodemanual.org/latest/js_doc/Object.html" class="returnType " title="Object" data-id="Object">Object</a></li></ul></li></li></ul><ul class="metaInfo"></ul></li></ul></div><div class="sideToggler"><div id="ellipsis_Document.insertLines" class="ellipsis_description"><p>Inserts the elements in <code>lines</code> into the document, starting at the row index given by <code>row</code>. This method also triggers the <code>&#39;change&#39;</code> event.</p>
</div><h3 id="Document.insertLines" class="methodToggle methodClicker inactive">&nbsp;&nbsp;&nbsp;</h3><div class="description"><p>Inserts the elements in <code>lines</code> into the document, starting at the row index given by <code>row</code>. This method also triggers the <code>&#39;change&#39;</code> event.</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">row</td><td class="argType" "><a href="http://www.nodemanual.org/latest/js_doc/Number.html" class="" title="Number" data-id="Number">Number</a></td><td class="argDescription ">Required. The index of the row to insert at</td></tr><tr class="argumentRow "><td class="argName ">lines</td><td class="argType" "><a href="http://www.nodemanual.org/latest/js_doc/Array.html" class="" title="Array" data-id="Array">Array</a></td><td class="argDescription ">Required. An array of strings</td></tr></table></div></div></div></div></article><article id="Document.insertNewLine" data-title="Document.insertNewLine (class method)" class="article"><div class="section method"><div class="memberContent"><div class="title"><ul class="signatures"><li class="signature"><ul><li class="signature-call"><span id="Document.insertNewLine" class="member-name methodClicker"><span class="sigClassName">Document.</span><span class="sigMemberName">insertNewLine</span></span>(<span class="sigArgList"><a href="http://www.nodemanual.org/latest/js_doc/String.html" class="argument methodClicker" title="String" data-id="String">String</a> position</span>)<li class="signature-returns"><ul class="argument-types"><li class="argument-type"><a href="http://www.nodemanual.org/latest/js_doc/Object.html" class="returnType " title="Object" data-id="Object">Object</a></li></ul></li></li></ul><ul class="metaInfo"></ul></li></ul></div><div class="sideToggler"><div id="ellipsis_Document.insertNewLine" class="ellipsis_description"><p>Inserts a new line into the document at the current row&#39;s <code>position</code>. This method also triggers the <code>&#39;change&#39;</code> event.</p>
</div><h3 id="Document.insertNewLine" class="methodToggle methodClicker inactive">&nbsp;&nbsp;&nbsp;</h3><div class="description"><p>Inserts a new line into the document at the current row&#39;s <code>position</code>. This method also triggers the <code>&#39;change&#39;</code> event.</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">position</td><td class="argType" "><a href="http://www.nodemanual.org/latest/js_doc/String.html" class="" title="String" data-id="String">String</a></td><td class="argDescription ">Required. The position to insert at</td></tr></table></div></div></div></div></article><article id="Document.isNewLine" data-title="Document.isNewLine (class method)" class="article"><div class="section method"><div class="memberContent"><div class="title"><ul class="signatures"><li class="signature"><ul><li class="signature-call"><span id="Document.isNewLine" class="member-name methodClicker"><span class="sigClassName">Document.</span><span class="sigMemberName">isNewLine</span></span>(<span class="sigArgList"><a href="http://www.nodemanual.org/latest/js_doc/String.html" class="argument methodClicker" title="String" data-id="String">String</a> text</span>)<li class="signature-returns"><ul class="argument-types"><li class="argument-type"><a href="http://www.nodemanual.org/latest/js_doc/Boolean.html" class="returnType " title="Boolean" data-id="Boolean">Boolean</a></li></ul></li></li></ul><ul class="metaInfo"></ul></li></ul></div><div class="sideToggler"><div id="ellipsis_Document.isNewLine" class="ellipsis_description"><p>Returns <code>true</code> if <code>text</code> is a newline character (either <code>\r\n</code>, <code>\r</code>, or <code>\n</code>).</p>
</div><h3 id="Document.isNewLine" class="methodToggle methodClicker inactive">&nbsp;&nbsp;&nbsp;</h3><div class="description"><p>Returns <code>true</code> if <code>text</code> is a newline character (either <code>\r\n</code>, <code>\r</code>, or <code>\n</code>).</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">text</td><td class="argType" "><a href="http://www.nodemanual.org/latest/js_doc/String.html" class="" title="String" data-id="String">String</a></td><td class="argDescription ">Required. The text to check</td></tr></table></div></div></div></div></article><article id="Document.remove" data-title="Document.remove (class method)" class="article"><div class="section method"><div class="memberContent"><div class="title"><ul class="signatures"><li class="signature"><ul><li class="signature-call"><span id="Document.remove" class="member-name methodClicker"><span class="sigClassName">Document.</span><span class="sigMemberName">remove</span></span>(<span class="sigArgList"><a href="range.html#Range" class="argument methodClicker" title="Range (class)" data-id="Range">Range</a> range</span>)<li class="signature-returns"><ul class="argument-types"><li class="argument-type"><a href="http://www.nodemanual.org/latest/js_doc/Object.html" class="returnType " title="Object" data-id="Object">Object</a></li></ul></li></li></ul><ul class="metaInfo"></ul></li></ul></div><div class="sideToggler"><div id="ellipsis_Document.remove" class="ellipsis_description"><p>Removes the <code>range</code> from the document.</p>
</div><h3 id="Document.remove" class="methodToggle methodClicker inactive">&nbsp;&nbsp;&nbsp;</h3><div class="description"><p>Removes the <code>range</code> from the document.</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">range</td><td class="argType" "><a href="range.html#Range" class="" title="Range (class)" data-id="Range">Range</a></td><td class="argDescription ">Required. A specified Range to remove</td></tr></table></div></div></div></div></article><article id="Document.removeInLine" data-title="Document.removeInLine (class method)" class="article"><div class="section method"><div class="memberContent"><div class="title"><ul class="signatures"><li class="signature"><ul><li class="signature-call"><span id="Document.removeInLine" class="member-name methodClicker"><span class="sigClassName">Document.</span><span class="sigMemberName">removeInLine</span></span>(<span class="sigArgList"><a href="http://www.nodemanual.org/latest/js_doc/Number.html" class="argument methodClicker" title="Number" data-id="Number">Number</a> row, <a href="http://www.nodemanual.org/latest/js_doc/Number.html" class="argument methodClicker" title="Number" data-id="Number">Number</a> startColumn, <a href="http://www.nodemanual.org/latest/js_doc/Number.html" class="argument methodClicker" title="Number" data-id="Number">Number</a> endColumn</span>)<li class="signature-returns"><ul class="argument-types"><li class="argument-type"><a href="http://www.nodemanual.org/latest/js_doc/Object.html" class="returnType " title="Object" data-id="Object">Object</a></li></ul></li></li></ul><ul class="metaInfo"></ul></li></ul></div><div class="sideToggler"><div id="ellipsis_Document.removeInLine" class="ellipsis_description"><p>Removes the specified columns from the <code>row</code>. This method also triggers the <code>&#39;change&#39;</code> event.</p>
</div><h3 id="Document.removeInLine" class="methodToggle methodClicker inactive">&nbsp;&nbsp;&nbsp;</h3><div class="description"><p>Removes the specified columns from the <code>row</code>. This method also triggers the <code>&#39;change&#39;</code> event.</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">row</td><td class="argType" "><a href="http://www.nodemanual.org/latest/js_doc/Number.html" class="" title="Number" data-id="Number">Number</a></td><td class="argDescription ">Required. The row to remove from</td></tr><tr class="argumentRow "><td class="argName ">startColumn</td><td class="argType" "><a href="http://www.nodemanual.org/latest/js_doc/Number.html" class="" title="Number" data-id="Number">Number</a></td><td class="argDescription ">Required. The column to start removing at</td></tr><tr class="argumentRow "><td class="argName ">endColumn</td><td class="argType" "><a href="http://www.nodemanual.org/latest/js_doc/Number.html" class="" title="Number" data-id="Number">Number</a></td><td class="argDescription ">Required. The column to stop removing at</td></tr></table></div></div></div></div></article><article id="Document.removeLines" data-title="Document.removeLines (class method)" class="article"><div class="section method"><div class="memberContent"><div class="title"><ul class="signatures"><li class="signature"><ul><li class="signature-call"><span id="Document.removeLines" class="member-name methodClicker"><span class="sigClassName">Document.</span><span class="sigMemberName">removeLines</span></span>(<span class="sigArgList"><a href="http://www.nodemanual.org/latest/js_doc/Number.html" class="argument methodClicker" title="Number" data-id="Number">Number</a> firstRow, <a href="http://www.nodemanual.org/latest/js_doc/Number.html" class="argument methodClicker" title="Number" data-id="Number">Number</a> lastRow</span>)<li class="signature-returns"><ul class="argument-types"><li class="argument-type"><a href="http://www.nodemanual.org/latest/js_doc/String.html" class="returnType " title="String" data-id="String">String</a></li></ul></li></li></ul><ul class="metaInfo"></ul></li></ul></div><div class="sideToggler"><div id="ellipsis_Document.removeLines" class="ellipsis_description"><p>Removes a range of full lines. This method also triggers the <code>&#39;change&#39;</code> event.</p>
</div><h3 id="Document.removeLines" class="methodToggle methodClicker inactive">&nbsp;&nbsp;&nbsp;</h3><div class="description"><p>Removes a range of full lines. This method also triggers the <code>&#39;change&#39;</code> event.</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">firstRow</td><td class="argType" "><a href="http://www.nodemanual.org/latest/js_doc/Number.html" class="" title="Number" data-id="Number">Number</a></td><td class="argDescription ">Required. The first row to be removed</td></tr><tr class="argumentRow "><td class="argName ">lastRow</td><td class="argType" "><a href="http://www.nodemanual.org/latest/js_doc/Number.html" class="" title="Number" data-id="Number">Number</a></td><td class="argDescription ">Required. The last row to be removed</td></tr></table></div></div></div></div></article><article id="Document.removeNewLine" data-title="Document.removeNewLine (class method)" class="article"><div class="section method"><div class="memberContent"><div class="title"><ul class="signatures"><li class="signature"><ul><li class="signature-call"><span id="Document.removeNewLine" class="member-name methodClicker"><span class="sigClassName">Document.</span><span class="sigMemberName">removeNewLine</span></span>(<span class="sigArgList"><a href="http://www.nodemanual.org/latest/js_doc/Number.html" class="argument methodClicker" title="Number" data-id="Number">Number</a> row</span>)<li class="signature-returns"><ul class="argument-types"><li class="argument-type"><span class="returnType " title="Document.removeNewLine (class method)">Void</span></li></ul></li></li></ul><ul class="metaInfo"></ul></li></ul></div><div class="sideToggler"><div id="ellipsis_Document.removeNewLine" class="ellipsis_description"><p>Removes the new line between <code>row</code> and the row immediately following it. This method also triggers the <code>&#39;change&#39;</code> event.</p>
</div><h3 id="Document.removeNewLine" class="methodToggle methodClicker inactive">&nbsp;&nbsp;&nbsp;</h3><div class="description"><p>Removes the new line between <code>row</code> and the row immediately following it. This method also triggers the <code>&#39;change&#39;</code> event.</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">row</td><td class="argType" "><a href="http://www.nodemanual.org/latest/js_doc/Number.html" class="" title="Number" data-id="Number">Number</a></td><td class="argDescription ">Required. The row to check</td></tr></table></div></div></div></div></article><article id="Document.replace" data-title="Document.replace (class method)" class="article"><div class="section method"><div class="memberContent"><div class="title"><ul class="signatures"><li class="signature"><ul><li class="signature-call"><span id="Document.replace" class="member-name methodClicker"><span class="sigClassName">Document.</span><span class="sigMemberName">replace</span></span>(<span class="sigArgList"><a href="range.html#Range" class="argument methodClicker" title="Range (class)" data-id="Range">Range</a> range, <a href="http://www.nodemanual.org/latest/js_doc/String.html" class="argument methodClicker" title="String" data-id="String">String</a> text</span>)<li class="signature-returns"><ul class="argument-types"><li class="argument-type"><a href="http://www.nodemanual.org/latest/js_doc/Object.html" class="returnType " title="Object" data-id="Object">Object</a></li></ul></li></li></ul><ul class="metaInfo"></ul></li></ul></div><div class="sideToggler"><div id="ellipsis_Document.replace" class="ellipsis_description"><p>Replaces a range in the document with the new <code>text</code>.</p>
</div><h3 id="Document.replace" class="methodToggle methodClicker inactive">&nbsp;&nbsp;&nbsp;</h3><div class="description"><p>Replaces a range in the document with the new <code>text</code>.</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">range</td><td class="argType" "><a href="range.html#Range" class="" title="Range (class)" data-id="Range">Range</a></td><td class="argDescription ">Required. A specified Range to replace</td></tr><tr class="argumentRow "><td class="argName ">text</td><td class="argType" "><a href="http://www.nodemanual.org/latest/js_doc/String.html" class="" title="String" data-id="String">String</a></td><td class="argDescription ">Required. The new text to use as a replacement</td></tr></table></div></div></div></div></article><article id="Document.revertDeltas" data-title="Document.revertDeltas (class method)" class="article"><div class="section method"><div class="memberContent"><div class="title"><ul class="signatures"><li class="signature"><ul><li class="signature-call"><span id="Document.revertDeltas" class="member-name methodClicker"><span class="sigClassName">Document.</span><span class="sigMemberName">revertDeltas</span></span>(<span class="sigArgList">deltas</span>)<li class="signature-returns"><ul class="argument-types"><li class="argument-type"><span class="returnType " title="Document.revertDeltas (class method)">Void</span></li></ul></li></li></ul><ul class="metaInfo"></ul></li></ul></div><div class="sideToggler"><div id="ellipsis_Document.revertDeltas" class="ellipsis_description"><p>Reverts any changes previously applied. These can be either <code>&#39;includeText&#39;</code>, <code>&#39;insertLines&#39;</code>, <code>&#39;removeText&#39;</code>, and <code>&#39;removeLines&#39;</code>.</p>
</div><h3 id="Document.revertDeltas" class="methodToggle methodClicker inactive">&nbsp;&nbsp;&nbsp;</h3><div class="description"><p>Reverts any changes previously applied. These can be either <code>&#39;includeText&#39;</code>, <code>&#39;insertLines&#39;</code>, <code>&#39;removeText&#39;</code>, and <code>&#39;removeLines&#39;</code>.</p>
</div></div></div></div></article><article id="Document.setNewLineMode" data-title="Document.setNewLineMode (class method)" class="article"><div class="section method"><div class="memberContent"><div class="title"><ul class="signatures"><li class="signature"><ul><li class="signature-call"><span id="Document.setNewLineMode" class="member-name methodClicker"><span class="sigClassName">Document.</span><span class="sigMemberName">setNewLineMode</span></span>(<span class="sigArgList"><a href="http://www.nodemanual.org/latest/js_doc/String.html" class="argument methodClicker" title="String" data-id="String">String</a> newLineMode</span>)<li class="signature-returns"><ul class="argument-types"><li class="argument-type"><span class="returnType " title="Document.setNewLineMode (class method)">Void</span></li></ul></li></li></ul><ul class="metaInfo"></ul></li></ul></div><div class="sideToggler"><div id="ellipsis_Document.setNewLineMode" class="ellipsis_description"><p>Sets the new line mode.</p>
</div><h3 id="Document.setNewLineMode" class="methodToggle methodClicker inactive">&nbsp;&nbsp;&nbsp;</h3><div class="description"><p>Sets the new line mode.</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">newLineMode</td><td class="argType" "><a href="http://www.nodemanual.org/latest/js_doc/String.html" class="" title="String" data-id="String">String</a></td><td class="argDescription ">Required. The newline mode to use; can be either <code>windows</code>, <code>unix</code>, or <code>auto</code></td></tr></table></div></div></div></div></article><article id="Document.setValue" data-title="Document.setValue (class method)" class="article"><div class="section method"><div class="memberContent"><div class="title"><ul class="signatures"><li class="signature"><ul><li class="signature-call"><span id="Document.setValue" class="member-name methodClicker"><span class="sigClassName">Document.</span><span class="sigMemberName">setValue</span></span>(<span class="sigArgList"><a href="http://www.nodemanual.org/latest/js_doc/String.html" class="argument methodClicker" title="String" data-id="String">String</a> text</span>)<li class="signature-returns"><ul class="argument-types"><li class="argument-type"><span class="returnType " title="Document.setValue (class method)">Void</span></li></ul></li></li></ul><ul class="metaInfo"></ul></li></ul></div><div class="sideToggler"><div id="ellipsis_Document.setValue" class="ellipsis_description"><p>Replaces all the lines in the current <code>Document</code> with the value of <code>text</code>.</p>
</div><h3 id="Document.setValue" class="methodToggle methodClicker inactive">&nbsp;&nbsp;&nbsp;</h3><div class="description"><p>Replaces all the lines in the current <code>Document</code> with the value of <code>text</code>.</p>
<h4>Arguments</h4><table class="argumentTable argument-list table table-striped table-bordered"><tr class="argumentRow "><td class="argName ">text</td><td class="argType" "><a href="http://www.nodemanual.org/latest/js_doc/String.html" class="" title="String" data-id="String">String</a></td><td class="argDescription ">Required. The text to use</td></tr></table></div></div></div></div></article></div></div><div id="disqus_thread"></div></div></div></div></div><div class="push"></div></div><div id="footer"><div class="footerInner"><div class="footer-text pull-right"> <p><a href="http://www.c9.io">About Cloud9</a> | Ace & Cloud9 IDE are &copy; <a href="http://ajax.org">Ajax.org</a> 2012</p></div></div></div><!-- scripts concatenated and minified via ant build script--><script defer src="./resources/javascripts/plugins.js"></script>
2012-08-24 11:14:23 -07:00
<script defer src="./resources/javascripts/prettify.js"></script>
<script defer src="./resources/javascripts/prettify-extension.js"></script>
<script defer src="./resources/javascripts/ux.js"></script>
<script defer src="./resources/javascripts/disqus-ext.js"></script>
<script defer src="./resources/javascripts/ga.js"></script><!-- end scripts--><!--[if lt IE 7]><script src="//ajax.googleapis.com/ajax/libs/chrome-frame/1.0.3/CFInstall.min.js"></script><script>window.attachEvent('onload',function(){CFInstall.check({mode:'overlay'})})
2012-05-07 10:55:55 -07:00
2012-08-24 11:14:23 -07:00
</script><![endif]--></body></html>