How add Ckeditor on EntityType field I make a custom Entity content module, and for a field i want ckEditor.

Here my code for this field :

$fields['description'] = BaseFieldDefinition::create('string_long')
    -&gt;setLabel(t('Description'))
    -&gt;setRequired(true)
    -&gt;setDisplayOptions('view', array(
        'label' =&gt; 'above',
        'type' =&gt; 'string_textarea',
        'weight' =&gt; -4,

    ))
    -&gt;setDisplayOptions('form', array(
        'type' =&gt; 'string_textarea',
        'weight' =&gt; -4,
        'settings' =&gt; array(
            'placeholder' =&gt; 'Description de votre annonce',
        ),
    ))
    -&gt;setDisplayConfigurable('view', TRUE)
    -&gt;setDisplayConfigurable('form', TRUE);



  Type : string_textarea


How can i tell Drupal 8 to get the widget for textarea basic html mode ?
There are 4 different field types that contain a text


string
string_long
text
text_long


What long means should be obvious, the difference between string and text is that text has a format (like full_html or basic_html) while string is always plain text.

You are currently using string_long, it doesn't make sense to show a wyswiwyg editor for that, since it would always escape all HTML. Use text_long instead.