Patch to add WysiwygField type
--- Formulator/StandardFields.py.orig 2004-02-19 03:19:18.000000000 +0800
+++ Formulator/StandardFields.py 2004-06-15 11:49:29.000000000 +0800
@@ -71,6 +71,12 @@
widget = Widget.TextAreaWidgetInstance
validator = Validator.StringValidatorInstance
+class WysiwygField(ZMIField):
+ meta_type = "WysiwygField"
+
+ widget = Widget.WysiwygWidgetInstance
+ validator = Validator.TextValidatorInstance
+
class ListField(ZMIField):
meta_type = "ListField"
--- Formulator/Widget.py.orig 2004-06-15 10:18:54.000000000 +0800
+++ Formulator/Widget.py 2004-06-15 11:52:28.000000000 +0800
@@ -268,6 +268,24 @@
TextAreaWidgetInstance = TextAreaWidget()
+class WysiwygWidget(TextAreaWidget):
+
+ width = fields.IntegerField('width',
+ title='Width',
+ description=(
+ "The width (columns) in characters."),
+ default=80,
+ required=0)
+
+ height = fields.IntegerField('height',
+ title="Height",
+ description=(
+ "The height (rows) in characters."),
+ default=25,
+ required=0)
+
+WysiwygWidgetInstance = WysiwygWidget()
+
class LinesTextAreaWidget(TextAreaWidget):
property_names = Widget.property_names +\
['width', 'height', 'view_separator', 'extra']
--- Formulator/__init__.py.orig 2004-02-19 03:19:18.000000000 +0800
+++ Formulator/__init__.py 2004-06-15 11:45:16.000000000 +0800
@@ -34,6 +34,8 @@
'www/TextAreaField.gif')
FieldRegistry.registerField(StandardFields.RawTextAreaField,
'www/TextAreaField.gif')
+ FieldRegistry.registerField(StandardFields.WysiwygField,
+ 'www/TextAreaField.gif')
FieldRegistry.registerField(StandardFields.LinesField,
'www/LinesField.gif')
FieldRegistry.registerField(StandardFields.ListField,
+++ Formulator/StandardFields.py 2004-06-15 11:49:29.000000000 +0800
@@ -71,6 +71,12 @@
widget = Widget.TextAreaWidgetInstance
validator = Validator.StringValidatorInstance
+class WysiwygField(ZMIField):
+ meta_type = "WysiwygField"
+
+ widget = Widget.WysiwygWidgetInstance
+ validator = Validator.TextValidatorInstance
+
class ListField(ZMIField):
meta_type = "ListField"
--- Formulator/Widget.py.orig 2004-06-15 10:18:54.000000000 +0800
+++ Formulator/Widget.py 2004-06-15 11:52:28.000000000 +0800
@@ -268,6 +268,24 @@
TextAreaWidgetInstance = TextAreaWidget()
+class WysiwygWidget(TextAreaWidget):
+
+ width = fields.IntegerField('width',
+ title='Width',
+ description=(
+ "The width (columns) in characters."),
+ default=80,
+ required=0)
+
+ height = fields.IntegerField('height',
+ title="Height",
+ description=(
+ "The height (rows) in characters."),
+ default=25,
+ required=0)
+
+WysiwygWidgetInstance = WysiwygWidget()
+
class LinesTextAreaWidget(TextAreaWidget):
property_names = Widget.property_names +\
['width', 'height', 'view_separator', 'extra']
--- Formulator/__init__.py.orig 2004-02-19 03:19:18.000000000 +0800
+++ Formulator/__init__.py 2004-06-15 11:45:16.000000000 +0800
@@ -34,6 +34,8 @@
'www/TextAreaField.gif')
FieldRegistry.registerField(StandardFields.RawTextAreaField,
'www/TextAreaField.gif')
+ FieldRegistry.registerField(StandardFields.WysiwygField,
+ 'www/TextAreaField.gif')
FieldRegistry.registerField(StandardFields.LinesField,
'www/LinesField.gif')
FieldRegistry.registerField(StandardFields.ListField,