neutronX / django-markdownx

Comprehensive Markdown plugin built for Django
https://neutronx.github.io/django-markdownx/
Other
863 stars 153 forks source link

Fix missing attributes in widget rendering context #137

Closed destos closed 6 years ago

destos commented 6 years ago

fixes #99

adi- commented 6 years ago

Already implemented

destos commented 6 years ago

@adi- Could you clarify where this is implemented? I'm not seeing a fix in the latest release. This change allows html attributes to be set on the widget html. Where before they are getting discarded. This is useful for styling the widget in custom layouts for the live preview feature.

adi- commented 6 years ago

Damn, @destos my fault. I would promise that I have already pull those fixes from other PRs. I am really sorry.

Could you update your PR with recent code from repo's master branch? Also, could you check this PR https://github.com/neutronX/django-markdownx/pull/118 into consideration? I can't verify it right now, but it seems to be a very close problem.

adi- commented 6 years ago

Ok, your fix is in repo now.

adi- commented 6 years ago

Please also check #118

destos commented 6 years ago

@adi- Thanks for merging it. I had originally looked at #118 but noticed it ignores the attributes that render may be attempting to add. In this PR I made sure it adds the regular widget attrs, and then have markdownx process them and add it's own. As I noticed add_markdownx_attrs checks for existing attrs in some cases before adding its own. Especially around CSS classes.

adi- commented 6 years ago

Great! I will push this fix to PyPi later today.

adi- commented 6 years ago

Pushed to v2.0.26