I'm trying to add formatted json string to my textarea field. But it doesn't work.
I'm formatting string using this approach: How can I beautify JSON programmatically?
and then just call
textarea.setValue(formattedJson);
Check the snapshot of result:
Is it poosible to get correctly formatted string in the textarea?