Commit Graph

146 Commits

Author SHA1 Message Date
Gcaufy 85e0710097 Feat: Added filter and trigger options for autocomplete (#713)
* Feat: Added filter options for autocomplete

* Feat: added trigger option for autocomplete

* Fix: const/let => var
2019-06-08 11:37:52 +02:00
jos a9abad2cd4 Fix #698 `node.path` sometimes null in `onCreateMenu` 2019-05-29 16:29:29 +02:00
jos 7c398aeef7 Update history. Fix JSON schema default value styling not working for `false` and `null`, and fixed the styling not updating when clicking a boolean checkbox (See #666) 2019-03-17 15:56:29 +01:00
Adam Vigneaux c79bea4eb8 Display schema defaults inline next to Nodes (#666)
* Display schema defaults inline next to Nodes

* Improve usability of schema default display

- When value is default, make it bold and set a tooltip
- When value is not default, display the default next to the value
- When value is default and is a select, show "Default" next to it
- Lighten the color of green used for values
  This increases the contrast between normal values and default values.

* Remove styling when value is the same as the schema default

This styling may have been confusing for some users and may not have
been applicable to all situations.

* Apply is-default and is-not-default classes to values

This allows the user to supply custom styling for these states.

To set styles for values that match the default value in the schema, use
the class `.jsoneditor-is-default`.

To set styles for values that _do not_ match the default value in the
schema, use the class `.jsoneditor-is-not-default`.

* Remove extra newline after schema examples in tooltip

* Move schema default display from inline to tooltip

This presents less opportunity for user confusion and is likely to be
more widely applicable.

* Add examples of schema metadata display

* Add documentation on styling
2019-03-17 15:39:00 +01:00
Adam Vigneaux c93b8f1305
Add reproduction for schema ref examples bug 2019-03-14 11:27:28 -04:00
jos b5e9cfb34b Fix custom menu item in example 21 broken 2019-03-02 10:28:50 +01:00
jos 83b6c9a892 Update example 21 so it can run in IE11 2019-03-02 10:26:39 +01:00
RobAley b83090d412
change path parameter to object 2019-02-25 16:14:49 +00:00
RobAley 1c743bed1d
Add example for onCreateMenu 2019-02-21 14:32:20 +00:00
jos db9f5480c7 Define `onClassName` once and use it twice 2019-01-21 21:04:32 +01:00
jos 20e42ab8b0 Fix example 20 always highlighting objects and arrays (see #604) 2019-01-21 21:01:38 +01:00
jos a7cc8527bd Updated history, some minor tweaks in example 20 (see #604) 2019-01-21 20:53:02 +01:00
Pawel Raszewski 1c5d7d71ac added an ability to set custom css classes for Node's field and value (#604)
* update for gulp 4.0.0

* added an ability to set custom css classes for Node's field and value

* v5.9.8-beta

* wip

* wip

* wip

* wip

* wip

* wip

* cleanup

* reverted ./dist/ files

* cleanup

* reverted package-lock.json

* updated onClassName signature

* recursive node class name update on change

* add/remove css classes on node

* example fix

* merged remote

* removed yarn.lock

* changes get reflected on both sides of the diff view in example 20

* refactored and cleaned up example 20
2019-01-21 20:42:43 +01:00
jos ef764df37d Release v5.24.6 2018-09-12 09:44:23 +02:00
jos b853ec3f64 Implement color picker. Expose `VanillaPicker`, `ace`, and `Ajv`. 2018-08-22 12:10:15 +02:00
jos 4f72c5e113 Display a colored square left from values containing a color 2018-08-22 09:20:19 +02:00
jos f11f763171 Implemented support for async custom validation 2018-08-15 12:21:27 +02:00
jos 8bb2962505 Implemented support for custom validation 2018-08-15 10:48:51 +02:00
jos 482b9a74a2 Cleanup comments and update number of example 2018-08-13 20:53:32 +02:00
jos 13bb4d7bb1 Merge branch 'extendEvent' of https://github.com/cristinabarrantes/jsoneditor into cristinabarrantes-extendEvent
# Conflicts:
#	package.json
#	src/js/JSONEditor.js
2018-08-13 20:53:03 +02:00
Meir Rotstein d387de366a Show validation errors inline in code mode (#560)
* util.getPositionForPath

* utils.getPositionForPath - allow multiple paths

* code mode - show validation errors on gutter

* show all validation errors with scroll indication on text mode

* import json-source-map in favor of getting validation errors location

* revert dist change

* add statusbar indication for validation errors

* reset valodation errors indication  + code clean

* change display indication for validationErrorIndication

* extend schema validatin example with additional errors to demonstrate recent changes

* minor css change
2018-08-12 12:41:02 +02:00
jos 393dc3f809 Implemented advanced react example and some minor improvements 2018-08-07 13:32:41 +02:00
jos 983fafdf9c Implemented options `onChangeJSON(json)` and `onChangeText(jsonString)` 2018-08-07 11:03:27 +02:00
jos 54cae20630 Implement a simple React demo 2018-08-06 17:10:07 +02:00
jos 235410c59f Implemented an example synchronizing two editors 2018-08-06 14:48:40 +02:00
Cristina 5adf77a193 Use getPath in onEvent 2018-07-30 13:09:27 +02:00
Cristina ef74ede75e Use extended path with type for onEvent 2018-07-26 01:48:03 +02:00
Cristina 9de11c04cd Changes due to PR. 2018-07-16 16:52:41 +02:00
Cristina ecd9bf021f Add API functionality to extend event behaviour. 2018-07-02 13:13:02 +02:00
Meir Rotstein 1a66dbcedd (1) onTextSelectionChange: change params order (2) getSelection: empty selection 2018-04-26 22:19:35 +03:00
Meir Rotstein be0e781359 change # of example after merge 2018-04-17 23:48:16 +03:00
Meir Rotstein 3b186633e7 Merge branch 'develop' of https://github.com/josdejong/jsoneditor into get_caret_position
# Conflicts:
#	docs/api.md
#	src/js/Node.js
#	src/js/treemode.js
2018-04-02 02:07:53 +03:00
Meir Rotstein 39e8d36f72 CR Fix: tree selection - use serializable node as parameters 2018-04-02 01:40:10 +03:00
Meir Rotstein fb85ffdd5b CR fix - remove 'Node' from node selection function signatures 2018-03-01 22:49:08 +02:00
jos 36e83445ef Simplify example 14 a bit 2018-02-25 19:59:20 +01:00
jos 9fb29a644d Refactor to ES5 code. Some updates in the docs 2018-02-25 19:54:59 +01:00
Mario Mol 2f13f7fa54 Example incuding a new language and new language created based on english, that means that, if a key is missing in translations that will be english 2018-02-21 14:17:01 -03:00
Mario Mol 466c2c548b Support for overriding translations and for setting one language 2018-02-21 13:58:50 -03:00
Meir Rotstein 8cbe15aa1f move selection_api.html to examples 2018-02-13 20:08:09 +02:00
Israel f2492e32dc caseSensitive option added to autocomplete 2017-12-02 13:30:44 -05:00
Israel 168a65cda4 Revert "caseSensitive option added to autocomplete"
This reverts commit 89601c3115.
2017-12-02 13:23:03 -05:00
Israel 89601c3115 caseSensitive option added to autocomplete 2017-12-02 04:44:25 -05:00
Jos de Jong ccb9ea6d94 Merge pull request #423 from meirotstein/master
add support for json schema references ($ref)
2017-07-10 19:57:59 +02:00
jos ee85fb099d Cleanup some unused code. Minor update in the readme and examples 2017-07-08 11:48:32 +02:00
Israel Garcia 495ed38063 - move 'editor' parameter to the last position
- send standard array path instead of jsonpath in getOptions
2017-07-07 13:43:15 -04:00
Israel Garcia d423a70a5d return jsonpath in getOptions and editor instance. 2017-07-06 22:26:25 -04:00
Meir Rotstein b77deb969c add support for json schema references ($ref) 2017-07-05 00:28:28 +03:00
jos 0aed6e481e Some updates in the examples (indentation, link to jsonpath library instead of including it) 2017-07-02 13:44:08 +02:00
Jos de Jong 1f29f5912a Merge pull request #407 from israelito3000/feature/autocomplete2
Feature/autocomplete2
2017-07-02 13:23:55 +02:00
Israel Garcia 088d7d6c90 - Change signature of getOptions function to (text, path, input)
- Remove node object from exposure.
- Improve startFrom option by returning the start position.
2017-06-29 01:57:54 -04:00
Israel Garcia 4036f5cd28 Remove activationChar, update documentation. 2017-06-19 12:03:15 -04:00
Israel Garcia 00ba443acf - polyfills moved to utils.js
- lowercase "Show" function
- refine autocomplete examples.
- style improvements to match context menu.
- set auto to scrollbar in autocomplete dropdownbox
- Added docs for Templates and Autocomplete
- Promisify getOptions function
- Add elementType to getOptions function to return which element "field" or "value" is being edited.
- applyTo option now accept ['field', 'value'] instead of ['name', 'value']
- optimize confirmKeys to be part of the autocomplete option instead of autocomplete.config
2017-06-16 20:19:56 -04:00
Israel Garcia df4cb21146 stylize as CSS classes, remove config inline styles. 2017-05-31 19:41:50 -04:00
Israel Garcia 0391ad11b4 adjust public methods to camelCase and refine examples. 2017-05-31 17:53:24 -04:00
jos 5f8b90f35e Released v5.7.0 2017-05-26 16:17:34 +02:00
Israel Garcia 5411ad19ac autocomplete integrated. 2017-05-26 03:58:16 -04:00
Israel Garcia 8707432837 adjust documentation in each example 2017-05-26 03:45:20 -04:00
Israel Garcia 2a0d9ec2bf remove horsey autocomplete 2017-05-26 03:34:36 -04:00
Israel Garcia ae287d48e9 Autocomplete integrated and 3 samples. 2017-05-26 03:32:01 -04:00
Israel Garcia 75ecd91593 Renaming properties templates 2017-05-23 20:21:30 -04:00
Israel Garcia 8a96f06df4 Renaming properties templates 2017-05-23 20:18:39 -04:00
Israel Garcia 1b998c5b1a Renaming properties templates 2017-05-23 20:06:07 -04:00
Israel Garcia 26a1a84602 Add Horsey autocomplete example 2017-05-17 01:15:13 -04:00
Israel Garcia 1393b148db Autocomplete final refactory 2017-05-16 02:20:30 -04:00
Israel Garcia 131e8f106d custom autocomplete working 2017-05-15 00:31:20 -04:00
jos 0ddc9407b0 Updated history and example. Fixed bottom margin of submenu 2017-05-07 15:32:31 +02:00
Israel Garcia 3a9e55b3ae Support for Template Items 2017-05-05 04:36:13 -04:00
jos 56c450bf0f Released v5.6.0 2017-04-15 12:28:46 +02:00
Walker Randolph Smith c0b7139fd2 #382 Rename example file. 2017-04-12 11:51:50 -04:00
Walker Randolph Smith 2c72173366 #382 Read only text mode. 2017-04-12 11:51:50 -04:00
jos 8dc4752872 Fixed embedded version of jsoneditor ace theme not being loaded in minimalist version. Added docs and example on loading a custom Ace editor (see #55) 2017-01-03 20:23:03 +01:00
Rubén de Celis Hernández 9bf3e37153 Added save dialog 2016-06-03 19:32:21 +02:00
jos aeca44405e Released v5.2.0 2016-03-20 18:19:13 +01:00
jos 1f64fe6e9c Fixed broken example 04_load_and_save.html. See #265 2016-02-09 10:05:11 +01:00
jos e16770ebc2 Improved error messaging for enums 2016-01-14 21:10:30 +01:00
jos a2b84b2dd8 Updated readme, docs, added example 2016-01-12 12:40:23 +01:00
jos 296b857761 Updated darktheme example 2015-12-31 13:35:10 +01:00
jos ffcae51cd3 Fixed another css issue 2015-12-27 21:46:53 +01:00
jos 11ba59fb83 Fixed a css issue 2015-12-27 21:44:22 +01:00
jos 301e33983c Renamed all CSS classes They now have prefixes `.jsoneditor-` to prevent name collisions with css frameworks like bootstrap. 2015-12-27 21:43:18 +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 755190417c Released version 4.2.0 2015-05-14 21:29:35 +02:00
jos 12214f930a Moved the distribution files from root to the ./dist folder 2015-02-28 20:47:23 +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
jos 1133024ae7 Implemented setting editable/readonly nodes individually via config function `editable` 2014-07-27 15:46:42 +02:00
jos bb53153d3b Added an example showing how to load/save local files 2014-07-21 21:04:11 +02:00
jos d6da7f548e Refactored JSONEditor sourcecode to AMD modules 2014-05-29 22:13:37 +02:00
jos 6eea2b6335 Renamed files to match the contained prototype 2014-05-29 18:51:17 +02:00
jos 4eae0cff1f Loading assets Ace Editor and JSONLint via npm. Auto build assets. 2014-05-29 18:35:39 +02:00
josdejong 8e07ebb711 Switched everything to 2-space indentation 2013-11-15 18:11:50 +01:00
josdejong 5a7a76cf0b Implemented option modes 2013-08-27 22:50:20 +02:00
josdejong 7f91c88150 Added an example showing mode switching 2013-05-04 11:34:02 +02:00
josdejong 9d5aab339b Moved ace and jsonlint libraries to the root 2013-05-04 10:12:37 +02:00
josdejong b287c4bfbc Replaced ant build script with jake build script. Files moved around. Created package.json and component.json 2013-05-03 22:55:15 +02:00