equal
deleted
inserted
replaced
20 from pyams_content.component.paragraph.interfaces.header import IHeaderParagraph |
20 from pyams_content.component.paragraph.interfaces.header import IHeaderParagraph |
21 from pyams_content.features.checker.interfaces import IContentChecker, MISSING_VALUE, MISSING_LANG_VALUE |
21 from pyams_content.features.checker.interfaces import IContentChecker, MISSING_VALUE, MISSING_LANG_VALUE |
22 from pyams_i18n.interfaces import II18n, II18nManager, INegotiator |
22 from pyams_i18n.interfaces import II18n, II18nManager, INegotiator |
23 |
23 |
24 # import packages |
24 # import packages |
25 from pyams_content.component.paragraph import BaseParagraph, BaseParagraphContentChecker |
25 from pyams_content.component.paragraph import BaseParagraph, BaseParagraphContentChecker, BaseParagraphFactory |
26 from pyams_utils.adapter import adapter_config |
26 from pyams_utils.adapter import adapter_config |
27 from pyams_utils.registry import utility_config, get_utility |
27 from pyams_utils.registry import utility_config, get_utility |
28 from pyams_utils.text import get_text_start |
28 from pyams_utils.text import get_text_start |
29 from pyams_utils.traversing import get_parent |
29 from pyams_utils.traversing import get_parent |
30 from zope.interface import implementer |
30 from zope.interface import implementer |
47 |
47 |
48 header = FieldProperty(IHeaderParagraph['header']) |
48 header = FieldProperty(IHeaderParagraph['header']) |
49 |
49 |
50 |
50 |
51 @utility_config(name='Header', provides=IParagraphFactory) |
51 @utility_config(name='Header', provides=IParagraphFactory) |
52 class HTMLParagraphFactory(object): |
52 class HTMLParagraphFactory(BaseParagraphFactory): |
53 """HTML paragraph factory""" |
53 """HTML paragraph factory""" |
54 |
54 |
55 name = _("Header paragraph") |
55 name = _("Header paragraph") |
56 content_type = HeaderParagraph |
56 content_type = HeaderParagraph |
57 |
57 |