jsoneditor icon indicating copy to clipboard operation
jsoneditor copied to clipboard

option to display warnings at the bottom by default

Open silviabaptista opened this issue 3 years ago • 3 comments

I was on version 5.14.0 and I'm trying to upgrade to the latest version and noticed that now the warnings are show inline instead of the bottom. Our json files are very large and auto generated so it's not user friendly to have to search through the entire file to find the problems.
I did just find that there is a count on the bottom right and when you click it shows the problems on the bottom, but is there a way to make it visible by default? The count at the bottom is not obvious.

silviabaptista avatar Aug 05 '21 16:08 silviabaptista

yes, that is indeed a good idea to improve on that, thanks.

So improvements can be:

  1. Implement an option to have the warnings expanded at the bottom by default
  2. Implement the warnings at the bottom for tree mode too (right now it's only available in code mode)

FYI: the successor of this library already has this :) see https://github.com/josdejong/svelte-jsoneditor/ and https://jsoneditoronline.org/beta/

Anyone interested in implementing these suggestions?

josdejong avatar Aug 07 '21 07:08 josdejong

As a workaround: there is an internal function which you could call to make the warnings visible at the bottom:

editor.errorTable.toggleTableVisibility()

WARNING: Please note that this is undocumented API, and may change without notice in a newer version.

josdejong avatar Aug 07 '21 07:08 josdejong

The above WAR is only available for text and preview modes, for others the editor doesn't have errorTable handle.

tkc17 avatar Oct 25 '21 16:10 tkc17