I use Telegram node to send a message and wait for response. The user should receive my json and edit it. Since default form doesn’t have initial value field, I am trying to use a custom form defined as JSON: [ { “fieldType”: “html”, “elementName”: “content”, “html”: “<textarea>{{ $json }}</textarea>” } ]
So, I should have a JSON inside of JSON. I tried different options to escape the $json, like: jsonStringify, `JSON.stringify(), `| escape`, `replace()` to replace “ with ‘ or to replace`” with \”, but none of them worked for me.
What is the right way to do what I need? Ideally the textarea should contain the value as is (i.e. double quotes instead of single).
By default, Custom HTML fields are not includeed in the form output because they re display-only. If yu set an ‘elementName”, n8n will include the raw HTML under that name in the output itemn…
Its pourpose is to decide whether (and under what key)) the HTML content should appear in the node’s output data.
I managed to get it working with the following replacements: (omg, I can not insert the code properly; the forum engine replaces my double quotes and double slashes with something else, even if it part of the code)