surveyjs / survey-creator

Scalable open-source survey software to generate dynamic JSON-driven forms within your JavaScript application. The form builder features a drag-and-drop UI, CSS Theme Editor, and GUI for conditional logic and form branching.
https://surveyjs.io/open-source
Other
898 stars 373 forks source link

Preserve line breaks entered in multi-line property editors #5185

Closed JaneSjs closed 7 months ago

JaneSjs commented 7 months ago

Because when I edit the description of the design surface, after unfocusing, it replaces the "\n" in the string with a space. I'm not sure if this is normal behavior, but to prevent it from happening, I would like to disable the description.

If you want to stick to a textarea support to display the entered linebreaks should be added! How should the user know that his entered linebreak is not supported for the displayed text? Everyone would call that a bug if there is no visible information that a linebreak is not supported.


Issue A user enters a survey description within the property grid editor, which allows line breaks. image

However, in preview or within the inplace editor, a description doesn't preserve line breaks. image image

Possible options to handle this:

novikov82 commented 7 months ago

spike - https://github.com/surveyjs/survey-creator/compare/issue/5185-Survey-Description-Property-Editor-allows-entering-new-lines-which-are-further-eliminated-in-preview?expand=1

AndOne1974 commented 7 months ago

Good News: 1) Linebreaks can be entered. 2) They can be entered directly or in the right sidebar. 3) Pasted linebreaks are not removed.

Bad news: In the survey edit area linebreaks can only be entered via . Normal removes the focus from the description field. This is unusable, because (Line break instead of paragraph) is not known to many users.