mirror of
https://github.com/Hopiu/django-markdownx.git
synced 2026-05-11 23:03:08 +00:00
Fix for custom CSS classes in the widget
v.1.7.1
This commit is contained in:
parent
d915284e41
commit
87933b55e7
3 changed files with 9 additions and 4 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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'})
|
||||
|
|
|
|||
2
setup.py
2
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.',
|
||||
|
|
|
|||
Loading…
Reference in a new issue