This is how I've defined the content_body
in my FieldWidget
:
$widget['content_body'] = array(
'#title' => $this->t('Body text'),
'#type' => 'textarea',
'#default_value' => isset($items[$delta]) ? $items[$delta]->content_body : '',
);
which allows me to enter more than 255 characters when editing/creating the content. However, I get an error when more than 255 characters are entered and the content is created/updated.
This is the schema in my FieldType
class:
$schema['columns']['content_body'] = array(
'type' => 'text',
'size' => 'tiny',
'not null' => FALSE,
);