我使用symfony 1.4.11。我接下来了:
$this->widgetSchema['en']['content'] = new sfWidgetFormTextareaTinyMCE(array(
'width' => 900,
'height' => 300,
'config' => 'theme_advanced_buttons1 : "cut, copy, paste, images, bold, italic, underline, justifyleft, justifycenter, justifyright , outdent, indent, bullist, numlist, undo, redo, link",
theme_advanced_buttons2 : "",
theme_advanced_buttons3 : "",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "bottom",
theme_advanced_resizing: "false",
plugins: "images, paste",
'),array('class' => 'tinyMCE',)
);
我需要验证这一点,我尝试sfValidatorString,但它不起作用
答案 0 :(得分:2)
您没有正确设置窗口小部件(可能既不是您的验证器)。如果要分组/嵌套窗口小部件,则需要在容器窗体中嵌入另一个窗体。
编辑:
您要么创建一个包含“内容”小部件的新表单,您可以将其嵌入父表单中,如下所示:
$this->embedForm('en', new myContentForm());
或者你可以这样添加小部件:
$this->widgetSchema['content_en'] = new sfWidgetFormTextareaTinyMCE(...);
具体细节实际上取决于您的用例,我建议您在此处阅读表格: