Commit 74965519 authored by Gabriel Monnerat's avatar Gabriel Monnerat

add Xinha option and implement code to render xinha view

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@39191 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 75988384
......@@ -70,7 +70,8 @@ class EditorWidget(Widget.TextAreaWidget):
size=1,
items=[('Standard Text Area', 'text_area'),
('FCK Editor', 'fck_editor'),
('Bespin Editor', 'bespin')])
('Bespin Editor', 'bespin'),
('Xinha Editor', 'xinha')])
def render(self, field, key, value, REQUEST, render_prefix=None):
"""
......@@ -93,6 +94,16 @@ class EditorWidget(Widget.TextAreaWidget):
'inputvalue' : value,
'inputname' : key
})
elif text_editor == "xinha":
xinha_support = getattr(here, 'xinha_support', None)
if xinha_support is None:
return Widget.TextAreaWidget.render(self, field, key, value, REQUEST)
return xinha_support.pt_render(
extra_context= {
'field' : field,
'field_value' : value,
'field_name' : key
})
else:
return here.fckeditor_wysiwyg_support.pt_render(
extra_context= {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment