/**
  * {@inheritdoc}
  */
 function formElement(FieldItemListInterface $items, $delta, array $element, array &$form, FormStateInterface $form_state)
 {
     $element = parent::formElement($items, $delta, $element, $form, $form_state);
     $display_summary = $items[$delta]->summary || $this->getFieldSetting('display_summary');
     $element['summary'] = array('#type' => $display_summary ? 'textarea' : 'value', '#default_value' => $items[$delta]->summary, '#title' => t('Summary'), '#rows' => $this->getSetting('summary_rows'), '#description' => t('Leave blank to use trimmed value of full text as the summary.'), '#attached' => array('library' => array('text/drupal.text')), '#attributes' => array('class' => array('js-text-summary', 'text-summary')), '#prefix' => '<div class="js-text-summary-wrapper text-summary-wrapper">', '#suffix' => '</div>', '#weight' => -10);
     return $element;
 }