# Multi-lines text-input area

**URL:** <https://discourse.nodered.org/t/multi-lines-text-input-area/82056>\
**Category:** Dashboard\
**Created:** [15 October 2023 18:59 UTC](https://discourse.nodered.org/t/multi-lines-text-input-area/82056 "2023-10-15T18:59:24Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![JeromeVISUALS](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jeromevisuals/32/40103_2.png) [@JeromeVISUALS](https://discourse.nodered.org/u/JeromeVISUALS)\
**Post date:** [15 October 2023 18:59 UTC](https://discourse.nodered.org/t/multi-lines-text-input-area/82056/1 "2023-10-15T18:59:24Z")

</div>

Hi There.

I searched a bit but could not find any useful answer yet. I'd like to get a text entry area in DB, in which I could put some content using any copy/paste, or get some pre-populated content which might be edited before sending over in the workflow.

Kind of text I would like to paste is a SDP file, like this :

v=0  
o=jdoe 2890844526 2890842807 IN IP4 10.47.16.5  
s=SDP Seminar  
i=A Seminar on the session description protocol  
u=[http://www.example.com/seminars/sdp.pdf](http://www.example.com/seminars/sdp.pdf)  
[e=j.doe@example.com](mailto:e=j.doe@example.com) (Jane Doe)  
c=IN IP4 224.2.17.12/127  
t=2873397496 2873404696  
a=recvonly  
m=audio 49170 RTP/AVP 0  
m=video 51372 RTP/AVP 99  
a=rtpmap:99 h263-1998/90000

Does anyone have any suggestion ?

Thanks !

Jerome

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [15 October 2023 19:20 UTC](https://discourse.nodered.org/t/multi-lines-text-input-area/82056/2 "2023-10-15T19:20:47Z")

</div>

Maybe this topic will help

> [@Textbox/Textarea, value to msg.payload](https://discourse.nodered.org/t/textbox-textarea-value-to-msg-payload/81860/2):
>
> A simple example using ng-model to send the new value. The text is sent using ng-blur, when focus is removed from textarea Example flow. [{"id":"b27417c585ab35ad","type":"inject","z":"c31640d81bf733c7","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"some text","payloadType":"str","x":100,"y":240,"wires":[["6b78b0928f5889d2"]]},{"id":"6b78b0928f5889d2","type":"ui\_template","z":"c31640d81bf733c7","group":"4…

---

<div class="post-metadata">

**Author:** ![JeromeVISUALS](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jeromevisuals/32/40103_2.png) [@JeromeVISUALS](https://discourse.nodered.org/u/JeromeVISUALS)\
**Post date:** [15 October 2023 20:59 UTC](https://discourse.nodered.org/t/multi-lines-text-input-area/82056/3 "2023-10-15T20:59:49Z")

</div>

Nice ! will give it a try.

Thanks a lot

---

<div class="post-metadata">

**Author:** ![JeromeVISUALS](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jeromevisuals/32/40103_2.png) [@JeromeVISUALS](https://discourse.nodered.org/u/JeromeVISUALS)\
**Post date:** [15 October 2023 22:50 UTC](https://discourse.nodered.org/t/multi-lines-text-input-area/82056/4 "2023-10-15T22:50:44Z")

</div>

Hi,

I tried this and looks close to what I want to achieve, thanks for that.

From waht I could see, it will send the payload as soon as we change something in the box. What would be the best way to edit text and then have some kind of Enter/validate button once edit is done, to send the content as payload ?

Thanks

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [15 October 2023 23:57 UTC](https://discourse.nodered.org/t/multi-lines-text-input-area/82056/5 "2023-10-15T23:57:20Z")

</div>

Store the text value in flow or global context variable using a change node.

Add a ui-button node. Wire that too another change node to grab the stored context value and put it into payload.

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [16 October 2023 07:46 UTC](https://discourse.nodered.org/t/multi-lines-text-input-area/82056/6 "2023-10-16T07:46:38Z")

</div>

You could also add a button node, then join the two nodes as key value object using topic on each node with a count 2 and ever subsequent checked. After join add a switch node to only pass the button topic on. You would then get an object containing the latest textarea output and the button output.

There are many examples of this on the forum.

---

<div class="post-metadata">

**Author:** ![JeromeVISUALS](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jeromevisuals/32/40103_2.png) [@JeromeVISUALS](https://discourse.nodered.org/u/JeromeVISUALS)\
**Post date:** [16 October 2023 08:24 UTC](https://discourse.nodered.org/t/multi-lines-text-input-area/82056/7 "2023-10-16T08:24:13Z")

</div>

Thanks to oyu both, I'll test that .

Jerome

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [3 November 2023 13:47 UTC](https://discourse.nodered.org/t/multi-lines-text-input-area/82056/8 "2023-11-03T13:47:27Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
