Login

Django filter stack to cleanup WYSIWYG output

Author:
jbergantine
Posted:
August 31, 2011
Language:
HTML/template
Version:
1.3
Score:
1 (after 1 ratings)

Django Template Tag Filter stack to clean up output from widgEditor or other WYSIWYG text-input box. Removes arbitrary line break code and replaces with Django's cleaner |linebreaks filter. Also removes any arbitrary styling, leaving in things like bold, italic, link and image tags.

1
{{ value|removetags:"br div p span style"|safe|linebreaks }}

More like this

  1. Bootstrap Accordian by Netplay4 5 years, 10 months ago
  2. Bootstrap theme for django-endless-pagination? by se210 8 years, 10 months ago
  3. Bootstrap theme for django-endless-pagination? by se210 8 years, 10 months ago
  4. Reusable form template with generic view by roldandvg 8 years, 11 months ago
  5. Pagination Django with Boostrap by guilegarcia 9 years, 1 month ago

Comments

Please login first before commenting.