neutronX / django-markdownx

Comprehensive Markdown plugin built for Django
https://neutronx.github.io/django-markdownx/
Other
854 stars 153 forks source link

How to customize the textarea cols #253

Open ppvan opened 1 year ago

ppvan commented 1 year ago

I have read the docs, try to override the default widget, but the cols does not change.

# models.py
content = MarkdownxField()
# forms.py
widgets = {
            "content": forms.Textarea(attrs={"cols": 60}),
}

Does not seems to work. I read #158 but still don't know how to change the cols

I ended up using javascript to change it, but waiting for the proper way

adi- commented 11 months ago

Do you want to get custom functionality? By default, markdownx automatically sets the textarea height to the text height.

ppvan commented 11 months ago

What do you mean? I want to set the width of the textarea (cols), not the height. I think it's a good customization because we can't set cols with css (do we?)