fix documentation for position
This commit is contained in:
parent
e5ca6769cd
commit
b9417a10be
2 changed files with 31 additions and 35 deletions
|
|
@ -253,11 +253,9 @@ var Document = function(text) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Inserts a block of `text` and the indicated `position`.
|
* Inserts a block of `text` and the indicated `position`.
|
||||||
* @param {Number} position The position to start inserting at
|
* @param {Object} position The position to start inserting at
|
||||||
* @param {String} text A chunk of text to insert
|
* @param {String} text A chunk of text to insert
|
||||||
* @returns {Number} The position of the last line of `text`. If the length of `text` is 0, this function simply returns `position`.
|
* @returns {Object} The position ({row, column}) of the last line of `text`. If the length of `text` is 0, this function simply returns `position`.
|
||||||
*
|
|
||||||
*
|
|
||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
this.insert = function(position, text) {
|
this.insert = function(position, text) {
|
||||||
|
|
@ -350,7 +348,7 @@ var Document = function(text) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Inserts a new line into the document at the current row's `position`. This method also triggers the `'change'` event.
|
* Inserts a new line into the document at the current row's `position`. This method also triggers the `'change'` event.
|
||||||
* @param {String} position The position to insert at
|
* @param {Object} position The position to insert at
|
||||||
* @returns {Object} Returns an object containing the final row and column, like this:<br/>
|
* @returns {Object} Returns an object containing the final row and column, like this:<br/>
|
||||||
* ```
|
* ```
|
||||||
* {row: endRow, column: 0}
|
* {row: endRow, column: 0}
|
||||||
|
|
@ -381,14 +379,12 @@ var Document = function(text) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Inserts `text` into the `position` at the current row. This method also triggers the `'change'` event.
|
* Inserts `text` into the `position` at the current row. This method also triggers the `'change'` event.
|
||||||
* @param {Number} position The position to insert at
|
* @param {Object} position The position to insert at
|
||||||
* @param {String} text A chunk of text
|
* @param {String} text A chunk of text
|
||||||
* @returns {Object} Returns an object containing the final row and column, like this:
|
* @returns {Object} Returns an object containing the final row and column, like this:
|
||||||
* ```
|
* ```
|
||||||
* {row: endRow, column: 0}
|
* {row: endRow, column: 0}
|
||||||
* ```
|
* ```
|
||||||
* @returns {Number} If `text` is empty, this function returns the value of `position`
|
|
||||||
*
|
|
||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
this.insertInLine = function(position, text) {
|
this.insertInLine = function(position, text) {
|
||||||
|
|
|
||||||
|
|
@ -1186,9 +1186,9 @@ var EditSession = function(text, mode) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Inserts a block of `text` and the indicated `position`.
|
* Inserts a block of `text` and the indicated `position`.
|
||||||
* @param {Number} position The position to start inserting at
|
* @param {Object} position The position {row, column} to start inserting at
|
||||||
* @param {String} text A chunk of text to insert
|
* @param {String} text A chunk of text to insert
|
||||||
* @returns {Number} The position of the last line of `text`. If the length of `text` is 0, this function simply returns `position`.
|
* @returns {Object} The position of the last line of `text`. If the length of `text` is 0, this function simply returns `position`.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue