diff --git a/docs/api.md b/docs/api.md index 9595848..fa3fe79 100644 --- a/docs/api.md +++ b/docs/api.md @@ -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 diff --git a/src/js/util.js b/src/js/util.js index 9ad4a32..b67ae71 100644 --- a/src/js/util.js +++ b/src/js/util.js @@ -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. **/