Answers:
尝试
function MYMODULE_form_alter (&$form, &$form_state, $form_id)
{
// comments
// http://api.drupal.org/api/drupal/modules--comment--comment.module/function/comment_form/6
if ($form['#id'] == 'comment-form') {
$form['comment_filter']['format'] = array(); // nuke wysiwyg from comments
}
}
我是这样做的。我将输入格式固定为非所见即所得的格式,并拒绝访问它。
/**
* Implements hook_comment_form_alter().
*/
function comment_form_alter(&$form, &$form_state, &$form_id) {
$form['comment_body']['#after_build'][] = 'MYMODULE_customize_comment_form';
}
/**
* Comment body after-build function.
*/
function MYMODULE_customize_comment_form(&$form) {
// Hide text-format selector in comment form and fix format to filtered_html
$form[LANGUAGE_NONE][0]['format']['format']['#value'] = 'filtered_html';
$form[LANGUAGE_NONE][0]['format']['format']['#access'] = FALSE;
}
admin/settings/ckeditor/editg
?!这将我带到了同一页面admin