document treePath in api.md

This commit is contained in:
Meir Rotstein 2017-09-03 13:54:55 +03:00
parent 7ae0c690ef
commit b36df94cfe
2 changed files with 4 additions and 1 deletions

View File

@ -180,6 +180,9 @@ Constructs a new JSONEditor.
- Can return an object `{startFrom: number, options: string[]}`. Here `startFrom` determines the start character from where the existing text will be replaced. `startFrom` is `0` by default, replacing the whole text.
- Can return a `Promise` resolving one of the return types above to support asynchronously retrieving a list with options.
- `{boolean} treePath`
Adds a tree path control to the menu - this control visualize the current position on the tree structure as well as allows breadcrumbs navigation. False by default. Only applicable when `mode` is 'tree', 'form' or 'view'.
### Methods

View File

@ -794,7 +794,7 @@ exports.textDiff = function textDiff(oldText, newText) {
/**
* Return an object with the selection range or cursor position (if both have the same value)
* Support also old browsers (IE8-)
* Source: http://ourcodeworld.com/articles/read/282/how-to-get-the-current-cursor-position-and-selection-within-a-text-input-or-textarea-in-javascript *
* Source: http://ourcodeworld.com/articles/read/282/how-to-get-the-current-cursor-position-and-selection-within-a-text-input-or-textarea-in-javascript
* @param {DOMElement} el A dom element of a textarea or input text.
* @return {Object} reference Object with 2 properties (start and end) with the identifier of the location of the cursor and selected text.
**/