josdejong / svelte-jsoneditor

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

long string overflowed the vertical gray line when wrap #228

Closed XueMeijing closed 9 months ago

XueMeijing commented 1 year ago

Hi, Thanks for ur work.However, it seemes there are still two issue exist in 0.14.9. First, in text mode, long string overflowed the vertical gray line when wrap. The long string is in one node In successor, but it divide into muti nodes in classic.

image

The other is about plain obj and array when format. It works normal when parser is default. But when i changed it into LosslessJSONParser, plain obj and array expand again like https://github.com/josdejong/svelte-jsoneditor/issues/220 What shuold i do to solve this ?

josdejong commented 1 year ago

About the LosslessJSONParser: can it be that you're not using the latest version 2.0.6? The formatting issue was fixed in that version.

That text wrapping doesn't look very neat, with the indentation lines overlapping it. I guess we'll have to see if it is possible to customize CodeMirror to apply indentation to the wrapped lines, like discussed here: https://discuss.codemirror.net/t/making-codemirror-6-respect-indent-for-wrapped-lines/2881/3

Help would be welcome.

XueMeijing commented 1 year ago

yeah! When i upgraded LosslessJSONParser to 2.0.6 it works great!

I have debuged about text wrapping, but i haven't find a workaround yet, i'll try latter