Sidechair

input.text_area()

Browse the reference

Adds a multi-line text setting to the script and returns its content as one string.

Try it in the editor

input.text_area returns the text the user typed into a larger box, line breaks included, starting at defval. It suits notes, lists of symbols and message templates.

Split the result on a separator with str.split to work with it line by line.

Syntax

Pine Script
input.text_area(defval: const string, title: const string (optional), tooltip: const string (optional), group: const string (optional), confirm: const bool (optional), display: const plot_display (optional), active: input bool (optional)) -> input string

Arguments

NameTypeDefaultDescription
defvalconst stringrequiredDefault text. Line breaks are allowed.
titleconst stringnaName shown in the Settings dialog, the legend and the Data Window.
tooltipconst stringnaText shown in a tooltip beside the input in the Settings dialog.
groupconst stringnaHeading the input is listed under in the Settings dialog.
confirmconst boolfalseWhen true, the script asks for this value when it is first added to the chart.
displayconst plot_displaydisplay.allWhere the value appears: a display.* constant or a combination of them.
activeinput booltrueWhen false, the input is greyed out and cannot be edited.

Returns

input string: the entered text.

Remarks

  • The inline argument does not exist here; the box always takes a full row.
  • On Sidechair: confirm, display and active are accepted and ignored.

Example

Pine ScriptA note on the chartOpen in editor
//@version=6
indicator("Note", overlay = true)
note = input.text_area("Check earnings date", "Note")
if barstate.islast
    label.new(bar_index, high, note, style = label.style_label_down, color = color.yellow)

See also

Runs on Sidechair