tw2.tinymce

TextArea
  • rows
    • Number of rows
  • cols
    • Number of columns
  • placeholder
    • Placeholder text (HTML5 Only)
class TextArea(FormField):
    rows = twc.Param('Number of rows', default=None, attribute=True)
    cols = twc.Param('Number of columns', default=None, attribute=True)
    placeholder = twc.Param(
        'Placeholder text (HTML5 Only)', attribute=True, default=None)
    template = "tw2.forms.templates.textarea"
<%namespace name="tw" module="tw2.core.mako_util"/>\
<textarea ${tw.attrs(attrs=w.attrs)}>${w.value or ''}</textarea>

TinyMCEWidget
  • rows
    • Number of rows
  • cols
    • Number of columns
  • placeholder
    • Placeholder text (HTML5 Only)
class DemoTinymce(widgets.TinyMCEWidget):
    # Provide default parameters, value, etc... here
    # default = <some-default-value>
    pass
<%namespace name="tw" module="tw2.core.mako_util"/>\
<textarea ${tw.attrs(attrs=w.attrs)}>${w.value or ''}</textarea>