voidagency/yaml_editor

There is no license information available for the latest version (2.0.0) of this package.

Adds an editor for YAML configuration textareas

Maintainers

Package info

github.com/voidagency/yaml_editor

Homepage

Issues

Type:drupal-module

pkg:composer/voidagency/yaml_editor

Statistics

Installs: 8 920

Dependents: 2

Suggesters: 0

Stars: 0

2.0.0 2024-01-15 08:44 UTC

This package is auto-updated.

Last update: 2026-02-15 13:38:17 UTC


README

This module loads an Ace editor for all textarea with data-yaml-editor attribute

Demo 📺

Demonstration of editor enabled textarea

Usage ☝️

Field widget

You can use the YAML editor for Text (plain, long) fields, simply go to Manage form display and select Textarea with YAML editor.

Code

When you need an editor for your YAML files add a data-yaml-editor to you textarea like:

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

Supporters 😇

Here are some module which are already implementing the data-yaml-editor attribute:

Contributing 🔨

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.