diff --git a/src/unfold/templates/unfold/widgets/textarea.html b/src/unfold/templates/unfold/widgets/textarea.html index 5157f7903..d35bedb5e 100644 --- a/src/unfold/templates/unfold/widgets/textarea.html +++ b/src/unfold/templates/unfold/widgets/textarea.html @@ -1,7 +1 @@ -
- - - -
+ diff --git a/src/unfold/templates/unfold/widgets/textarea_expandable.html b/src/unfold/templates/unfold/widgets/textarea_expandable.html new file mode 100644 index 000000000..5157f7903 --- /dev/null +++ b/src/unfold/templates/unfold/widgets/textarea_expandable.html @@ -0,0 +1,7 @@ +
+ + + +
diff --git a/src/unfold/widgets.py b/src/unfold/widgets.py index 639a5bd6e..f3f4b51c6 100644 --- a/src/unfold/widgets.py +++ b/src/unfold/widgets.py @@ -358,6 +358,20 @@ def __init__( class UnfoldAdminTextareaWidget(AdminTextareaWidget): template_name = "unfold/widgets/textarea.html" + def __init__(self, attrs: Optional[Dict[str, Any]] = None) -> None: + attrs = attrs or {} + + super().__init__( + attrs={ + "class": "vLargeTextField " + " ".join(TEXTAREA_CLASSES), + **(attrs or {}), + } + ) + + +class UnfoldAdminExpandableTextareaWidget(AdminTextareaWidget): + template_name = "unfold/widgets/textarea.html" + def __init__(self, attrs: Optional[Dict[str, Any]] = None) -> None: attrs = attrs or {}