#NEWLINE# def render( self , name , value , attrs = None ) : #NEWLINE# #INDENT# html = super ( MarkItUpWidget , self ) . render ( name , value , attrs ) #NEWLINE# final_attrs = self . build_attrs ( attrs ) #NEWLINE# try : #NEWLINE# #INDENT# preview_url = reverse ( 'markitup_preview' ) #NEWLINE# #UNINDENT# except NoReverseMatch : #NEWLINE# #INDENT# preview_url = '' #NEWLINE# #UNINDENT# html += render_to_string ( 'markitup/editor.html' , { #NEWLINE# #INDENT# 'textarea_id' : final_attrs [ 'id' ] , #NEWLINE# 'AUTO_PREVIEW' : self . auto_preview , #NEWLINE# 'preview_url' : preview_url , #NEWLINE# #UNINDENT# } ) #NEWLINE# return mark_safe ( html )