I am trying to create an input form field which can take text, images or videos as we see in Twitter.
I am trying the following:
from django import forms
from .models import Tweet
class TweetModelForm(forms.ModelForm):
content = forms.CharField(label='',
widget=forms.Textarea(
attrs={'placeholder': "Your message",
"class": "form-control"}
))
Which produces 
However, I am trying to use the same input box so that user can upload image, video, GIFs or just type text in the box. I am not sure how to modify the above form field.
Edit: If it is not possible using Django, can this be done using HTML5?

You should use a WYSIWYG Editor for that like Froala Editor
Usage
from django import forms
from froala_editor.widgets import FroalaEditor
class PageForm(forms.ModelForm):
content = forms.CharField(widget=FroalaEditor)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With