2014-03-31 45 views

回答

2

對於原型,您可以使用此片段。您可以使用allow_buttonsfilter_buttons。 (see the documentation for more details

讓我知道,如果WysiwygFieldWidget使用相同的選項:

atapi.TextField('text', 
    storage=atapi.AnnotationStorage(), 
    schemata=u'details', 
    required=False, 
    searchable=True, 
    validators=(('isTidyHtmlWithCleanup', V_REQUIRED), 
     ), 
    default_output_type='text/x-html-safe', 
    widget=atapi.RichWidget(
     label=_(u"Descriptive Text"), 
     description=_(u"Text describing the object in detail"), 
     redefine_parastyles=True, 
     parastyles=(
      'Heading 1|h2', 
      'Heading 2|h3'), 
     allow_buttons=('pasteword', 'style', 'bold', 'italic', 'bullist',), 
     #filter_buttons = ('save-button', 'bg-justify', 'definitionlist', 
     #     'tabledrawer-button', 'bg-remove', 'olstyles', 'zoom'), 
     rows=20, #xxx no effect: https://dev.plone.org/ticket/13113 
     allow_file_upload=False, 
     ), 
    ), 
相關問題