开发者

ckeditor with drupal custom form

I created m开发者_开发百科y own module form which include address textarea

    $form['address'] = array(
    '#input_format' => '1',
    '#rows' => '5',
    '#weight' => '4',
    '#type' => 'textarea',
    '#title' => t('Address'),

);

when i run the form i got the following help below it

CKEditor: the ID for excluding or including this element is customers/edit/5.edit-address.

so i got the element ID and entered it in the include setting of the ckeditor

but still the editor doesn't appear on that field, am I missing something ?


use a #type of "text_format" with a #base_type of "textarea" and it should work. like this:

    $form['address'] = array(
      '#input_format' => '1',
      '#rows' => '5',
      '#weight' => '4',
      '#type' => 'text_format',
      '#base_type' => 'textarea',
      '#title' => t('Address'),

  );
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜