Attach WYSIWYG to custom Drupal form -


i have custom module implementing system settings form, , attach wysiwyg text area field. however, nothing doing having affect. using latest wysiwyg module ckeditor. there no js errors. on screen plain text area.

code:

$form['mymodule'] = array(             '#type' => 'fieldset',             '#title' => t('settings'),         );      $form['mymodule']['email_content'] = array(         '#title' => 'email content',         '#type' => 'textarea',         '#description' => t('the content of message emailed user when license key assigned. can use [user_fullname] , [user_license_key] substitute user name , license key, respectively.'),         '#default_value' => variable_get('mymodule_email_content', ''),     );      $form['mymodule']['format'] = filter_form(2); 

all seems provide filter selection. got page: http://drupal.org/node/358316. when pick format, wysiwyg not load.

what want have form present wysiwyg without having make format selection. how can trigger load on textarea in form api?

you need add subarray wysiwyg thing

    $form['mymodule']['foo']['email_content'] = array(         '#title' => 'email content',     . . .

    $form['mymodule']['foo']['format'] = filter_form(2);

maybe can hide filter selection box using css?


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -