This is more of an OCD issue than a bug . I like to use the ‘Format Selection’ and ‘Format Document’ when in Code View. As an example, the issue is that the code within the INPUT tag shown should stay as (not sure how else to describe this ) one paragraph, but when I use ‘Format Selection’ or ‘Format Document’ the code for the INPUT tag gets broken up into 3 paragraphs.
This happens randomly throughout each document it is applied to. And happens to any and all tags.
I would be great to have an option which does not add new lines that break a tag.
I am not sure which of the HTML Format Config option would work here for Wappler, but it would certainly be a great UX update.
I see that we actually already set the wrapLineLength to 250, default is 120. Is the line where the attribute is placed on the next line longer then 250 characters?
Hi Patrick, just having had a very brief look, it seems that the wrapLineLength makes sense.
Although it will break apart a tag, it won’t break apart an attribute of that tag, so I have come across some single attributes that are still 400 to 500 characters long.
I have quite a few tags which are over 1000 characters long, especially when there are plenty of dmx attributes and multi-layered ternary operations.
In an ideal world I would like to be able to set that wrapLineLength to whatever I want, even having a noLimit as an option.
Also, is there an option to set every attribute to start on it’s own line. Perhaps being able to toggle it on and off? That would be a great option for me.
Looking through the options information on the https://microsoft.github.io/monaco-editor link you sent through, I wouldn’t have a clue as to which bits do what. It’s not clear to me.
There is no documentation that describes what these options do. I will do some testing with them and place the useful options in the options menu of Wappler.
There is not an option for the format document that keeps the attributes on the tag when you have wrap lines enabled. The best I can do is making all the options of the formatting available in the Wappler settings so that you have a bit more control over it.