input_textarea.adoc 876 B

1234567891011121314151617181920212223242526
  1. [#arg-textarea]
  2. = Input: Textarea
  3. OliveTin supports multi-line text inputs, which can be useful for longer messages or scripts. You should set your argument `type` to `raw_string_multiline` to use these.
  4. As the name implies, textareas are raw, and are NOT validated by any regex. For that reason they **cannot** be used with `shell:` — use `exec:` so the value is a separate argv element.
  5. [source,yaml]
  6. .`config.yaml`
  7. ----
  8. actions:
  9. - title: Save text to file
  10. exec:
  11. - /bin/sh
  12. - -c
  13. - echo "$CONTENT" > file
  14. arguments:
  15. - type: raw_string_multiline
  16. name: content
  17. ----
  18. In that `exec:` example, `$CONTENT` comes from the process environment (OliveTin exports each argument as an uppercase env var), not from shell-string interpolation of the argument into `shell:`.
  19. This renders like this;
  20. image::args/textarea/multiline-text.png[]