def textEditorPreview(request): field = TextEditorField( 'TextEditorField', title = 'Text edior field', description = 'Text editor field preview description', default = '<h2>Text editor</h2>' '<p>Test text in texteditor field.</p>', width = '200px') widget = field.bind(request, 'preview.', ptah.form.null, {}) widget.update() return widget.render_widget()