Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to customize the textarea cols #253

Open
ppvan opened this issue Apr 28, 2023 · 2 comments
Open

How to customize the textarea cols #253

ppvan opened this issue Apr 28, 2023 · 2 comments

Comments

@ppvan
Copy link

ppvan commented Apr 28, 2023

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-
Copy link
Member

adi- commented Nov 5, 2023

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

@ppvan
Copy link
Author

ppvan commented Nov 5, 2023

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?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants