开发者

ckeditor with drupal custom form

开发者 https://www.devze.com 2023-03-06 14:10 出处:网络
I created m开发者_开发百科y own module form which include address textarea $form[\'address\'] = array(

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

精彩评论

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