mirror of
https://github.com/Hopiu/django-markdownx.git
synced 2026-03-16 21:40:24 +00:00
Merge pull request #201 from jagaudin/Avoid-duplicate-html-class
Fixed duplicate ``markdownx-editor`` class on widget
This commit is contained in:
commit
d59fc2ffea
1 changed files with 2 additions and 1 deletions
|
|
@ -61,7 +61,8 @@ class MarkdownxWidget(forms.Textarea):
|
|||
:rtype: dict
|
||||
"""
|
||||
if 'class' in attrs.keys():
|
||||
attrs['class'] += ' markdownx-editor'
|
||||
if 'markdownx-editor' not in attrs['class']:
|
||||
attrs['class'] += ' markdownx-editor'
|
||||
else:
|
||||
attrs.update({
|
||||
'class': 'markdownx-editor'
|
||||
|
|
|
|||
Loading…
Reference in a new issue