defmodule Backpex.Fields.Textarea do @config_schema [ placeholder: [ doc: "Placeholder value or function that receives the assigns.", type: {:or, [:string, {:fun, 1}]} ], debounce: [ doc: "Timeout value (in milliseconds), \"blur\" or function that receives the assigns.", type: {:or, [:pos_integer, :string, {:fun, 1}]} ], throttle: [ doc: "Timeout value (in milliseconds) or function that receives the assigns.", type: {:or, [:pos_integer, {:fun, 1}]} ], rows: [ doc: "Number of visible text lines for the control.", type: :non_neg_integer, default: 2 ], readonly: [ doc: "Sets the field to readonly. Also see the [panels](/guides/fields/readonly.md) guide.", type: {:or, [:boolean, {:fun, 1}]} ] ] @moduledoc """ A field for handling long text values. ## Field-specific options See `Backpex.Field` for general field options. #{NimbleOptions.docs(@config_schema)} """ use Backpex.Field, config_schema: @config_schema @impl Backpex.Field def render_value(assigns) do ~H"""
<%= HTML.pretty_value(@value) %>
""" end @impl Backpex.Field def render_form(assigns) do ~H"""