yannickoo / yaml_editor

:droplet: Injects an editor for your YAML configurations textarea elements

Home Page:https://www.drupal.org/project/yaml_editor

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to enable editor

polnetwork opened this issue · comments

Hi, I'm testing the module, I'm on the readme but can't see how to enable the editor as this:

$form['config'] = [
'#type' => 'textarea',
'#title' => t('Configuration'),
'#attributes' => ['data-yaml-editor' => 'true'],
];

Should I set it to the theme config file?
I need it for example on admin/config/menu_link_attributes/config form https://www.drupal.org/project/menu_link_attributes module.

Thank's for all

Menu Link Attributes already provides support for the YAML Editor so you would just need to have both modules enabled to see the editor for the module config.