Commits

Anonymous committed b54d565

fixed using custom attributes in MarkItUpWidget

Comments (0)

Files changed (1)

markitup/widgets.py

     def render(self, name, value, attrs=None):
         html = super(MarkItUpWidget, self).render(name, value, attrs)
 
+        final_attrs = self.build_attrs(attrs)
+
         if self.auto_preview:
             auto_preview = "$('a[title=\"Preview\"]').trigger('mouseup');"
         else: auto_preview = ''
           });
           })(jQuery);
         </script>
-        """ % {'id': attrs['id'], 'auto_preview': auto_preview,
+        """ % {'id': final_attrs['id'], 'auto_preview': auto_preview,
                'preview_url': preview_url}
 
         return mark_safe(html)