forked from expo/troggle
Added help writing HTML in the cave editing form. Made the HTML previews optional
This commit is contained in:
@@ -134,10 +134,10 @@ class NewWebImageForm(forms.Form):
|
||||
class HTMLarea(forms.Textarea):
|
||||
template_name = "widgets/HTMLarea.html"
|
||||
def __init__(self, *args, **kwargs):
|
||||
self.iframeattrs = kwargs.pop('iframeattrs')
|
||||
self.preview = kwargs.pop('preview', False)
|
||||
super(forms.Textarea, self).__init__(*args, **kwargs)
|
||||
def get_context(self, name, value, attrs):
|
||||
c = super(forms.Textarea, self).get_context(name, value, attrs)
|
||||
c["iframe"] = {"attrs": self.iframeattrs}
|
||||
c["preview"] = self.preview
|
||||
return c
|
||||
|
||||
|
||||
Reference in New Issue
Block a user