Reputation: 33
while using django-ckeditor for my website, i want to set the 'placeholder' property for the editor
I've tried to work directly in settings.py like this :
CKEDITOR_CONFIGS = {
'default': {
...
'extraPlugins': ','.join(['placeholder']),
'placeholder': 'blabla'
},
}
and i tried this in my_app/forms.py:
widgets = {
'body': forms.Textarea(attrs={'placeholder': 'blabla'})
}
but it didn't work! what should i do?
Upvotes: 2
Views: 492
Reputation: 53
Use editorplaceholder
key
CKEDITOR_CONFIGS = {
'default': {
...
'extraPlugins': ','.join(['placeholder']),
'editorplaceholder': 'blabla'
},
}
Upvotes: 1