Hello Ivan, I don't think that you'll need IMultiLineText and MultiLineText. That's why IText and Text are there for. You'll have to register the widget for IText or use it directly in your view with CustomWidgetFactory.
In fact it's a good question why Z3 doesn't provide such a widget for Text. The current widget is just Displaywidget which eats the newlines. BTW: "<br \>" should be "<br />" Wednesday, March 14, 2007, 9:30:19 AM, you wrote: > Darryl, Frank, > thank you your answers, but finally i keep the widget solution > instead of TextAreaWidget i inherited my widget from DisplayWidget, and > of course used your replace solution. > class IMultiLineText(IText): > """this field will be used for the comment because of the correct > display of html tags""" > > pass > class MultiLineText(Text): > """the field implementation""" > implements(IMultiLineText) > > class MultiLineTextWidget(DisplayWidget): > """the widget to display the description""" > def __call__(self): > return super(MultiLineTextWidget, > self).__call__().replace("\n","<br \>") > Darryl Cousins wrote: >> On Fri, 2007-03-09 at 10:06 +0100, Ivan Horvath wrote: >> >>> - modify the description widget data with >>> PlainTextToHTMLRenderer.render(), but then in the browser i can see >>> only >>> encoded chars instead of <br> >>> >> >> Hi, >> >> As for Frank's suggestion try: >> >> <p tal:content="structure view/description" /> >> >> when rendering the text2html content. That should allow the html tags >> through. >> >> Regards, >> Darryl >> >> >> >> -- Best regards, Adam mailto:[EMAIL PROTECTED] _______________________________________________ Zope3-users mailing list Zope3email@example.com http://mail.zope.org/mailman/listinfo/zope3-users