# HG changeset patch # User Thierry Florac # Date 1543424975 -3600 # Node ID a57d4369f179cdd5f7202d5c6f64c5adea7aae2b # Parent 37a0b0a69b02852b0b0020c1adadd5769c0e0a75 Automatically apply "edito" class in paragraph preview diff -r 37a0b0a69b02 -r a57d4369f179 src/pyams_default_theme/component/paragraph/__init__.py --- a/src/pyams_default_theme/component/paragraph/__init__.py Wed Nov 28 17:53:42 2018 +0100 +++ b/src/pyams_default_theme/component/paragraph/__init__.py Wed Nov 28 18:09:35 2018 +0100 @@ -12,19 +12,14 @@ __docformat__ = 'restructuredtext' +from zope.interface import implementer -# import standard library - -# import interfaces from pyams_content.component.paragraph.interfaces import IBaseParagraph from pyams_content.features.preview.interfaces import IPreviewView from pyams_default_theme.layer import IPyAMSDefaultLayer -from pyams_utils.interfaces import VIEW_SYSTEM_PERMISSION - -# import packages from pyams_default_theme.page import BasePreviewPage from pyams_pagelet.pagelet import pagelet_config -from zope.interface import implementer +from pyams_utils.interfaces import VIEW_SYSTEM_PERMISSION @pagelet_config(name='preview.html', context=IBaseParagraph, layer=IPyAMSDefaultLayer, @@ -46,6 +41,6 @@ def render(self): if self.renderer is not None: - return self.renderer.render() + return '
{}
'.format(self.renderer.render()) else: return ''