Ckeditor not applying to textarea I have a textarea field in a custom module form , I guess there is ckeditor library by default in core in d8 . I tried the following :

$form['fieldset']['email_template'] = array(
  '#type' =&gt; 'text_format',
  '#format' =&gt; 'full_html',
  '#title' =&gt; t('E-mail template content'),
  '#default_value' =&gt; "&lt;br&gt;&lt;br&gt;&lt;br&gt;" . $dvalue,
  '#description' =&gt; t('A valid template for email trigger.&lt;b&gt; Please type ":" for variable suggestions&lt;/b&gt;'),
  '#attributes' =&gt; array(
                ),
  '#required' =&gt; TRUE,
  '#cols' =&gt; 60,
  '#resizable' =&gt; TRUE,
  '#rows' =&gt; 13,
  //'#wysiwyg' =&gt; TRUE,
            );




I followed the link : https://www.drupal.org/node/1031160

But the ckeditor is not applying to the textarea as expected . Any idea ??

UPDATE

I was not given the text_format as ckeditor in https://base_url/admin/config/content/formats . 

I defined a new format which can apply to which all fields needed as ckeditor . cheers
Go to /admin/config/content/formats and check the CKeditor is enabled for FULL HTML. Also, could be a role issue, by default Full HTML is for admins only.

Important:
For safety/security reasons FULL HTML should be used by admins only. You're better off using basic_html as your format if this form is for authenticated or anonymous users. You may need to adjust the roles so anonymous can use it.