diff --git a/docroot/themes/humsci/humsci_basic/humsci_basic.theme b/docroot/themes/humsci/humsci_basic/humsci_basic.theme index fecd79bed5..a4a1c2b371 100644 --- a/docroot/themes/humsci/humsci_basic/humsci_basic.theme +++ b/docroot/themes/humsci/humsci_basic/humsci_basic.theme @@ -261,7 +261,8 @@ function humsci_basic_preprocess_paragraph(&$variables) { * Implements hook_preprocess_HOOK(). */ function humsci_basic_preprocess_field(&$variables) { - if ($variables['field_name'] == 'field_hs_text_area') { + $wysiwyg_types = ['text_long', 'text_with_summary']; + if (in_array($variables['field_type'], $wysiwyg_types)) { $variables['#attached']['library'][] = 'humsci_basic/table-wrap'; $variables['#attached']['library'][] = 'humsci_basic/table-scope'; $variables['#attached']['library'][] = 'humsci_basic/video-with-caption'; diff --git a/docroot/themes/humsci/su_humsci_gin_admin/su_humsci_gin_admin.theme b/docroot/themes/humsci/su_humsci_gin_admin/su_humsci_gin_admin.theme index ac943199ca..1e99489ee4 100644 --- a/docroot/themes/humsci/su_humsci_gin_admin/su_humsci_gin_admin.theme +++ b/docroot/themes/humsci/su_humsci_gin_admin/su_humsci_gin_admin.theme @@ -58,7 +58,8 @@ function su_humsci_gin_admin_preprocess(&$variables, $hook) { * Implements hook_preprocess_HOOK(). */ function su_humsci_gin_admin_preprocess_field(&$variables) { - if ($variables['field_name'] == 'field_hs_text_area') { + $wysiwyg_types = ['text_long', 'text_with_summary']; + if (in_array($variables['field_type'], $wysiwyg_types)) { $variables['#attached']['library'][] = 'humsci_basic/table-wrap'; $variables['#attached']['library'][] = 'humsci_basic/table-scope'; $variables['#attached']['library'][] = 'humsci_basic/video-with-caption';