Commit Graph

70 Commits

Author SHA1 Message Date
jos 983fafdf9c Implemented options `onChangeJSON(json)` and `onChangeText(jsonString)` 2018-08-07 11:03:27 +02:00
jos 80e5da9728 Impelemented `updateText` 2018-08-06 10:27:57 +02:00
jos 94871dd2d8 Merge branch 'develop' into update_json 2018-08-06 09:05:33 +02:00
jos 46593c24c5 Some more fixes around #558 2018-08-02 10:43:12 +02:00
jos 0ea0059696 Fixed switching from object/array to auto/string and vice versa 2018-07-29 22:00:15 +02:00
jos 69e88537c3 Implement `update` method (WIP) 2018-07-28 14:21:12 +02:00
jos 7662874036 Integrated `mobius1-selectr` 2018-07-11 10:54:08 +02:00
jos fdbfa8a951 Enclose string values in double quotes 2018-07-02 22:09:40 +02:00
jos 8b77111393 Implemented advanced sorting modal (WIP) 2018-05-30 21:54:25 +02:00
jos 9eb9c4fe0b Implemented `getSortablePaths` 2018-05-30 09:48:51 +02:00
jos 916c657e28 Set back correct `MAX_VISIBLE_CHILDS` 2018-05-16 21:17:56 +02:00
jos 904110d141 Implementing "show more" for large arrays (WIP) 2018-05-06 19:42:19 +02:00
Meir Rotstein 8cbe15aa1f move selection_api.html to examples 2018-02-13 20:08:09 +02:00
Meir Rotstein 803ce34ed4 test file for selection apis 2018-01-24 23:55:12 +02:00
Meir Rotstein f04eff7b4e unit test for getIndexForPosition() 2018-01-24 21:41:36 +02:00
jos 4875288cb7 Implemented repairing JSON objects containing special white space characters like non-breaking space 2017-11-14 21:59:23 +01:00
jos cba5659e78 Implemented repairing JSON objects containing left and right single and double quotes 2017-11-14 21:18:49 +01:00
jos 524d00e15e Fixed a bug in the sanitizer 2017-07-13 21:01:52 +02:00
Meir Rotstein b77deb969c add support for json schema references ($ref) 2017-07-05 00:28:28 +03:00
Stephen Thompson 48408f4ded Fix https://github.com/josdejong/jsoneditor/issues/314
The JSON path parsing code assumes that string keys within square brackets in JSON paths will be valid, parseable JSON.

However, the ajv library on which this project depends emits string keys in single quotes.

For example, ajv can emit .foo['bar'], which will ultimately end up with a call to JSON.parse("'bar'"). This causes the "Unexpected token ' in JSON at position 0" error thrown from JSON.parse.

 Since ajv shouldn't need to change and since this utility is gone in the next branch, this fix checks for ajv-formatted string keys and patches them to double-quoted strings before calling JSON.parse. This is the narrowest fix for the problem.
2016-09-22 18:06:22 -04:00
jos 309e8f9bc2 Updated history and bootstrap test file 2016-04-11 21:42:38 +02:00
jos ea473c54aa Fixed #289: Some CSS breaking when using the editor in combination with materialize.css or bootstrap 2016-04-09 20:55:07 +02:00
jos 8f7b656c3c Extended `util.parsePath` with support for all '*' 2016-04-04 21:28:23 +02:00
jos bfad6f5e7b Added some test pages 2016-03-20 15:56:28 +01:00
jos ec2511793a Fixed #259: when having a JSONEditor inside an HTML form, clicking an entry in the context menu did submit the form 2016-01-19 21:52:52 +01:00
jos 8ec471b6dc Improvements in sanitizing invalid JSON 2016-01-16 14:49:04 +01:00
jos b26eb2ebe4 Fixed an issue with a horiziontal scrollbar popping with a popover on displayed on the right side 2016-01-14 20:04:45 +01:00
jos e473209f1d Debouncing keyboard input implemented for fields too 2016-01-12 20:18:56 +01:00
jos f45fefe38f Implemented debouncing of keyboard input, resulting in much less history actions whilst typing 2016-01-12 18:11:56 +01:00
jos c0077250ef Fixed #222: editor throwing `onChange` events when switching mode 2016-01-12 17:25:33 +01:00
jos be40705cde Neatly resize the ace editor when validation errors are added/removed 2016-01-12 15:41:22 +01:00
jos 0690202f3a Implemented #183: display a checkbox left from boolean values, so you can easily switch between true/false. 2016-01-12 15:18:11 +01:00
jos 1d9d9c2594 Implemented method `setSchema` 2016-01-12 13:16:13 +01:00
jos a2b84b2dd8 Updated readme, docs, added example 2016-01-12 12:40:23 +01:00
jos 30eea90614 Added build script for minimalist version 2016-01-12 11:38:38 +01:00
jos 4b5ac7434f Parent nodes now display an error when a child node is invalid 2016-01-11 17:06:12 +01:00
jos e21aad3e69 Basic JSON schema validation working 2016-01-11 15:44:03 +01:00
jos 5f99f09c0f Fixed dragging multiple nodes horizontally 2015-12-30 17:26:39 +01:00
jos db0345c668 Styling of values in tree mode now customizable. Added a custom styling example 2015-12-27 17:36:59 +01:00
jos de314b897e Renamed options `change`, `editable`, `error` to respectively `onChange`, `onEditable`, and `onError`. Implemented `onModeChange` and `getMode`. 2015-12-25 11:38:41 +01:00
jos cafd4daba3 Implemented a new option `escapeUnicode`, which will show the hexadecimal unicode instead of the character itself. (See #93 and #230). 2015-12-24 20:20:50 +01:00
jos 0b234f6375 Some more fixes related to unicode and escape chars 2015-12-24 17:22:01 +01:00
jos 9cdff41afa Fixed #230: unicode characters are not escaped 2015-12-22 15:31:24 +01:00
jos dc40abf143 Fixed #230, Fixed #227, and Fixed #93: html and unicode characters not escaped 2015-12-21 14:39:15 +01:00
jos d9939177dd Moved images also to /dist 2015-02-28 21:02:39 +01:00
jos 75372fa3d7 More unit tests and a refinement of the regexp to remove JSONP encapsulation 2015-02-28 17:03:40 +01:00
jos b94b87c66b Fixed bugs in the JSON sanitizer, no longer manipulating comments or JSON-like structures inside strings. 2015-02-28 16:54:34 +01:00
jos 86e15f74e2 Added some unit tests 2015-02-28 15:04:46 +01:00
jos 0db2c35c2b Using brace to load Ace. Ace and jsonlint are now packed by default with JSONEditor. Removed all redundant build stuff for the assets. 2015-02-27 21:54:04 +01:00
jos b947e868eb Improved the `editable` callback: now also provides the path to a node and the nodes value 2014-07-27 21:08:59 +02:00