From cce750cc0f56741e5fa4735e3e1fbbdcdd6ff256 Mon Sep 17 00:00:00 2001 From: Mathew Winstone Date: Sat, 19 Jun 2021 13:25:38 -0400 Subject: [PATCH] fix(widget): add yaml editor library The widget should attach the library to it so it gets loaded when used. --- src/Plugin/Field/FieldWidget/YamlEditorWidget.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Plugin/Field/FieldWidget/YamlEditorWidget.php b/src/Plugin/Field/FieldWidget/YamlEditorWidget.php index 820eb66..a1787bd 100644 --- a/src/Plugin/Field/FieldWidget/YamlEditorWidget.php +++ b/src/Plugin/Field/FieldWidget/YamlEditorWidget.php @@ -37,6 +37,11 @@ public function formElement(FieldItemListInterface $items, $delta, array $elemen 'data-yaml-editor' => 'true', 'class' => ['js-text-full', 'text-full'], ], + '#attached' => [ + 'library' => [ + 'yaml_editor/yaml_editor', + ], + ], ]; return $element;