3 namespace Drupal\quickedit\Plugin\InPlaceEditor;
5 use Drupal\Core\Field\FieldItemListInterface;
6 use Drupal\quickedit\Plugin\InPlaceEditorBase;
9 * Defines the plain text in-place editor.
15 class PlainTextEditor extends InPlaceEditorBase {
20 public function isCompatible(FieldItemListInterface $items) {
21 $field_definition = $items->getFieldDefinition();
23 // This editor is incompatible with multivalued fields.
24 return $field_definition->getFieldStorageDefinition()->getCardinality() == 1;
30 public function getAttachments() {
33 'quickedit/quickedit.inPlaceEditor.plainText',