Commit Graph

11 Commits

Author SHA1 Message Date
Jos de Jong 2a861a2868 Defined charset="utf-8" and lang="en" in all examples 2020-09-23 10:23:38 +02:00
jos 6bfede956b Rewrite code styling of browser examples 2019-08-29 15:45:32 +02:00
jos 745a4f3665 Implement validation in mode `"preview"` 2019-07-24 13:30:44 +02:00
jos 10daf40b56 Use JSON schema title as name for the root object if defined (see #635) 2019-06-12 15:43:16 +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
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
Meir Rotstein b77deb969c add support for json schema references ($ref) 2017-07-05 00:28:28 +03: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