josdejong / svelte-jsoneditor

A web-based tool to view, edit, format, repair, query, transform, and validate JSON
https://jsoneditoronline.org
Other
818 stars 108 forks source link

How to Expand Back to Entire Tree? #273

Closed captquin closed 1 year ago

captquin commented 1 year ago

I'm a complete noob here. Trying to edit a file by cutting and pasting values from a spread sheet. I was going right along, but must have mis-clicked something. The tree collapsed to that single entry and I cant figure out how to get back to where it shows the full hierarchy.

I need to "drill up" from the item on the first image below and get back to the view on the second image.

I'm sure it's sure it's a simple solution and would appreciate the assist.

image image
josdejong commented 1 year ago

Good question 😄

By default the editor expands small documents fully, and in case of large documents it expands the first few levels. To expand a collapsed document, here some suggestions:

  1. You can toggle to a different mode and back, click "text" and then click "tree" again.
  2. You can select all content with Ctrl+A, cut it with Ctrl+X, and then paste it again with Ctrl+V
  3. You can Ctrl+Click to expand the full document. If you have a very large document this may be slow to render though
  4. In some cases it will work to click undo and then redo to restore the previous expanded state.
captquin commented 1 year ago

Thank you!