diff --git a/README.md b/README.md index e95669e..a107548 100755 --- a/README.md +++ b/README.md @@ -327,6 +327,10 @@ $('.markdownx').on('markdownx.update', function(e, response) { # Changelog +###### v1.7.1 + +* Fix for custom CSS classes in the widget + ###### v1.7 * SVG file upload support diff --git a/markdownx/widgets.py b/markdownx/widgets.py index 2a2c2be..69e6de9 100755 --- a/markdownx/widgets.py +++ b/markdownx/widgets.py @@ -12,9 +12,10 @@ from .settings import ( class MarkdownxWidget(forms.Textarea): def render(self, name, value, attrs=None): - if attrs is None: - attrs = {} - elif 'class' in attrs: + attrs = self.build_attrs(attrs, name=name) + print(attrs) + + if 'class' in attrs: attrs['class'] += ' markdownx-editor' else: attrs.update({'class':'markdownx-editor'}) diff --git a/setup.py b/setup.py index deaa54d..1894683 100755 --- a/setup.py +++ b/setup.py @@ -10,7 +10,7 @@ def get_requirements(): setup( name='django-markdownx', - version='1.7', + version='1.7.1', packages=find_packages(), include_package_data=True, description='django-markdownx is a Markdown editor built for Django.',